public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Tomas Winkler <tomas.winkler@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [char-misc-next V2] mei: simplify error handling via devres function.
Date: Wed, 25 Jan 2017 18:28:33 +0200	[thread overview]
Message-ID: <1485361713.2133.327.camel@linux.intel.com> (raw)
In-Reply-To: <1485361516-5450-1-git-send-email-tomas.winkler@intel.com>

On Wed, 2017-01-25 at 18:25 +0200, Tomas Winkler wrote:
> Use devm_ and pcim_ functions to make error handling
> simpler and code smaller and tidier.
> 
> Based on original patch by
> mei: me: use managed functions pcim_* and devm_*
> Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> https://lkml.org/lkml/2016/2/1/339
> 

Thanks for an update!

> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

One nitpick below and please use my SoB instead of Cc here. And you may
remove my name above in the commit message (You might leave a link if
you want to)

>     2. Revert pcim irq reservation change.

Noticed that in my origin patch it wasn't touched.

>  disable_msi:
>  	pci_disable_msi(pdev);

But this one in error path of ->probe() and below in ->remove() can be
removed. pcim_release() will take care of it. (request_threaded_irq()
and free_irq() must be left untouched, indeed)

In suspend/resume you would use it if you want to, though I don't know
if it makes any difference.

>  	free_irq(pdev->irq, dev);
>  	pci_disable_msi(pdev);

Ditto for the second module, pci_disable_msi() can be safely removed.
(System sleep case is a separate one and perhaps needs additional
testing, thus, up to you)

>  release_irq:

> 	free_irq(pdev->irq, dev);
>  	pci_disable_msi(pdev);

> 	free_irq(pdev->irq, dev);
>  	pci_disable_msi(pdev);

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

      reply	other threads:[~2017-01-25 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 16:25 [char-misc-next V2] mei: simplify error handling via devres function Tomas Winkler
2017-01-25 16:28 ` Andy Shevchenko [this message]

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=1485361713.2133.327.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alexander.usyskin@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox