diff mbox series

[USB] usb: raw_gadget: fix compilation warnings in uapi headers

Message ID 6206b80b3810f95bfe1d452de45596609a07b6ea.1584456779.git.andreyknvl@google.com (mailing list archive)
State Mainlined
Commit 956ae8df7fed0a2acc7ae934f24493eaeb031f62
Headers show
Series [USB] usb: raw_gadget: fix compilation warnings in uapi headers | expand

Commit Message

Andrey Konovalov March 17, 2020, 2:54 p.m. UTC
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 <bot@kernelci.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 include/uapi/linux/usb/raw_gadget.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrey Konovalov March 19, 2020, 10:13 p.m. UTC | #1
On Thu, Mar 19, 2020 at 11:11 PM Andrey Konovalov <andreyknvl@google.com> wrote:
>
> 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 <bot@kernelci.org>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> ---
>  include/uapi/linux/usb/raw_gadget.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/usb/raw_gadget.h b/include/uapi/linux/usb/raw_gadget.h
> index 00cbded71061..ea375082b3ac 100644
> --- a/include/uapi/linux/usb/raw_gadget.h
> +++ b/include/uapi/linux/usb/raw_gadget.h
> @@ -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);
>  }
> --
> 2.25.1.481.gfbce0eb801-goog
>

(Sorry, accidental resend, please ignore.)
diff mbox series

Patch

diff --git a/include/uapi/linux/usb/raw_gadget.h b/include/uapi/linux/usb/raw_gadget.h
index 00cbded71061..ea375082b3ac 100644
--- a/include/uapi/linux/usb/raw_gadget.h
+++ b/include/uapi/linux/usb/raw_gadget.h
@@ -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);
 }