Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbbL0RFv (ORCPT ); Sun, 27 Dec 2015 12:05:51 -0500 Received: from m50-134.163.com ([123.125.50.134]:51469 "EHLO m50-134.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbbL0RFu (ORCPT ); Sun, 27 Dec 2015 12:05:50 -0500 Date: Mon, 28 Dec 2015 01:03:08 +0800 From: Geliang Tang To: Andy Shevchenko Cc: "David S. Miller" , Yisen Zhuang , yankejian , huangdaode , netdev , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 06/10] net: hns: use to_platform_device() Message-ID: <20151227170308.GA11778@bogon> References: <0801535a0c35424d2fd2e91f6ed58058d884e147.1451221174.git.geliangtang@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-CM-TRANSID: DtGowECJWUTSGYBWvUKkAA--.1063S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7KF4UuFWruryDZFW3ZryxKrg_yoW8XF13pF WrJay7KF48GrWUuw1xWw4jvFZ8uanxt3WFgr1UC3WF93sxZrn5Xry3tr18GFs5trZrC3yI v3Wjyw4xu3Zxu3JanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jOb18UUUUU= X-Originating-IP: [116.77.145.148] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/xtbByhTdmVO+g0qNRgAAs1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1764 Lines: 42 On Sun, Dec 27, 2015 at 03:23:30PM +0200, Andy Shevchenko wrote: > On Sun, Dec 27, 2015 at 3:15 PM, Geliang Tang wrote: > > Use to_platform_device() instead of open-coding it. > > > > Signed-off-by: Geliang Tang > > --- > > drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c > > index 8c30cec..d2263c7 100644 > > --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c > > +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c > > @@ -499,8 +499,7 @@ void hns_rcb_get_cfg(struct rcb_common_cb *rcb_common) > > int base_irq_idx = hns_rcb_get_base_irq_idx(rcb_common); > > struct device_node *np = rcb_common->dsaf_dev->dev->of_node; > > struct platform_device *pdev = > > - container_of(rcb_common->dsaf_dev->dev, > > - struct platform_device, dev); > > + to_platform_device(rcb_common->dsaf_dev->dev); > > Can it be one line after all? Please, check this for all your patches > of such kind. > Thanks for your review. It's over 80 characters in one line: WARNING: line over 80 characters #22: FILE: drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c:501: + struct platform_device *pdev = to_platform_device(rcb_common->dsaf_dev->dev); total: 0 errors, 1 warnings, 0 checks, 10 lines checked Geliang -- 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/