Skip to content

Commit

Permalink
usb: raw_gadget: fix compilation warnings in uapi headers
Browse files Browse the repository at this point in the history
Mark usb_raw_io_flags_valid() and usb_raw_io_flags_zero() as inline to
fix the following warnings:

./usr/include/linux/usb/raw_gadget.h:69:12: warning: unused function 'usb_raw_io_flags_valid' [-Wunused-function]
./usr/include/linux/usb/raw_gadget.h:74:12: warning: unused function 'usb_raw_io_flags_zero' [-Wunused-function]

Reported-by: kernelci.org bot <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Andrey Konovalov <[email protected]>
Link: https://lore.kernel.org/r/6206b80b3810f95bfe1d452de45596609a07b6ea.1584456779.git.andreyknvl@google.com
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
xairy authored and gregkh committed Mar 17, 2020
1 parent df8df5e commit 956ae8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/uapi/linux/usb/raw_gadget.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ struct usb_raw_event {
#define USB_RAW_IO_FLAGS_ZERO 0x0001
#define USB_RAW_IO_FLAGS_MASK 0x0001

static int usb_raw_io_flags_valid(__u16 flags)
static inline int usb_raw_io_flags_valid(__u16 flags)
{
return (flags & ~USB_RAW_IO_FLAGS_MASK) == 0;
}

static int usb_raw_io_flags_zero(__u16 flags)
static inline int usb_raw_io_flags_zero(__u16 flags)
{
return (flags & USB_RAW_IO_FLAGS_ZERO);
}
Expand Down

0 comments on commit 956ae8d

Please sign in to comment.