Mimoja has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38171 )
Change subject: drivers/spi/flashconsole: Fix shadowing local variable ......................................................................
Patch Set 4:
(7 comments)
Thank you for activly looking for my tired mistakes. Sorry for the extra work.
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... File src/drivers/spi/flashconsole.c:
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... PS1, Line 55: for (i = 0; i < len && offset < size;) {
l_offset
Done
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... PS1, Line 58: len = MIN(READ_BUFFER_SIZE, size - offset);
l_offset
Done
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... PS1, Line 59: if (rdev_readat(&rdev, buffer, offset, len) != len)
l_offset
Done
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... PS1, Line 73: if (offset >= size) {
l_offset
Done
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... PS1, Line 78: offset = l_offset;
This is the only line where s/g_offset/offset happened. […]
Done
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... PS1, Line 99: size_t l_offset = offset;
You could declare this const, so you don't really need the local variable at all.
Done
https://review.coreboot.org/c/coreboot/+/38171/1/src/drivers/spi/flashconsol... PS1, Line 125: offset = l_offset + len;
offset += len;
Done