Skip to contentSkip to conversation

make init_error signed in synclink_gt.c

PATCH New Darren Jenkins\ 1 participant 1 message Feb 22, 2006

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

PATCH 1/1 make init_error signed in synclink_gt.c

G'day list

I noticed struct member init_error was used as a signed value (to return a -ve on error) but was an unsigned int.

examples of it's miss-use are

3112 info->init_error = -1;

4440 if ((info->init_error = register_test(info)) < 0) {

The patch below converts it from an 'unsigned int', to a plain 'int'. Patch is compile tested.

drivers/char/synclink_gt.c renamed from drivers/char/synclink_gt.c.orig +1 -1
@@ -306,7 +306,7 @@ struct slgt_info {
 	int tx_active;
 
 	unsigned char signals;    /* serial signal states */
-	unsigned int init_error;  /* initialization error */
+	int init_error;  /* initialization error */
 
 	unsigned char *tx_buf;
 	int tx_count;

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