Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1714873 > unrolled thread
| Started by | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| First post | 2017-08-18 14:30 +0200 |
| Last post | 2017-08-22 11:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC v1 2/6] platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-18 14:30 +0200
Re: [RFC v1 2/6] platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe sathya <sathyaosid@gmail.com> - 2017-08-22 07:10 +0200
Re: [RFC v1 2/6] platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-22 11:50 +0200
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-08-18 14:30 +0200 |
| Subject | Re: [RFC v1 2/6] platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe |
| Message-ID | <ufOzx-3Ek-27@gated-at.bofh.it> |
On Tue, Aug 1, 2017 at 9:13 PM,
<sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
>
> This patch cleans up unnecessary free/alloc calls in this driver
> by using devm_* calls.
> static int ipc_plat_remove(struct platform_device *pdev)
> {
> - struct resource *res;
> -
> sysfs_remove_group(&pdev->dev.kobj, &intel_ipc_group);
> - free_irq(ipcdev.irq, &ipcdev);
Can we get an IRQ at any time here?
> platform_device_unregister(ipcdev.tco_dev);
> platform_device_unregister(ipcdev.punit_dev);
> platform_device_unregister(ipcdev.telemetry_dev);
> ipcdev.dev = NULL;
> return 0;
> }
--
With Best Regards,
Andy Shevchenko
[toc] | [next] | [standalone]
| From | sathya <sathyaosid@gmail.com> |
|---|---|
| Date | 2017-08-22 07:10 +0200 |
| Message-ID | <uh9BU-694-17@gated-at.bofh.it> |
| In reply to | #1714873 |
Hi,
On 08/18/2017 05:24 AM, Andy Shevchenko wrote:
> On Tue, Aug 1, 2017 at 9:13 PM,
> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
>> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
>>
>> This patch cleans up unnecessary free/alloc calls in this driver
>> by using devm_* calls.
>> static int ipc_plat_remove(struct platform_device *pdev)
>> {
>> - struct resource *res;
>> -
>> sysfs_remove_group(&pdev->dev.kobj, &intel_ipc_group);
>> - free_irq(ipcdev.irq, &ipcdev);
> Can we get an IRQ at any time here?
Yes, if the ipc_plat_probe() is successful then ipcdev.irq will have
valid IRQ in all cases.
>
>> platform_device_unregister(ipcdev.tco_dev);
>> platform_device_unregister(ipcdev.punit_dev);
>> platform_device_unregister(ipcdev.telemetry_dev);
>> ipcdev.dev = NULL;
>> return 0;
>> }
>
-
Sathya
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-08-22 11:50 +0200 |
| Message-ID | <uhdYT-uT-29@gated-at.bofh.it> |
| In reply to | #1717026 |
On Tue, Aug 22, 2017 at 8:05 AM, sathya <sathyaosid@gmail.com> wrote:
> On 08/18/2017 05:24 AM, Andy Shevchenko wrote:
>> On Tue, Aug 1, 2017 at 9:13 PM,
>> <sathyanarayanan.kuppuswamy@linux.intel.com> wrote:
>>> This patch cleans up unnecessary free/alloc calls in this driver
>>> by using devm_* calls.
>>> static int ipc_plat_remove(struct platform_device *pdev)
>>> {
>>> - struct resource *res;
>>> -
>>> sysfs_remove_group(&pdev->dev.kobj, &intel_ipc_group);
>>> - free_irq(ipcdev.irq, &ipcdev);
>>
>> Can we get an IRQ at any time here?
>
> Yes, if the ipc_plat_probe() is successful then ipcdev.irq will have valid
> IRQ in all cases.
...which effectively means you can't remove free_irq() here. OTOH you
may replace it by explicit devm_free_irq() call.
>>> platform_device_unregister(ipcdev.tco_dev);
>>> platform_device_unregister(ipcdev.punit_dev);
>>> platform_device_unregister(ipcdev.telemetry_dev);
>>> ipcdev.dev = NULL;
>>> return 0;
>>> }
--
With Best Regards,
Andy Shevchenko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web