* [PATCH] net: netx-eth: remove unnecessary casting when using dev_get_platdata()
@ 2013-09-02 0:37 Jingoo Han
2013-09-02 21:01 ` Sergei Shtylyov
2013-09-02 23:54 ` [PATCH V2] net: netx-eth: remove unnecessary casting Jingoo Han
0 siblings, 2 replies; 4+ messages in thread
From: Jingoo Han @ 2013-09-02 0:37 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Sergei Shtylyov', 'Jingoo Han'
Casting from 'void *' is unnecessary when using dev_get_platdata().
Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/netx-eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/netx-eth.c b/drivers/net/ethernet/netx-eth.c
index 235fd51..e6f0a43 100644
--- a/drivers/net/ethernet/netx-eth.c
+++ b/drivers/net/ethernet/netx-eth.c
@@ -390,7 +390,7 @@ static int netx_eth_drv_probe(struct platform_device *pdev)
priv = netdev_priv(ndev);
- pdata = (struct netxeth_platform_data *)dev_get_platdata(&pdev->dev);
+ pdata = dev_get_platdata(&pdev->dev);
priv->xc = request_xc(pdata->xcno, &pdev->dev);
if (!priv->xc) {
dev_err(&pdev->dev, "unable to request xc engine\n");
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: netx-eth: remove unnecessary casting when using dev_get_platdata()
2013-09-02 0:37 [PATCH] net: netx-eth: remove unnecessary casting when using dev_get_platdata() Jingoo Han
@ 2013-09-02 21:01 ` Sergei Shtylyov
2013-09-02 23:54 ` [PATCH V2] net: netx-eth: remove unnecessary casting Jingoo Han
1 sibling, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2013-09-02 21:01 UTC (permalink / raw)
To: Jingoo Han; +Cc: 'David S. Miller', netdev
Hello.
On 09/02/2013 04:37 AM, Jingoo Han wrote:
> Casting from 'void *' is unnecessary when using dev_get_platdata().
dev_get_platdata() is irrelevant here. Casting from/to 'void *' to/from
any pointer type is just automatic.
> Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] net: netx-eth: remove unnecessary casting
2013-09-02 0:37 [PATCH] net: netx-eth: remove unnecessary casting when using dev_get_platdata() Jingoo Han
2013-09-02 21:01 ` Sergei Shtylyov
@ 2013-09-02 23:54 ` Jingoo Han
2013-09-04 4:53 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2013-09-02 23:54 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, 'Sergei Shtylyov', 'Jingoo Han'
Casting from 'void *' is unnecessary, because casting from 'void *'
to any pointer type is automatic.
Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/ethernet/netx-eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/netx-eth.c b/drivers/net/ethernet/netx-eth.c
index 235fd51..e6f0a43 100644
--- a/drivers/net/ethernet/netx-eth.c
+++ b/drivers/net/ethernet/netx-eth.c
@@ -390,7 +390,7 @@ static int netx_eth_drv_probe(struct platform_device *pdev)
priv = netdev_priv(ndev);
- pdata = (struct netxeth_platform_data *)dev_get_platdata(&pdev->dev);
+ pdata = dev_get_platdata(&pdev->dev);
priv->xc = request_xc(pdata->xcno, &pdev->dev);
if (!priv->xc) {
dev_err(&pdev->dev, "unable to request xc engine\n");
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] net: netx-eth: remove unnecessary casting
2013-09-02 23:54 ` [PATCH V2] net: netx-eth: remove unnecessary casting Jingoo Han
@ 2013-09-04 4:53 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-09-04 4:53 UTC (permalink / raw)
To: jg1.han; +Cc: netdev, sergei.shtylyov
From: Jingoo Han <jg1.han@samsung.com>
Date: Tue, 03 Sep 2013 08:54:04 +0900
> Casting from 'void *' is unnecessary, because casting from 'void *'
> to any pointer type is automatic.
>
> Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-04 4:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-02 0:37 [PATCH] net: netx-eth: remove unnecessary casting when using dev_get_platdata() Jingoo Han
2013-09-02 21:01 ` Sergei Shtylyov
2013-09-02 23:54 ` [PATCH V2] net: netx-eth: remove unnecessary casting Jingoo Han
2013-09-04 4:53 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.