Skip to contentSkip to conversation

check unsigned < 0 in

PATCH New Eric Sesterhenn / snakebyte 1 participant 1 message Dec 16, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 check unsigned < 0 in

hi,

since get_settings() returns a signed int and it gets checked for < 0 to catch an error, res should be a signed int too.

I saw there are quite some modifications to this file in -mm what is the way to deal with this? Should one create a patch agains -mm instead of the latest git in such a case?

drivers/net/bonding/bond_main.c renamed from drivers/net/bonding/bond_main.c.orig +1 -1
@@ -1032,7 +1032,7 @@ static int bond_update_speed_duplex(stru
 	slave->duplex = DUPLEX_FULL;
 
 	if (slave_dev->ethtool_ops) {
-		u32 res;
+		int res;
 
 		if (!slave_dev->ethtool_ops->get_settings) {
 			return -1;

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors