Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550356

Re: [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and pci_dev for pci device

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and pci_dev for pci device
Date 2017-01-04 02:40 +0100
Message-ID <sVIIx-69g-3@gated-at.bofh.it> (permalink)
References (1 earlier) <sVyzw-7Iz-9@gated-at.bofh.it> <sVG41-4nb-7@gated-at.bofh.it> <sVH05-4YR-7@gated-at.bofh.it> <sVH05-4YR-19@gated-at.bofh.it> <sVH9L-522-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 01/03/2017 03:50 PM, Andy Shevchenko wrote:
> On Wed, Jan 4, 2017 at 1:48 AM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>> On Wed, Jan 4, 2017 at 1:40 AM, Guenter Roeck <linux@roeck-us.net> wrote:
>>> On Wed, Jan 04, 2017 at 12:39:59AM +0200, Andy Shevchenko wrote:
>>>> On Tue, Jan 3, 2017 at 4:39 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>>>>> Use pdev for struct platform_device, pcidev for struct pci_dev, and dev
>>>>> for struct device variables to improve consistency.
>>>>>
>>>>> Remove 'struct platform_device *dev;' from struct iTCO_wdt_private since
>>>>> it was unused.
>>>>
>>>> Would pci_dev work?
>>>>
>>> Sure, or maybe just 'pci'. Any preference ?
>>
>> Just slightly prefer pci_dev over others (pcidev, pci), but do not
>> insist. Up to you.
>
> Or even
>
> struct device *dev;
> ...
> struct pci_dev *pci_dev = to_pci_dev(dev);
>

'dev' would have to be a pointer to the parent device. If I consider using
dev_{info,err}, I'll need 'dev' in struct iTCO_wdt_private. I think I'll
stick with pci_dev.

Thanks,
Guenter

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] watchdog: iTCO_wdt: Use allocated data structures Guenter Roeck <linux@roeck-us.net> - 2017-01-03 15:50 +0100
  [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and pci_dev for pci device Guenter Roeck <linux@roeck-us.net> - 2017-01-03 15:50 +0100
    Re: [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and  pci_dev for pci device Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-03 23:50 +0100
      Re: [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and  pci_dev for pci device Guenter Roeck <linux@roeck-us.net> - 2017-01-04 00:50 +0100
        Re: [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and  pci_dev for pci device Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-04 00:50 +0100
          Re: [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and  pci_dev for pci device Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-04 01:00 +0100
            Re: [PATCH 3/4] watchdog: iTCO_wdt: Use pdev for platform device and  pci_dev for pci device Guenter Roeck <linux@roeck-us.net> - 2017-01-04 02:40 +0100
  [PATCH 2/4] watchdog: iTCO_wdt: Use device managed resources Guenter Roeck <linux@roeck-us.net> - 2017-01-03 15:50 +0100
    Re: [PATCH 2/4] watchdog: iTCO_wdt: Use device managed resources Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-03 23:50 +0100
      Re: [PATCH 2/4] watchdog: iTCO_wdt: Use device managed resources Guenter Roeck <linux@roeck-us.net> - 2017-01-04 00:40 +0100
      Re: [PATCH 2/4] watchdog: iTCO_wdt: Use device managed resources Guenter Roeck <linux@roeck-us.net> - 2017-01-04 03:50 +0100
  Re: [PATCH 1/4] watchdog: iTCO_wdt: Use allocated data structures Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-01-03 23:50 +0100

csiph-web