From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 23 Jun 2017 09:49:32 -0400 Subject: [U-Boot] [PATCH 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c In-Reply-To: <594D1837.2020305@denx.de> References: <1498114160-12772-1-git-send-email-hs@denx.de> <1498114160-12772-2-git-send-email-hs@denx.de> <20170623145004.42b91e3f@jawa> <594D1837.2020305@denx.de> Message-ID: <20170623134932.GB27196@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Jun 23, 2017 at 03:31:35PM +0200, Heiko Schocher wrote: > Hello Lukasz, > > Am 23.06.2017 um 14:50 schrieb Lukasz Majewski: > >Hi Heiko, > > > >>fix warnings: > >>drivers/usb/gadget/at91_udc.c:1344:12: warning: 'at91rm9200_udc_init' > >>defined but not used [-Wunused-function] > >>drivers/usb/gadget/at91_udc.c:1379:13: warning: > >>'at91rm9200_udc_pullup' defined but not used [-Wunused-function] > >>drivers/usb/gadget/at91_udc.c:1476:12: warning: > >>'at91sam9263_udc_init' defined but not used [-Wunused-function] > >> > >>Signed-off-by: Heiko Schocher > >>--- > >> > >> drivers/usb/gadget/at91_udc.c | 30 +++--------------------------- > >> 1 file changed, 3 insertions(+), 27 deletions(-) > >> > >>diff --git a/drivers/usb/gadget/at91_udc.c > >>b/drivers/usb/gadget/at91_udc.c index 01a5907..85bfbf5 100644 > >>--- a/drivers/usb/gadget/at91_udc.c > >>+++ b/drivers/usb/gadget/at91_udc.c > >>@@ -1341,7 +1341,7 @@ static int at91_stop(struct usb_gadget *gadget) > >> > >> /*-------------------------------------------------------------------------*/ > >> > >>-static int at91rm9200_udc_init(struct at91_udc *udc) > >>+static __maybe_unused int at91rm9200_udc_init(struct at91_udc *udc) > >> { > >> struct at91_ep *ep; > >> int ret; > >>@@ -1376,7 +1376,8 @@ static int at91rm9200_udc_init(struct at91_udc > >>*udc) return 0; > >> } > >> > >>-static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on) > >>+static __maybe_unused > >>+void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on) > >> { > >> int active = !udc->board.pullup_active_low; > >> > >>@@ -1473,31 +1474,6 @@ static const struct at91_udc_caps > >>at91sam9261_udc_caps = { }; > >> #endif > >> > >>-static int at91sam9263_udc_init(struct at91_udc *udc) > > > >I'm a bit puzzled... > > > >For the at91rm9200 related boards it is enough to add __maybe_unused > >and leave the unused function in the source code. > > > >Hence, I'm wondering why do you remove the function for at91sam9263? > > > >Shouldn't all be removed or have added __maybe_unused ? > > Hmm.. No, it seems there are no users for the at91sam9263_udc_init() > > pollux:u-boot hs [master] $ grep -lr at91sam9263_udc_init . > ./drivers/usb/gadget/at91_udc.c > pollux:u-boot hs [master] $ > > And in ./drivers/usb/gadget/at91_udc.c it is only defined, but not used... So in sum, a v2 to drop this now unused code then, yes? Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: