Message ID | 20230525083824.526627-1-wei.fang@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp214554vqr; Thu, 25 May 2023 01:55:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ40TQ4btKVF33lW2cLedNsUJVgYMUSyMOThEGMzkjCUC8szC94e6TECm42JsUQQTrmXIouc X-Received: by 2002:a17:902:bc82:b0:1aa:fd48:f5e2 with SMTP id bb2-20020a170902bc8200b001aafd48f5e2mr810964plb.32.1685004943958; Thu, 25 May 2023 01:55:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685004943; cv=pass; d=google.com; s=arc-20160816; b=HoTLG04KgYkgz8D02CwdSDqyPkXSOP4NFT2OOdycfdg5370bge+zNQ/6Qglim1anrZ FcmXOIagP9ozxhhHYtihtbjgJg3lnp7QQONFpr827HEjfrr0VLQXTCuF+JtxLGOdDHCo fJP5+7kA6N9JIevKWjmMiUZsLlaxwwElSec615sklcOS0v0h2Cvq3vwp3owO+PGoPC3/ caSrntjcaIqcJnJvr3Bzz9UjoIUy2ZW4DCdw20YzFlG81wC+9aRjA/YotEgOZ6x3WC7c i1Jd4szCDty8Ul85OucDYDlBeojuyIWG+jGIZqOFdVksQjfVJdB9NHnNu5BHkdAzvaPB mjIQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=z/8uxgSdL3l7/LRvYC73ji0Es39zv4Mj6qgR5rkZFR8=; b=rnDLHGuwkdbDbo3E/3dkI+udyLEBayTx2IwydyB7YNXCaS1QbqEXCrTKdDmE8Slxdd 4yyiIDT3FrAoNAeHVFzCcQ1O3tUQmuy/mS/x0/8aTyQTTMy8nU/0M9jJ+R+xSVyzmsK9 Ye/SmGR4SoeRTwSjIRHWIbPdkY0jsaoCQqrVbInR4Pj7Yl3rqEaUXaNTsxhxQmCU2YUi i2UerNybpGDXVdefOxPubRCrXMUCNlQqKd6CHo3YFi5bKsCenhbCe2Vgi5YlR5qsdgS1 ikfMIttoiqJS9QHxln02eL1K2cqtRRtVUAiWgJuQYEep7jcorPFQE1fdw3wlilwz0Orq /CEA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=i3WnR+Na; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a170902bd4500b001a691f376e8si985307plx.415.2023.05.25.01.55.31; Thu, 25 May 2023 01:55:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=i3WnR+Na; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240303AbjEYInJ (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Thu, 25 May 2023 04:43:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240290AbjEYInH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 25 May 2023 04:43:07 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2050.outbound.protection.outlook.com [40.107.8.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59FCC9E; Thu, 25 May 2023 01:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ml2uWa0mOJmc6mDcUSdsCJT+gNhfBte1Pg0DQcNco8pP350VzuaDdUHhZAvAHi2hS18xOydi2TqXePnv04ujI47tjJjPuOr9pKOctXzHdfdNxLc5WpPGRxei6kvnTMorUejniStOJMMOz4D3ZwZ4PiiKQ4WaRDVX1ieu5L2rLHwDOvWvhLt4j7an44yP6J/lFXvKopykoQaS7K94GYl/GR9jkbZ4zLIEFJBKXQL0719/MHIhmIKJEnuNEkELfPStU/fVnu8kMipW1jUh1dR+ea+txbFUgyRnfRPJrf45UHHQvi4tzSSb4300/GmywVf5DxR6yq4s7sWdpDk5OvQonA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z/8uxgSdL3l7/LRvYC73ji0Es39zv4Mj6qgR5rkZFR8=; b=d0+5gPRIeogQJRDpAMUE5IpRJIr2qDkzbTAis28C5qGWVS7ojOXejWJJfr9Q1na7Z9Uxw333GnEnHSF//ph5A91wOw0gtogS4h31tye3teyuEHgsUZeKNefo+R7/KVlMKv7ccp6xGzXB/n/4w1EUCPqNqESMt2b6/1d7CUeVrS97bytmrqAm3M0HOsuaoRvHXq5I4vOiecEzo4ILuKH4kpO4GuojNnFlc6jbjoyR45kcWqtDkizUF0xAPAMm35vCcLRwUODaY5sbBwIJRaSQEgfenYEm8Qj8CVyyWot6CS273zf0GOtexuhCAsMh5hUH3uRxjQzXs2z63hllTCYuLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z/8uxgSdL3l7/LRvYC73ji0Es39zv4Mj6qgR5rkZFR8=; b=i3WnR+NayA9wAMVfdpyqxExsrPeYkp+WP9hGooI7ogqgRQCxSMnBj0wsPQPcW4L8pZ1qitubQapeuRcje/59uvdOC6hSgrJklAzT1VTUlCZe7xVwZC2iSTktjXp/fZb7qzMuYRKVG3vzPaJhMAoSAtNBXbdpS+v4QfBvqtWWxxo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM5PR04MB3139.eurprd04.prod.outlook.com (2603:10a6:206:8::20) by PAXPR04MB8558.eurprd04.prod.outlook.com (2603:10a6:102:215::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.16; Thu, 25 May 2023 08:42:59 +0000 Received: from AM5PR04MB3139.eurprd04.prod.outlook.com ([fe80::682b:185:581f:7ea2]) by AM5PR04MB3139.eurprd04.prod.outlook.com ([fe80::682b:185:581f:7ea2%4]) with mapi id 15.20.6433.015; Thu, 25 May 2023 08:42:59 +0000 From: wei.fang@nxp.com To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shenwei.wang@nxp.com, xiaoning.wang@nxp.com, netdev@vger.kernel.org Cc: linux-imx@nxp.com, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame() Date: Thu, 25 May 2023 16:38:24 +0800 Message-Id: <20230525083824.526627-1-wei.fang@nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0054.apcprd02.prod.outlook.com (2603:1096:4:196::13) To AM5PR04MB3139.eurprd04.prod.outlook.com (2603:10a6:206:8::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM5PR04MB3139:EE_|PAXPR04MB8558:EE_ X-MS-Office365-Filtering-Correlation-Id: 53721ba4-b7d8-4b4d-d9ed-08db5cfc0b58 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zYA56Rjptc0rqlbgGPdlHhbXqd3gt1SoHQVxcKzzvn2FXQ4+1vtWgZTQ99NItZSCrYZVBOtoHWAVNzr0ntdFQXAEbAJ4QYlqA6B8uX2+zxCtJHpQWlDC5+8mnBHZCZwO24c23KgJLm+LUYwp9WLkLZYrYsmZiGkBIfJ8zdIXQT8LFHI8QZNtqRcfIMbHjGTjYOXy4q3Xjjqewn9xLH7KQ+slG4OsgQM3ip5Wx5bZMnzTyvXzkoTsBFr/jAcpknURgeG8KQclYjb/OFFyLQhatwUAID+X5iwgk6EJMDr59iVNaTD2QrJpJrRYgc93kwoGVJp7ze4uXgr0Nj+NrCr+J0PvViaOxHUdTtGCdsiP9f1MK9BCVJWGV9b6cF45qWgMCXl9lPP6kOwRHBLmvDxilnzHzBfMjnqDwC0iXmNXpQTGsXRJFUJ2rx0XesXyX3QMwrOHGjGi4w38oNtlVfdEr9a7+jfKjtS4LATgX0Q51t2KOPb+4JwRDaXGMaEyltJ3E8c6SpQPLReuTadVhBsbd7QekSQ+jfojryp+NdDmkQ7KFFH+7AbjEQkdM+ohzWul/7vp7SmFdjx6su+d8BARkkF/FS+8r+pgd2EC62ZcXIWPMghVhKe6+zLrtTd70yki X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM5PR04MB3139.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(376002)(136003)(366004)(396003)(346002)(451199021)(9686003)(6506007)(6512007)(1076003)(26005)(6486002)(52116002)(186003)(2616005)(86362001)(36756003)(478600001)(8676002)(8936002)(5660300002)(4326008)(316002)(66476007)(66556008)(66946007)(41300700001)(83380400001)(38350700002)(38100700002)(6666004)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AGBoNAp+b2hqC4LKEV4SzoL1KwjsAxYgh5ncttlvJ259Y2tBC1QjCT7JYDL9gE+HJ8nnBjdoaFUAFQcIkMk748xhUfmIhryTQ8zfUX0vHe4leFOybS+ds21csUDp4OzCi8T4Mzdu7YCvlw/URgMgcTpovU3fPs8svLwL5m05/sscWjCs6ZlfOslqClsCYWDvIvZOW55Ac+eyB6uEjF2r+EZhzTEbmCAeW5xHDWWoj1CxOKYGykJcQIFsVq7XsGL8JhBWOEngU91VmGsquoA9I9ZMNsPXdbUesGL5D/6IB+kzHxRapP6aluIPlZwngrTPcyK7jXwFCZivTaYxMiiaF6/63wNsQ0CKd1XgaP1pFUxZBvOq2Pf7puikHpRWRxiLSqAXYV/PKpcXM47MO/FrWpTDAmviOdntfQvBoRuKY5nruOJSq3GObgOm22kU6LuhJ+qyD8iF17FmqWZQ9ppfNWxuaP6SmzXi6p1xnXIBV0L8GTzNAzvje74gAU4Ob9GYyRbAmw9glgIZhbqdCIRbf4glWoHVBM4pHdtCJGnLA+L6Ek+M0a4Ml2dA5L/iuvm+airYrAlCRe/eL0kMUUtiyfq6IvAtuQypRd2nx3DGN8+xjl0LUeeh2YKijvBLrLLJW9MSkQ+N7WN/jW/mhGBNmO1e29wPY/qgT/6SMY8xrQHad8SZrRv6MeOjVJGg1ZG2abl4yINeTnHi7dRnXe6KGyBjXULKCqr6kkBJQCqsmyDyFlPMR07Gqv1sD/T6Ulma17OTlPpCfbcqBJyCR86nRP+QHLpeGss2z/8QuTHkqQRthh+8jfvTgM6sIWAVySs/FVz/uzc09G6EEeWF8Q5j+CQX3BcZtqvWHflAOd9/xjujbJG1MvLzxUQxYJGu5rHtKROMeIxsmNI86SgaM7sBOR8XumTDb5cRWvIZYOI3jDr7kGpWnRJerlJUALyRBNr1F3U9eDdAWx0emsXbHpoZPhVSwNLdWAdk271GJ+7L8ByUGDV5XPvQgNpRQ6EeSxkHVz0R6i8z04vaPDMyYZPbEEIQNPsmQQTzl5zwzpG74siYTv4rpLelgeZTqT/hhmf+GGtyEA04IlhPXCBTkeej17RZTYXa93y76fTik1YWFi6bbB+MaQmjWvF0TTXeozCFvJQKtXTwDXGeC6Ne17kSF0juNn8ie+8n652PvzYRZNyUS8R6PJT/RyJLi0c7SOajdkbEgkSZ72FUgcvfi1XuJef6/NgEheCwcUohaIvjPwlU1ILE57g+1j+76gMKPx4OBO4CflGO73+fQI21p3BubRJIXUTtKP/eWl722FyzFC54nBvn/B+Wih2GVxry8TiLXOmM4Yrx+8xuiWzx27j+krPD1OeNLdNM9PaZqmh9HEEpLnzvDT1HpnyFJJ+p0NTWdTpXmvo9pMuk9FTKD//klGZHEFADFltSYJ65NOq/n6k31d4h8BPStowQHn2ea4eqCit7q/Vf6yxC9/3vGJiZwWCm8h4qX36JdN5HYSCbC8CvVmn/E586IsU71oVOt+/6m24/d+OoYAUYTY/i+vcqE5CohZXNXEzfVglZzBNz4WbHijVGN4zZh29zoLBAC1jj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53721ba4-b7d8-4b4d-d9ed-08db5cfc0b58 X-MS-Exchange-CrossTenant-AuthSource: AM5PR04MB3139.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 08:42:59.6962 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8aw33zlaR3e8GX+XapoJbOrkdxo3a+a80A9k380aM7UVOR9JBHPZhCpplI5fVy2jqmEZwm5He/3H4I5+bIcRkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8558 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766855744514655108?= X-GMAIL-MSGID: =?utf-8?q?1766855744514655108?= |
Series |
[net-next] net: fec: remove last_bdp from fec_enet_txq_xmit_frame()
|
|
Commit Message
Wei Fang
May 25, 2023, 8:38 a.m. UTC
From: Wei Fang <wei.fang@nxp.com> Actually, the last_bdp is useless in fec_enet_txq_xmit_frame(), so remove it. Signed-off-by: Wei Fang <wei.fang@nxp.com> --- drivers/net/ethernet/freescale/fec_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
Comments
On Thu, May 25, 2023 at 04:38:24PM +0800, wei.fang@nxp.com wrote: > From: Wei Fang <wei.fang@nxp.com> > > Actually, the last_bdp is useless in fec_enet_txq_xmit_frame(), > so remove it. I think it would be useful to describe why it is useless. F.e. because it is set to bdp, which doesn't change, so bdp can be used directly instead. > Signed-off-by: Wei Fang <wei.fang@nxp.com>
> -----Original Message----- > From: Simon Horman <simon.horman@corigine.com> > Sent: 2023年5月25日 17:09 > To: Wei Fang <wei.fang@nxp.com> > Cc: davem@davemloft.net; edumazet@google.com; kuba@kernel.org; > pabeni@redhat.com; Shenwei Wang <shenwei.wang@nxp.com>; Clark Wang > <xiaoning.wang@nxp.com>; netdev@vger.kernel.org; dl-linux-imx > <linux-imx@nxp.com>; linux-kernel@vger.kernel.org > Subject: Re: [PATCH net-next] net: fec: remove last_bdp from > fec_enet_txq_xmit_frame() > > On Thu, May 25, 2023 at 04:38:24PM +0800, wei.fang@nxp.com wrote: > > From: Wei Fang <wei.fang@nxp.com> > > > > Actually, the last_bdp is useless in fec_enet_txq_xmit_frame(), so > > remove it. > > I think it would be useful to describe why it is useless. > > F.e. because it is set to bdp, which doesn't change, so bdp can be used directly > instead. > Sorry, I'll refine the commit message in the next version. Thank you!
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 3ecf20ee5851..26fb00e0590b 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3770,7 +3770,7 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep, struct xdp_frame *frame) { unsigned int index, status, estatus; - struct bufdesc *bdp, *last_bdp; + struct bufdesc *bdp; dma_addr_t dma_addr; int entries_free; @@ -3782,7 +3782,6 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep, /* Fill in a Tx ring entry */ bdp = txq->bd.cur; - last_bdp = bdp; status = fec16_to_cpu(bdp->cbd_sc); status &= ~BD_ENET_TX_STATS; @@ -3810,7 +3809,6 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep, ebdp->cbd_esc = cpu_to_fec32(estatus); } - index = fec_enet_get_bd_index(last_bdp, &txq->bd); txq->tx_skbuff[index] = NULL; /* Send it on its way. Tell FEC it's ready, interrupt when done, @@ -3820,7 +3818,7 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep, bdp->cbd_sc = cpu_to_fec16(status); /* If this was the last BD in the ring, start at the beginning again. */ - bdp = fec_enet_get_nextdesc(last_bdp, &txq->bd); + bdp = fec_enet_get_nextdesc(bdp, &txq->bd); txq->bd.cur = bdp;