From a9c813f8874430d679fcdf3bad7e36ff707acef2 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 13 May 2020 18:19:38 -0700 Subject: [PATCH] ANDROID: usb: gadget: Add missing inline qualifier to stub functions When CONFIG_USB_GADGET is disabled: In file included from drivers/usb/dwc2/core_intr.c:54: In file included from drivers/usb/dwc2/core.h:43: include/linux/usb/gadget.h:348:12: warning: unused function 'usb_gsi_ep_op' [-Wunused-function] static int usb_gsi_ep_op(struct usb_ep *ep, ^ include/linux/usb/gadget.h:645:12: warning: unused function 'usb_gadget_func_wakeup' [-Wunused-function] static int usb_gadget_func_wakeup(struct usb_gadget *gadget, int interface_id) ^ 2 warnings generated. Stub functions are expected to use inline to hide the fact that they are unused. Add that here to eliminate the warnings. Change-Id: I55cabd7602e5ddf6213265053e1b7850ff62bcdb Fixes: 632093eced49c ("ANDROID: GKI: USB: Resolve ABI diff for usb_gadget and usb_gadget_ops") Fixes: b582ef5b4db39 ("ANDROID: GKI: drivers: usb: Add functions usb_func_ep_queue/usb_func_wakeup") Signed-off-by: Nathan Chancellor --- include/linux/usb/gadget.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 264a69f9f952..9a520f42aaac 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -345,7 +345,7 @@ static inline int usb_ep_fifo_status(struct usb_ep *ep) static inline void usb_ep_fifo_flush(struct usb_ep *ep) { } -static int usb_gsi_ep_op(struct usb_ep *ep, +static inline int usb_gsi_ep_op(struct usb_ep *ep, struct usb_gsi_request *req, enum gsi_ep_op op) { return 0; } #endif /* USB_GADGET */ @@ -642,7 +642,8 @@ static inline int usb_gadget_frame_number(struct usb_gadget *gadget) { return 0; } static inline int usb_gadget_wakeup(struct usb_gadget *gadget) { return 0; } -static int usb_gadget_func_wakeup(struct usb_gadget *gadget, int interface_id) +static inline int usb_gadget_func_wakeup(struct usb_gadget *gadget, + int interface_id) { return 0; } static inline int usb_gadget_set_selfpowered(struct usb_gadget *gadget) { return 0; }