All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Octavian Purdila <octavian.purdila@intel.com>
Cc: Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>, Arnd Bergmann <arnd@arndb.de>,
	Daniel Baluta <daniel.baluta@intel.com>,
	Laurentiu Palcu <laurentiu.palcu@intel.com>,
	linux-usb@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH v6 1/4] mfd: add support for Diolan DLN-2 devices
Date: Tue, 7 Oct 2014 19:10:03 +0200	[thread overview]
Message-ID: <20141007171003.GI5362@localhost> (raw)
In-Reply-To: <CAE1zotLEV-=JvCJvEQqg8CA6fu3UWmPOx3ZYgpd+rYSuSEVmNQ@mail.gmail.com>

On Mon, Oct 06, 2014 at 03:17:22PM +0300, Octavian Purdila wrote:
> On Fri, Oct 3, 2014 at 8:12 PM, Johan Hovold <johan@kernel.org> wrote:
> >
> > On Thu, Sep 25, 2014 at 07:07:31PM +0300, Octavian Purdila wrote:
> > > This patch implements the USB part of the Diolan USB-I2C/SPI/GPIO
> > > Master Adapter DLN-2. Details about the device can be found here:
> > >
> 
> <snip>
> 
> > > +
> > > +             ret = dln2_submit_urb(dln2, dln2->rx_urb[i], GFP_KERNEL);
> > > +             if (ret < 0)
> > > +                     return ret;
> >
> > Is it really worth having this helper only to save a couple of lines on
> > a dev_err? If you do all resubmissions on completion inline in the
> > handler, you only have three places where usb_submit_urb is called.
> >
> 
> I moved the completion in the handler as you suggested. I have kept
> the helper, would you prefer to remove it?

Moved the "completion"? I was suggesting that the URB resubmission
should be done inline the URB completion handler.

[ "Completion" may be a little ambiguous. The URB callback is called an
URB completion handler. Not be confused with the completion structures
you use to wait for responses. ]

It's fine to keep the helper as long as it's clear that the urb has been
"cached" and should not be resubmitted (inline) in the completion
handler in that case.
 
> <snip>
> 
> > > +     id = dln2->usb_dev->bus->busnum << 8 | dln2->usb_dev->devnum;
> >
> > After giving this some more thought, I think you should just
> > use PLATFORM_DEVID_AUTO as id. I have submitted a series to fix the
> > other USB MFD drivers and add a convenience helper to register
> > hotpluggable MFDs here:
> >
> 
> OK, I will use PLATFORM_DEVID_AUTO for now. If your series merges
> first and I have to resubmit mine, I will switch to using
> mfd_add_hotplug_devices.

Lee merged the helper function earlier today.

Johan

  reply	other threads:[~2014-10-07 17:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 16:07 [PATCH v6 0/4] mfd: add support for Diolan DLN-2 Octavian Purdila
2014-09-25 16:07 ` [PATCH v6 1/4] mfd: add support for Diolan DLN-2 devices Octavian Purdila
     [not found]   ` <1411661254-5204-2-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-10-03 17:12     ` Johan Hovold
2014-10-03 17:12       ` Johan Hovold
2014-10-06 12:17       ` Octavian Purdila
2014-10-06 12:17         ` Octavian Purdila
2014-10-07 17:10         ` Johan Hovold [this message]
2014-10-07 18:01           ` Octavian Purdila
2014-10-07 18:01             ` Octavian Purdila
2014-10-08  9:30             ` Johan Hovold
2014-10-08  9:23   ` Johan Hovold
2014-10-08 10:54     ` Octavian Purdila
     [not found]       ` <CAE1zotKHq1Fj_AqKzfnBHoypetb6Yz3OsHnqfeHN5PrVJtuHVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-08 12:04         ` Johan Hovold
2014-10-08 12:04           ` Johan Hovold
2014-10-08 12:33           ` Octavian Purdila
2014-10-08 12:33             ` Octavian Purdila
     [not found]             ` <CAE1zot+muJn5ngxpq8LeF9J+7kZqCiStzvcxLLP0wf08TjWG4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-09 13:16               ` Johan Hovold
2014-10-09 13:16                 ` Johan Hovold
     [not found] ` <1411661254-5204-1-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-09-25 16:07   ` [PATCH v6 2/4] i2c: add support for Diolan DLN-2 USB-I2C adapter Octavian Purdila
2014-09-25 16:07     ` Octavian Purdila
     [not found]     ` <1411661254-5204-3-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-10-03  1:14       ` Wolfram Sang
2014-10-03  1:14         ` Wolfram Sang
2014-10-03 12:30         ` Octavian Purdila
2014-10-03 12:30           ` Octavian Purdila
2014-10-07 16:46       ` Johan Hovold
2014-10-07 16:46         ` Johan Hovold
2014-10-07 17:52         ` Octavian Purdila
     [not found]           ` <CAE1zotKiYGXDbE0yVOz1ROuTxMf_Sfpn-0ghOM1dLEu1oEGZuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-07 17:55             ` Johan Hovold
2014-10-07 17:55               ` Johan Hovold
2014-10-08 10:42     ` Johan Hovold
2014-10-08 11:07       ` Octavian Purdila
2014-09-25 16:07 ` [PATCH v6 3/4] gpiolib: add irq_not_threaded flag to gpio_chip Octavian Purdila
2014-09-25 16:07 ` [PATCH v6 4/4] gpio: add support for the Diolan DLN-2 USB GPIO driver Octavian Purdila
     [not found]   ` <1411661254-5204-5-git-send-email-octavian.purdila-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-10-07 16:56     ` Johan Hovold
2014-10-07 16:56       ` Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141007171003.GI5362@localhost \
    --to=johan@kernel.org \
    --cc=arnd@arndb.de \
    --cc=daniel.baluta@intel.com \
    --cc=gnurou@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurentiu.palcu@intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=octavian.purdila@intel.com \
    --cc=sameo@linux.intel.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.