Attention is currently required from: Simon Buhrow, Nico Huber, Paul Menzel, Aarya.
8 comments:
File flashrom.c:
struct erase_layout *create_erase_layout(struct flashctx *const flashctx);
This function later becomes a static. […]
Would it make sense for these functions to become part of layout.c perhaps? I feel like all this specific logic is fundamentally a abstract data structure part of the project you are annotating to later consume, walk and determine the set of actions to be taken for optimality of erasure in flashrom.c.
File flashrom.c:
const
const
Patch Set #42, Line 1243: layout
`struct erase_layout *layout = `
and drop the cast?
Also `calloc(1, ..` avoids uninitialised heap by zeroing it.
Patch Set #42, Line 1245: if (layout == NULL)
```
if (!ptr)
return NULL;
```
is canonical.
You also want the `msg_gerr("Out of memory!\n");` message in this branch to be consistent with the rest of the codebase.
Patch Set #42, Line 1249: index
doesn't `index` and `i` count in tandem? You can just use `i` and drop the `index`?
should be fine to scope the `i` indexer to be lexically coupled to the loop construct with `for (size_t i = 0; ..`
`chip->block_erasers[i].eraseblocks[j]` as a intermediate to the loop pre-amble.
To view, visit change 65879. To unsubscribe, or for help writing mail filters, visit settings.