lkml.org 
[lkml]   [2014]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] lpc_eth: Use resource_size instead of computation
From
Date
On Wed, 2014-05-28 at 17:14 +0200, Benoit Taine wrote:
> This issue was reported by coccicheck using the semantic patch
> at scripts/coccinelle/api/resource_size.cocci

Slightly associated trivial note:

> diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c
[]
> @@ -1419,8 +1419,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
>
> netdev_dbg(ndev, "IO address start :0x%08x\n",
> res->start);
> - netdev_dbg(ndev, "IO address size :%d\n",
> - res->end - res->start + 1);
> + netdev_dbg(ndev, "IO address size :%d\n", resource_size(res));

May be better using:

netdev_dbg(ndev, "IO :%pR\n", res)




\
 
 \ /
  Last update: 2014-05-28 19:41    [W:0.100 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site