linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] net: use platform_{get,set}_drvdata()
@ 2013-08-15 13:01 Libo Chen
  2013-08-15 22:23 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Libo Chen @ 2013-08-15 13:01 UTC (permalink / raw)
  To: David Miller
  Cc: Sergei Shtylyov, Greg KH, netdev, jg1.han, Li Zefan, vbordug,
	linuxppc-dev

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

changelog v3:
	remove modify about dev_set_drvdata()
changelog v2:
	this version add modify record about dev_set_drvdata().

Libo Chen (7):
  net: fsl_pq_mdio: use platform_{get,set}_drvdata()
  net: ucc_geth: use platform_{get,set}_drvdata()
  net: fec_mpc52xx_phy: use platform_{get,set}_drvdata()
  net: sunbmac: use platform_{get,set}_drvdata()
  net: sunhme: use platform_{get,set}_drvdata()
  net: xilinx_emaclite: use platform_{get,set}_drvdata()
  net: davinci_mdio: use platform_{get,set}_drvdata()

 drivers/net/ethernet/freescale/fec_mpc52xx_phy.c |    3 +--
 drivers/net/ethernet/freescale/fsl_pq_mdio.c     |    2 +-
 drivers/net/ethernet/freescale/ucc_geth.c        |    3 +--
 drivers/net/ethernet/sun/sunbmac.c               |    2 +-
 drivers/net/ethernet/sun/sunhme.c                |    6 +++---
 drivers/net/ethernet/ti/davinci_mdio.c           |    3 +--
 drivers/net/ethernet/xilinx/xilinx_emaclite.c    |    3 +--
 7 files changed, 9 insertions(+), 13 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/7] net: use platform_{get,set}_drvdata()
  2013-08-15 13:01 [PATCH v3 0/7] net: use platform_{get,set}_drvdata() Libo Chen
@ 2013-08-15 22:23 ` David Miller
  2013-08-15 22:39   ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2013-08-15 22:23 UTC (permalink / raw)
  To: clbchenlibo.chen
  Cc: sergei.shtylyov, gregkh, netdev, jg1.han, lizefan, vbordug,
	linuxppc-dev

From: Libo Chen <clbchenlibo.chen@huawei.com>
Date: Thu, 15 Aug 2013 21:01:17 +0800

> Use the wrapper functions for getting and setting the driver data using
> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
> so we can directly pass a struct platform_device.
> 
> changelog v3:
> 	remove modify about dev_set_drvdata()
> changelog v2:
> 	this version add modify record about dev_set_drvdata().

Series applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/7] net: use platform_{get,set}_drvdata()
  2013-08-15 22:23 ` David Miller
@ 2013-08-15 22:39   ` David Miller
  2013-08-15 22:51     ` Sergei Shtylyov
  2013-08-16  2:15     ` Libo Chen
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2013-08-15 22:39 UTC (permalink / raw)
  To: clbchenlibo.chen
  Cc: sergei.shtylyov, gregkh, netdev, jg1.han, lizefan, vbordug,
	linuxppc-dev

RnJvbTogRGF2aWQgTWlsbGVyIDxkYXZlbUBkYXZlbWxvZnQubmV0Pg0KRGF0ZTogVGh1LCAxNSBB
dWcgMjAxMyAxNToyMzo1OSAtMDcwMCAoUERUKQ0KDQo+IEZyb206IExpYm8gQ2hlbiA8Y2xiY2hl
bmxpYm8uY2hlbkBodWF3ZWkuY29tPg0KPiBEYXRlOiBUaHUsIDE1IEF1ZyAyMDEzIDIxOjAxOjE3
ICswODAwDQo+IA0KPj4gVXNlIHRoZSB3cmFwcGVyIGZ1bmN0aW9ucyBmb3IgZ2V0dGluZyBhbmQg
c2V0dGluZyB0aGUgZHJpdmVyIGRhdGEgdXNpbmcNCj4+IHBsYXRmb3JtX2RldmljZSBpbnN0ZWFk
IG9mIHVzaW5nIGRldl97Z2V0LHNldH1fZHJ2ZGF0YSgpIHdpdGggJnBkZXYtPmRldiwNCj4+IHNv
IHdlIGNhbiBkaXJlY3RseSBwYXNzIGEgc3RydWN0IHBsYXRmb3JtX2Rldm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BjYXN0IFtlbmFibGVkIGJ5IGRlZmF1bHRdDQo=

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/7] net: use platform_{get,set}_drvdata()
  2013-08-15 22:39   ` David Miller
