[patch][trivial] avoid signed/unsigned comparison indrivers/eisa/eisa-bus.c::eisa_name_device()

From: Jesper Juhl
Date: Wed Nov 24 2004 - 19:45:57 EST



This is trivial and of questional importance, but I'll submit it
none-the-less - feel free to drop/ignore.

The patch changes the 'i' variable in eisa_name_device() to be unsigned
for no other reason than to avoid this warning when building with gcc -W :
drivers/eisa/eisa-bus.c: In function `eisa_name_device':
drivers/eisa/eisa-bus.c:62: warning: comparison between signed and unsigned

whether this variable is a signed or unsigned int will not make any actual
difference, but I thought it would be nice to have one less warning to go
through when building with -W - especially when it won't do any harm nor
obfuscate the code to make the change (and you could argue that since we
are looping through a table that cannot have any negative indices, the
index 'i' is logically unsigned).

Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>

diff -up linux-2.6.10-rc2-bk9-orig/drivers/eisa/eisa-bus.c linux-2.6.10-rc2-bk9/drivers/eisa/eisa-bus.c
--- linux-2.6.10-rc2-bk9-orig/drivers/eisa/eisa-bus.c 2004-11-17 01:19:37.000000000 +0100
+++ linux-2.6.10-rc2-bk9/drivers/eisa/eisa-bus.c 2004-11-25 01:29:59.000000000 +0100
@@ -58,7 +58,7 @@ static int is_forced_dev (int *forced_ta
static void __init eisa_name_device (struct eisa_device *edev)
{
#ifdef CONFIG_EISA_NAMES
- int i;
+ unsigned int i;
for (i = 0; i < EISA_INFOS; i++) {
if (!strcmp (edev->id.sig, eisa_table[i].id.sig)) {
strlcpy (edev->pretty_name,


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/