[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <55A4EF8B.7090806@cogentembedded.com>
Date: Tue, 14 Jul 2015 14:16:27 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Robert Baldyga <r.baldyga@...sung.com>, gregkh@...uxfoundation.org,
balbi@...com
Cc: Peter.Chen@...escale.com, johnyoun@...opsys.com,
dahlmann.thomas@...or.de, nicolas.ferre@...el.com,
cernekee@...il.com, leoli@...escale.com, daniel@...que.org,
haojian.zhuang@...il.com, robert.jarzmik@...e.fr,
michal.simek@...inx.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
linux-omap@...r.kernel.org, linux-geode@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linuxppc-dev@...ts.ozlabs.org, andrzej.p@...sung.com,
m.szyprowski@...sung.com
Subject: Re: [PATCH v2 48/48] usb: gadget: epautoconf: cleanup dead code
Hello.
On 7/14/2015 12:39 PM, Robert Baldyga wrote:
> Function find_ep() is no longer needed here, so we can remove it.
> We also don't use anything from gadget_chips.h header any longer.
> Signed-off-by: Robert Baldyga <r.baldyga@...sung.com>
> ---
> drivers/usb/gadget/epautoconf.c | 14 --------------
> 1 file changed, 14 deletions(-)
> diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
> index e9a8682..9a80925 100644
> --- a/drivers/usb/gadget/epautoconf.c
> +++ b/drivers/usb/gadget/epautoconf.c
> @@ -20,20 +20,6 @@
> #include <linux/usb/ch9.h>
> #include <linux/usb/gadget.h>
>
> -#include "gadget_chips.h"
> -
> -static struct usb_ep *
> -find_ep (struct usb_gadget *gadget, const char *name)
> -{
> - struct usb_ep *ep;
> -
> - list_for_each_entry (ep, &gadget->ep_list, ep_list) {
> - if (0 == strcmp (ep->name, name))
> - return ep;
> - }
> - return NULL;
> -}
> -
I don't think duplicating the function in each driver that needs it is
better than turniong this function into public.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists