]> git.baikalelectronics.ru Git - kernel.git/commit
usb: host: oxu210hp-hcd: fix gcc warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Jan 2020 21:43:46 +0000 (22:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2020 15:58:36 +0000 (16:58 +0100)
commitd4c14dd8fb6deae7800560a63b048a66234b1270
treef9f9d241757c6735642e15b6efb519c956b7b6fa
parentca74870ef889c2721b51ae5077b8143e4312dbcf
usb: host: oxu210hp-hcd: fix gcc warning

gcc -O3 warns about correct code:

    inlined from 'oxu_hub_control.constprop' at drivers/usb/host/oxu210hp-hcd.c:3652:3:
include/linux/string.h:411:9: error: argument 1 null where non-null expected [-Werror=nonnull]
  return __builtin_memset(p, c, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/host/oxu210hp-hcd.c: In function 'oxu_hub_control.constprop':
include/linux/string.h:411:9: note: in a call to built-in function '__builtin_memset'

Expand the code slightly to let gcc better understand it and
not warn any more.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200107214354.1008937-1-arnd@arndb.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/oxu210hp-hcd.c