Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1566729
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [char-misc-next V2] mei: simplify error handling via devres function. |
| Date | 2017-01-25 17:30 +0100 |
| Message-ID | <t3yCl-43o-5@gated-at.bofh.it> (permalink) |
| References | <t3xPZ-3w9-47@gated-at.bofh.it> |
| Organization | Intel Finland Oy |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[char-misc-next V2] mei: simplify error handling via devres function. Tomas Winkler <tomas.winkler@intel.com> - 2017-01-25 16:40 +0100 Re: [char-misc-next V2] mei: simplify error handling via devres function. Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-25 17:30 +0100
csiph-web