@ 2013-08-15 22:51     ` Sergei Shtylyov
  2013-08-15 23:04       ` Sergei Shtylyov
  2013-08-16  2:15     ` Libo Chen
  1 sibling, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2013-08-15 22:51 UTC (permalink / raw)
  To: David Miller, clbchenlibo.chen
  Cc: gregkh, netdev, jg1.han, lizefan, vbordug, linuxppc-dev

Hello.

On 08/16/2013 02:39 AM, David Miller wrote:

>> From: Libo Chen <clbchenlibo.chen@huawei.com>
>> Date: Thu, 15 Aug 2013 21:01:17 +0800

>>> Use the wrapper functions for getting and setting the driver data using
>>> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
>>> so we can directly pass a struct platform_device.

>>> changelog v3:
>>> 	remove modify about dev_set_drvdata()
>>> changelog v2:
>>> 	this version add modify record about dev_set_drvdata().

>> Series applied.

> Actually, I had to revert, these patches break the build.

> drivers/net/ethernet/sun/sunhme.c: In function ‘happy_meal_pci_probe’:
> drivers/net/ethernet/sun/sunhme.c:3114:2: error: implicit declaration of function ‘platform_set_drvdata’ [-Werror=implicit-function-declaration]
> drivers/net/ethernet/sun/sunhme.c: In function ‘happy_meal_pci_remove’:
> drivers/net/ethernet/sun/sunhme.c:3162:9: error: implicit declaration of function ‘platform_get_drvdata’ [-Werror=implicit-function-declaration]
> drivers/net/ethernet/sun/sunhme.c:3162:26: warning: initialization makes pointer from integer without a cast [enabled by default]

    Hm, patch #5 was clearly defective as it tried to call 
platform_{get|set}_drvdata() on PCI devices -- I've read the patch but 
overlooked that. And the driver lacks #include <linux/platform_device.h>, so 
I'm not sure it always compiled flawlessly.

WBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/7] net: use platform_{get,set}_drvdata()
  2013-08-15 22:51     ` Sergei Shtylyov
@ 2013-08-15 23:04       ` Sergei Shtylyov
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2013-08-15 23:04 UTC (permalink / raw)
  To: David Miller, clbchenlibo.chen
  Cc: gregkh, netdev, jg1.han, lizefan, vbordug, linuxppc-dev

On 08/16/2013 02:51 AM, Sergei Shtylyov wrote:

>>> From: Libo Chen <clbchenlibo.chen@huawei.com>
>>> Date: Thu, 15 Aug 2013 21:01:17 +0800

>>>> Use the wrapper functions for getting and setting the driver data using
>>>> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
>>>> so we can directly pass a struct platform_device.

>>>> changelog v3:
>>>>     remove modify about dev_set_drvdata()
>>>> changelog v2:
>>>>     this version add modify record about dev_set_drvdata().

>>> Series applied.

>> Actually, I had to revert, these patches break the build.

>> drivers/net/ethernet/sun/sunhme.c: In function ‘happy_meal_pci_probe’:
>> drivers/net/ethernet/sun/sunhme.c:3114:2: error: implicit declaration of
>> function ‘platform_set_drvdata’ [-Werror=implicit-function-declaration]
>> drivers/net/ethernet/sun/sunhme.c: In function ‘happy_meal_pci_remove’:
>> drivers/net/ethernet/sun/sunhme.c:3162:9: error: implicit declaration of
>> function ‘platform_get_drvdata’ [-Werror=implicit-function-declaration]
>> drivers/net/ethernet/sun/sunhme.c:3162:26: warning: initialization makes
>> pointer from integer without a cast [enabled by default]

>     Hm, patch #5 was clearly defective as it tried to call
> platform_{get|set}_drvdata() on PCI devices -- I've read the patch but
> overlooked that. And the driver lacks #include <linux/platform_device.h>, so
> I'm not sure it always compiled flawlessly.

    Ah, the platform code is protected by #ifdef CONFIG_SBUS... probably some 
header #include's <linux/platform_device.h>?

WBR, Sergei

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 0/7] net: use platform_{get,set}_drvdata()
  2013-08-15 22:39   ` David Miller
  2013-08-15 22:51     ` Sergei Shtylyov
@ 2013-08-16  2:15     ` Libo Chen
  1 sibling, 0 replies; 6+ messages in thread
From: Libo Chen @ 2013-08-16  2:15 UTC (permalink / raw)
  To: David Miller
  Cc: sergei.shtylyov, gregkh, netdev, jg1.han, lizefan, vbordug,
	linuxppc-dev

On 2013/8/16 6:39, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Thu, 15 Aug 2013 15:23:59 -0700 (PDT)
> 
>> From: Libo Chen <clbchenlibo.chen@huawei.com>
>> Date: Thu, 15 Aug 2013 21:01:17 +0800
>>
>>> Use the wrapper functions for getting and setting the driver data using
>>> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
>>> so we can directly pass a struct platform_device.
>>>
>>> changelog v3:
>>> 	remove modify about dev_set_drvdata()
>>> changelog v2:
>>> 	this version add modify record about dev_set_drvdata().
>>
>> Series applied.
> 
> Actually, I had to revert, these patches break the build.
> 
> drivers/net/ethernet/sun/sunhme.c: In function ‘happy_meal_pci_probe’:
> drivers/net/ethernet/sun/sunhme.c:3114:2: error: implicit declaration of function ‘platform_set_drvdata’ [-Werror=implicit-function-declaration]
> drivers/net/ethernet/sun/sunhme.c: In function ‘happy_meal_pci_remove’:
> drivers/net/ethernet/sun/sunhme.c:3162:9: error: implicit declaration of function ‘platform_get_drvdata’ [-Werror=implicit-function-declaration]
> drivers/net/ethernet/sun/sunhme.c:3162:26: warning: initialization makes pointer from integer without a cast [enabled by default]
> 


oh, it is my fault, I will update!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-16  2:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 13:01 [PATCH v3 0/7] net: use platform_{get,set}_drvdata() Libo Chen
2013-08-15 22:23 ` David Miller
2013-08-15 22:39   ` David Miller
2013-08-15 22:51     ` Sergei Shtylyov
2013-08-15 23:04       ` Sergei Shtylyov
2013-08-16  2:15     ` Libo Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).