re: memstick: add support for legacy memorysticks

From: Dan Carpenter
Date: Fri Sep 21 2012 - 07:38:10 EST


Hello Maxim Levitsky,

The patch d59dd7c61b24: "memstick: add support for legacy
memorysticks" from Sep 21, 2012, leads to the following warning:
drivers/memstick/core/ms_block.c:147 sg_compare_to_buffer()
warn: signedness bug returning '-1'

141
142 if (!retval && len)
143 retval = -1;
^^^^^^^^^^^
144
145 sg_miter_stop(&miter);
146 local_irq_restore(flags);
147 return retval;
148 }

This function is bool so it always returns true if len is non-zero.

The comments at the top of the function don't talk about if a 1 means
the same and 0 means different or if it's the other way around.

regards,
dan carpenter

--
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/