Paul Menzel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38394 )
Change subject: drivers/i2c/at24rf08c: Tighten count variable type to unsigned integers ......................................................................
drivers/i2c/at24rf08c: Tighten count variable type to unsigned integers
Change-Id: I225d0177b78984783d4f2506873ed220863b0467 Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- M src/drivers/i2c/at24rf08c/at24rf08c.c 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/38394/1
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c index 50501ba..624df7d 100644 --- a/src/drivers/i2c/at24rf08c/at24rf08c.c +++ b/src/drivers/i2c/at24rf08c/at24rf08c.c @@ -19,7 +19,7 @@
static void at24rf08c_init(struct device *dev) { - int i, j; + unsigned int i, j;
if (!dev->enabled) return; @@ -36,7 +36,7 @@ Retry several times in case of failure. */ for (j = 0; j < 100; j++) if (smbus_write_byte(dev, i, 0x0f) >= 0) { - printk(BIOS_DEBUG, "j = %d", j); + printk(BIOS_DEBUG, "i= = %u, j = %u\n", j); break; } }
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38394 )
Change subject: drivers/i2c/at24rf08c: Tighten count variable type to unsigned integers ......................................................................
Patch Set 1:
Let's pretend the compiler generates bytecode that, since these variables will be incremented, the change from int to unsigned int, for i and j, does essentially the same.
Idwer Vollering has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38394 )
Change subject: drivers/i2c/at24rf08c: Tighten count variable type to unsigned integers ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38394/1/src/drivers/i2c/at24rf08c/a... File src/drivers/i2c/at24rf08c/at24rf08c.c:
https://review.coreboot.org/c/coreboot/+/38394/1/src/drivers/i2c/at24rf08c/a... PS1, Line 39: printk(BIOS_DEBUG, "i= = %u, j = %u\n", j); Nitpick: can you trim this down to two times '='? Here, you missed 'i': printk(..., i, j)
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38394 )
Change subject: drivers/i2c/at24rf08c: Tighten count variable type to unsigned integers ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38394/1/src/drivers/i2c/at24rf08c/a... File src/drivers/i2c/at24rf08c/at24rf08c.c:
https://review.coreboot.org/c/coreboot/+/38394/1/src/drivers/i2c/at24rf08c/a... PS1, Line 39: printk(BIOS_DEBUG, "i= = %u, j = %u\n", j);
Nitpick: can you trim this down to two times '='? […]
Yes, it doesn’t belong into this commit, and I’ll remove it.
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/38394?usp=email )
Change subject: drivers/i2c/at24rf08c: Tighten count variable type to unsigned integers ......................................................................
Abandoned