Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933773Ab3CLWfe (ORCPT ); Tue, 12 Mar 2013 18:35:34 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:55186 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933712Ab3CLWfc (ORCPT ); Tue, 12 Mar 2013 18:35:32 -0400 MIME-Version: 1.0 In-Reply-To: <1363115431.2125.13.camel@joe-AO722> References: <1363113035-11269-1-git-send-email-silviupopescu1990@gmail.com> <1363115431.2125.13.camel@joe-AO722> Date: Wed, 13 Mar 2013 00:35:31 +0200 Message-ID: Subject: Re: [PATCH] ethernet: nxp: use resource_size() From: Silviu Popescu To: Joe Perches Cc: netdev@vger.kernel.org, davem@davemloft.net, stigge@antcom.de, edumazet@google.com, gregkh@linuxfoundation.org, jiri@resnulli.us, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1090 Lines: 29 On Tue, Mar 12, 2013 at 9:10 PM, Joe Perches 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/