From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Darren Hart <dvhart@infradead.org>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 1/5] intel_scu_ipc: fix error path by turning to devm_* / pcim_*
Date: Mon, 12 Oct 2015 11:00:42 +0300 [thread overview]
Message-ID: <1444636842.8361.555.camel@linux.intel.com> (raw)
In-Reply-To: <20151011042136.GC2958@malice.jf.intel.com>
On Sat, 2015-10-10 at 21:21 -0700, Darren Hart wrote:
> On Fri, Oct 09, 2015 at 05:11:32PM +0300, Andy Shevchenko wrote:
> > The error handling is broken right now since it leaves resources
> > unfreed.
> > Convert the code to use managed resources to fix the error
> > handling.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Thanks Andriy,
>
> Please always explicitly Cc LKML.
>
> Is this hardware you able to test explicitly?
Yes, the patch series has been tested on Intel Medfield and Intel
Edison (Merrifield) boards.
>
> > ---
> > drivers/platform/x86/intel_scu_ipc.c | 26 ++++++++----------------
> > --
> > 1 file changed, 8 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/platform/x86/intel_scu_ipc.c
> > b/drivers/platform/x86/intel_scu_ipc.c
> > index 187d108..7148535 100644
> > --- a/drivers/platform/x86/intel_scu_ipc.c
> > +++ b/drivers/platform/x86/intel_scu_ipc.c
>
> ...
>
> > - err = pci_request_regions(dev, "intel_scu_ipc");
> > + err = pcim_iomap_regions(dev, 1 << 0, pci_name(dev));
> > if (err)
> > return err;
> >
> > - base = pci_resource_start(dev, 0);
> > - if (!base)
> > - return -ENOMEM;
> > -
> > init_completion(&ipcdev.cmd_complete);
> >
> > - if (request_irq(dev->irq, ioc, 0, "intel_scu_ipc",
> > &ipcdev))
> > - return -EBUSY;
> > + err = devm_request_irq(&dev->dev, dev->irq, ioc, 0,
> > "intel_scu_ipc",
>
> You switched to using pci_name(dev) above, seems to me the same
> rationale should
> apply here. Any reason not to use pci_name(dev) here instead of
> "intel_scu_ipc"?
>
> Thanks,
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
prev parent reply other threads:[~2015-10-12 8:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 14:11 [PATCH 1/5] intel_scu_ipc: fix error path by turning to devm_* / pcim_* Andy Shevchenko
2015-10-09 14:11 ` [PATCH 2/5] intel_scu_ipc: propagate struct intel_scu_ipc_dev Andy Shevchenko
2015-10-09 14:11 ` [PATCH 3/5] intel_scu_ipc: convert to use struct device * Andy Shevchenko
2015-10-09 14:11 ` [PATCH 4/5] intel_scu_ipc: switch to use module_pci_driver() macro Andy Shevchenko
2015-10-11 4:39 ` Darren Hart
2015-10-09 14:11 ` [PATCH 5/5] intel_scu_ipc: move ipclock to struct intel_scu_ipc_dev Andy Shevchenko
2015-10-09 15:21 ` Andy Shevchenko
2015-10-11 4:43 ` Darren Hart
2015-10-12 8:02 ` Andy Shevchenko
2015-10-11 4:21 ` [PATCH 1/5] intel_scu_ipc: fix error path by turning to devm_* / pcim_* Darren Hart
2015-10-12 8:00 ` 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=1444636842.8361.555.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dvhart@infradead.org \
--cc=platform-driver-x86@vger.kernel.org \
/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