Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752352AbdCPO2R convert rfc822-to-8bit (ORCPT ); Thu, 16 Mar 2017 10:28:17 -0400 Received: from smtp-out6.electric.net ([192.162.217.188]:51631 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbdCPO2P (ORCPT ); Thu, 16 Mar 2017 10:28:15 -0400 From: David Laight To: "'Hayes Wang'" , "netdev@vger.kernel.org" CC: "nic_swsd@realtek.com" , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: RE: [PATCH net-next] r8152: simply the arguments Thread-Topic: [PATCH net-next] r8152: simply the arguments Thread-Index: AQHSnh6ABe1sQXPSR0SS5nuMXefGeKGXhkQQ Date: Thu, 16 Mar 2017 14:28:07 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFB29DA@AcuExch.aculab.com> References: <1394712342-15778-253-Taiwan-albertk@realtek.com> In-Reply-To: <1394712342-15778-253-Taiwan-albertk@realtek.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1218 Lines: 38 From: Hayes Wang > Sent: 16 March 2017 06:28 > Replace &tp->napi with napi and tp->netdev with netdev. > > Signed-off-by: Hayes Wang > --- > drivers/net/usb/r8152.c | 44 +++++++++++++++++++++++++++----------------- > 1 file changed, 27 insertions(+), 17 deletions(-) > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index 227e1fd..e480e9f 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -1761,6 +1761,7 @@ static int rx_bottom(struct r8152 *tp, int budget) > unsigned long flags; > struct list_head *cursor, *next, rx_queue; > int ret = 0, work_done = 0; > + struct napi_struct *napi = &tp->napi; > > if (!skb_queue_empty(&tp->rx_queue)) { > while (work_done < budget) { > @@ -1773,7 +1774,7 @@ static int rx_bottom(struct r8152 *tp, int budget) > break; > > pkt_len = skb->len; > - napi_gro_receive(&tp->napi, skb); > + napi_gro_receive(napi, skb); ... I'm not sure this makes the code any more readable. It isn't even needed to shorten any long lines. If you are really lucky the compiler will optimise it away. Otherwise it will generate another local variable and possibly a register spill to stack. David