net: netx-eth: remove unnecessary casting when using dev_get_platdata()
Subsystems (2)
PATCH 1/1 net: netx-eth: remove unnecessary casting when using dev_get_platdata()
Casting from 'void *' is unnecessary when using dev_get_platdata().
Reported-by Sergei Shtylyov <[email protected]>
Signed-off-by Jingoo Han <[email protected]>
--- drivers/net/ethernet/netx-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/netx-eth.c +1 -1
@@ -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" );
Signature · 1 line
1.7.10.4
Hello.
Quoted 1 line · Jingoo Han
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.
Quoted 2 lines
Reported-by Sergei Shtylyov <[email protected]>Signed-off-by Jingoo Han <[email protected]>
WBR, Sergei
PATCH v2 1/1 net: netx-eth: remove unnecessary casting
In reply to Jingoo HanCasting from 'void *' is unnecessary, because casting from 'void *' to any pointer type is automatic.
Reported-by Sergei Shtylyov <[email protected]>
Signed-off-by Jingoo Han <[email protected]>
--- drivers/net/ethernet/netx-eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/netx-eth.c +1 -1
@@ -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" );
Signature · 1 line
1.7.10.4
Re: [PATCH V2] net: netx-eth: remove unnecessary casting
From: Jingoo Han <[email protected]>
Date: Tue, 03 Sep 2013 08:54:04 +0900
Quoted 5 lines
Casting from 'void *' is unnecessary, because casting from 'void *' to any pointer type is automatic.
Reported-by Sergei Shtylyov <[email protected]>Signed-off-by Jingoo Han <[email protected]>
Applied.