Attention is currently required from: Anastasia Klimchuk, Edward O'Callaghan.
6 comments:
Patchset:
good thoughts on the simplification.. maybe generally the API should already have an init function at this point that handles a possible failure case (flashchips = NULL) and bails out so we don't have to test for null/0 at various places in the code over and again.
File flashchips.c:
Patch Set #5, Line 34: internal_
no need to rename if it becomes static, also "internal" is a overloaded term with the internal progr […]
i understand there is no technical need, but i did it to make it more obvious that it is not coming from the outside. it keeps the code easier to understand
Patch Set #5, Line 20844: get_flashchips(void)
you *could* have a signature of: […]
sure, but that would be more complex.
Patch Set #5, Line 20849: unsigned int
should be `size_t` for the size of an array.
maybe so. it was unsigned int before, so i didn't change it. if we want to fix that, we could do that in a separate patch that focused on that. trying to keep it to one logical change per patch
File ichspi.c:
const struct flashchip *chip;
struct flashchip *flashchips=get_flashchips();
if (!flashchips)
return NULL;
``` […]
very clever. and doesn't check the return value. i suppose we could bail out earlier if we don't have a good database in memory
File libflashrom.c:
Patch Set #5, Line 95: unsigned int
size_t
shouldn't then i downstairs also be size_t? not against this, but it seems that is a larger consistency cleanup that needs to happen across the tree separately if this is a notion that is agreed upon.
To view, visit change 75646. To unsubscribe, or for help writing mail filters, visit settings.