[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1409241106100.1580-100000@iolanthe.rowland.org>
Date: Wed, 24 Sep 2014 11:08:16 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Michal Sojka <sojka@...ica.cz>
cc: Felipe Balbi <balbi@...com>, <linux-usb@...r.kernel.org>,
Bryan Wu <cooloney@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux LED Subsystem <linux-leds@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <michal.vokac@...ap.cz>
Subject: Re: [PATCH v5 1/3] usb: gadget: Refactor request completion
On Tue, 23 Sep 2014, Michal Sojka wrote:
> >> +/**
> >> + * usb_gadget_giveback_request - give the request back to the gadget layer
> >> + * Context: in_interrupt()
> >> + *
> >> + * This is called by device controller drivers in order to return the
> >> + * completed request back to the gadget layer.
> >> + */
> >> +void usb_gadget_giveback_request(struct usb_ep *ep,
> >> + struct usb_request *req)
> >> +{
> >> + if (likely(req->complete))
> >> + req->complete(ep, req);
> >> + else
> >> + pr_err("%s : req->complete must not be NULL\n", __func__);
> >
> > let it Oops. We require ->complete to be valid, if there's any gadget
> > driver not setting ->complete, it deserves to oops so we can the
> > error.
>
> The Oops was there before, but I removed it because greg k-h didn't want
> it. See http://marc.info/?l=linux-usb&m=140917381611947&w=2. Do you
> still want the oops here?
Greg didn't want you to add a BUG() statement, whereas Felipe wants you
to leave out the "if" test and pr_err(). Just omit both, and everyone
will be satisfied.
Alan Stern
--
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