lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPWTe+JhUJBsCLekeADe4FesC95nYh16XHrj0cOk97JfnjF49g@mail.gmail.com>
Date:	Wed, 13 Mar 2013 00:35:31 +0200
From:	Silviu Popescu <silviupopescu1990@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net, stigge@...com.de,
	edumazet@...gle.com, gregkh@...uxfoundation.org, jiri@...nulli.us,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ethernet: nxp: use resource_size()

On Tue, Mar 12, 2013 at 9:10 PM, Joe Perches <joe@...ches.com> wrote:
> On Tue, 2013-03-12 at 20:30 +0200, Silviu-Mihai Popescu wrote:
>> Use resource_size() instead of explicit calculation. This was found via
>> make coccicheck.
> []
>> diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c
> []
>> @@ -1421,7 +1421,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);
>> +                     resource_size(res));
>
> This might be better as
>
>         netdev_dbg(ndev, "IO resource    :%pR\n", res);
>
>

Thanks for the review. I've refreshed the patch and sent it again.

-- 
Silviu Popescu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