Re: [PATCH] drivers: usb: gadget: f_mass_storage: Use "bool" instead of "int" in fsg_module_parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Jan 2012 03:55:36 +0100, Fabio Estevam <festevam@xxxxxxxxx> wrote:
Fix the following build warnings:
[...]
  CC [M]  drivers/usb/gadget/mass_storage.o
drivers/usb/gadget/mass_storage.c: In function ‘__check_ro’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_removable’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_cdrom’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_nofua’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_stall’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type

Declare the fsg_module_parameters fields as "bool" so that they can match the types
passed in FSG_MODULE_PARAM_ARRAY macro.

Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

moduleparam.h[1] says that “for historical reasons "bool" parameters can be
(unsigned) "int"” so I'm not sure why those warnings are there in the
first place.  I'm not getting them myself either when building 3.2.

Still, I see no reason why not to change that (even if for different
reasons), so:

Acked-by: Michal Nazarewicz <mina86@xxxxxxxxxx>

________________________________________________________________
[1] http://lxr.linux.no/linux+*/include/linux/moduleparam.h#L353

--
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux