* [PATCH 06/10] net: hns: use to_platform_device() [not found] <a554e6af3a3528c2206c94dab62b7800f96caa4b.1451221174.git.geliangtang@163.com> @ 2015-12-27 13:15 ` Geliang Tang 2015-12-27 13:23 ` Andy Shevchenko 2015-12-29 20:47 ` David Miller 0 siblings, 2 replies; 4+ messages in thread From: Geliang Tang @ 2015-12-27 13:15 UTC (permalink / raw) To: David S. Miller, Yisen Zhuang, yankejian, huangdaode Cc: Geliang Tang, netdev, linux-kernel Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> --- 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); bool is_ver1 = AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver); for (i = 0; i < ring_num; i++) { -- 2.5.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 06/10] net: hns: use to_platform_device() 2015-12-27 13:15 ` [PATCH 06/10] net: hns: use to_platform_device() Geliang Tang @ 2015-12-27 13:23 ` Andy Shevchenko 2015-12-27 17:03 ` Geliang Tang 2015-12-29 20:47 ` David Miller 1 sibling, 1 reply; 4+ messages in thread From: Andy Shevchenko @ 2015-12-27 13:23 UTC (permalink / raw) To: Geliang Tang Cc: David S. Miller, Yisen Zhuang, yankejian, huangdaode, netdev, linux-kernel@vger.kernel.org On Sun, Dec 27, 2015 at 3:15 PM, Geliang Tang <geliangtang@163.com> wrote: > Use to_platform_device() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> > --- > 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. > bool is_ver1 = AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver); > > for (i = 0; i < ring_num; i++) { > -- > 2.5.0 > > > -- > 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/ -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 06/10] net: hns: use to_platform_device() 2015-12-27 13:23 ` Andy Shevchenko @ 2015-12-27 17:03 ` Geliang Tang 0 siblings, 0 replies; 4+ messages in thread From: Geliang Tang @ 2015-12-27 17:03 UTC (permalink / raw) To: Andy Shevchenko Cc: David S. Miller, Yisen Zhuang, yankejian, huangdaode, netdev, linux-kernel@vger.kernel.org On Sun, Dec 27, 2015 at 03:23:30PM +0200, Andy Shevchenko wrote: > On Sun, Dec 27, 2015 at 3:15 PM, Geliang Tang <geliangtang@163.com> wrote: > > Use to_platform_device() instead of open-coding it. > > > > Signed-off-by: Geliang Tang <geliangtang@163.com> > > --- > > 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 06/10] net: hns: use to_platform_device() 2015-12-27 13:15 ` [PATCH 06/10] net: hns: use to_platform_device() Geliang Tang 2015-12-27 13:23 ` Andy Shevchenko @ 2015-12-29 20:47 ` David Miller 1 sibling, 0 replies; 4+ messages in thread From: David Miller @ 2015-12-29 20:47 UTC (permalink / raw) To: geliangtang; +Cc: yisen.zhuang, yankejian, huangdaode, netdev, linux-kernel From: Geliang Tang <geliangtang@163.com> Date: Sun, 27 Dec 2015 21:15:44 +0800 > Use to_platform_device() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> Applied. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-29 20:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <a554e6af3a3528c2206c94dab62b7800f96caa4b.1451221174.git.geliangtang@163.com>
2015-12-27 13:15 ` [PATCH 06/10] net: hns: use to_platform_device() Geliang Tang
2015-12-27 13:23 ` Andy Shevchenko
2015-12-27 17:03 ` Geliang Tang
2015-12-29 20:47 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).