From patchwork Fri Dec 27 03:14:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Daley X-Patchwork-Id: 13921515 X-Patchwork-Delegate: kuba@kernel.org Received: from alln-iport-7.cisco.com (alln-iport-7.cisco.com [173.37.142.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66C121CA84 for ; Fri, 27 Dec 2024 03:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.37.142.94 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735269345; cv=none; b=e6t10W0Jx105tPM+C8nuPmPSdQT20VFo8EhqcaVSb8fi0Qk6myWh2jvYczluyUXzG98/lC8UPv3S0zgMiBnRuPhvgYFoMvAKYjsjp7bUdgaVJvEwJFU9tmGKh39dSn+r9+Lk3Tgj/aN1U7HbeqLDsw6bYrsEYW0JhCEwSZ9IlGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735269345; c=relaxed/simple; bh=T4hWg15WZP+lApfrr9Y/thSG09sNb0ZXX0qr/vwtnN8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rRLtPK84BviHcpG8QV+PYnsM+X2Doek/UWa9xyDZvyS+yJiRIH4zYkLb1NASFQP/ra+cVb/aZM7zpvJgTZsN685ER4GjoR9z8zUAzDZ1BUYKMgz7OGHN2ARWEJEFfe8b75p9wSxV9Nj/xX7kprhfVGjebx3A37j3j346Rv9upzg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cisco.com; spf=pass smtp.mailfrom=cisco.com; dkim=pass (1024-bit key) header.d=cisco.com header.i=@cisco.com header.b=WfP/klk5; arc=none smtp.client-ip=173.37.142.94 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cisco.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cisco.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=cisco.com header.i=@cisco.com header.b="WfP/klk5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=2510; q=dns/txt; s=iport; t=1735269343; x=1736478943; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mJaW4D8IoGJsrpAQ4RXWrveI+HMg7JYPf5VPwYrwcqs=; b=WfP/klk5G4AomOjfS8bb7J4Pzr/KNuDPnU01P9NBcQ6SX4FXfyFx7y7g IGzJ24ZJXYqyTe1EM8XgaLHoAGw/GuDKgWY2KSQx0vvnnTxmiWeGKMSw2 byfrCAtClJMQgiWUzHEtOuUeTsDY13uYIH+tiO+AI98a9ltLzLHl8Ff7u A=; X-CSE-ConnectionGUID: 1kgAxxt6SAiaV9R/RzGxHQ== X-CSE-MsgGUID: 4Amo/IZDRdqxT3jLxyH3Aw== X-IPAS-Result: A0ANAADbGm5nj5P/Ja1aHAEBAQEBAQcBARIBAQQEAQGBfwcBAQsBhBlDSIxyX6EwhV2BJQNWDwEBAQ9EBAEBhQcCim4CJjQJDgECBAEBAQEDAgMBAQEBAQEBAQEBAQsBAQUBAQECAQcFFAEBAQEBATkFDjuGCIZbAgEDJwsBRhBRKysHEoMBgmUDrxWBeTOBAd4zgW2BSAGFaodfcIR3JxuBSUSCUIE+b4UQhXcEiRWedUiBIQNZLAFVEw0KCwcFgTk6AyIMCwwLFBwVAoEegQEBFAYVBIELRT2CSmlJNwINAjaCICRYgk2FF4RhhFeCSVWCe4IXfIEdgiVAAwsYDUgRLDcGDhsGPm4HnGRGg3SBD4IopgehA4QkgWOfYxozqlIuh2SQaiKkJIRmgWc6gVszGggbFYMiUhkPji0NCRa1fCUyPAIHCwEBAwmRNwEB IronPort-Data: A9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0CD7GhPkE7DrL/3XhRcCBkXsqpwyCmXuWCOQFhUHowEOPcxKhpeopu2cxoehTgo BmAtrtj4AOn3xXvcFzSAlg6Me+Hdcgk9xoTY3dzVWtELlB/Ou5DGo9DLMNvJdHKNYVLkZZJc hXyU57fW64TEWWap2t1gFuUhNUKSSlHTDmmZ0KNCAXTtbY5L+AV0rcIpjfSyRQ= IronPort-HdrOrdr: A9a23:l2k8NqH9qB38ANE5pLqE78eALOsnbusQ8zAXPo5KJiC9Ffbo8P xG88576faZslsssTQb6LK90cq7MBfhHOBOgbX5VI3KNGKNhILrFvAG0WKI+VPd8kPFmtK1rZ 0QEJSXzLbLfCFHZQGQ2njfL+od X-Talos-CUID: 9a23:C/pLHWnT/s7fkylp0dTweLaisELXOSTew17AM1PmMk9oQYPEcxiq6ox0s/M7zg== X-Talos-MUID: 9a23:AKT6fgyUtoED6NMmWZ8MMkn8O0eaqPiHDUdKsKcqgcWdJRArORONnRTsa5Byfw== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.12,268,1728950400"; d="scan'208";a="404699745" Received: from rcdn-l-core-10.cisco.com ([173.37.255.147]) by alln-iport-7.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 27 Dec 2024 03:14:34 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-l-core-10.cisco.com (Postfix) with ESMTP id E59EF1800026B; Fri, 27 Dec 2024 03:14:33 +0000 (GMT) Received: by cisco.com (Postfix, from userid 392789) id B97B520F2005; Thu, 26 Dec 2024 19:14:33 -0800 (PST) From: John Daley To: benve@cisco.com, satishkh@cisco.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org Cc: John Daley , Nelson Escobar Subject: [PATCH net-next v2 2/5] enic: Remove an unnecessary parameter from function enic_queue_rq_desc Date: Thu, 26 Dec 2024 19:14:07 -0800 Message-Id: <20241227031410.25607-3-johndale@cisco.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20241227031410.25607-1-johndale@cisco.com> References: <20241227031410.25607-1-johndale@cisco.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-l-core-10.cisco.com X-Patchwork-Delegate: kuba@kernel.org The function enic_queue_rq_desc has a parameter os_buf_index which was only called with a hard coded 0. Remove it. Co-developed-by: Nelson Escobar Signed-off-by: Nelson Escobar Co-developed-by: Satish Kharat Signed-off-by: Satish Kharat Signed-off-by: John Daley --- drivers/net/ethernet/cisco/enic/enic_main.c | 8 ++------ drivers/net/ethernet/cisco/enic/enic_res.h | 10 +++------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index 33890e26b8e5..f8d0011486d7 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -1301,14 +1301,11 @@ static int enic_rq_alloc_buf(struct vnic_rq *rq) struct net_device *netdev = enic->netdev; struct sk_buff *skb; unsigned int len = netdev->mtu + VLAN_ETH_HLEN; - unsigned int os_buf_index = 0; dma_addr_t dma_addr; struct vnic_rq_buf *buf = rq->to_use; if (buf->os_buf) { - enic_queue_rq_desc(rq, buf->os_buf, os_buf_index, buf->dma_addr, - buf->len); - + enic_queue_rq_desc(rq, buf->os_buf, buf->dma_addr, buf->len); return 0; } skb = netdev_alloc_skb_ip_align(netdev, len); @@ -1324,8 +1321,7 @@ static int enic_rq_alloc_buf(struct vnic_rq *rq) return -ENOMEM; } - enic_queue_rq_desc(rq, skb, os_buf_index, - dma_addr, len); + enic_queue_rq_desc(rq, skb, dma_addr, len); return 0; } diff --git a/drivers/net/ethernet/cisco/enic/enic_res.h b/drivers/net/ethernet/cisco/enic/enic_res.h index b8ee42d297aa..dad5c45b684a 100644 --- a/drivers/net/ethernet/cisco/enic/enic_res.h +++ b/drivers/net/ethernet/cisco/enic/enic_res.h @@ -107,19 +107,15 @@ static inline void enic_queue_wq_desc_tso(struct vnic_wq *wq, } static inline void enic_queue_rq_desc(struct vnic_rq *rq, - void *os_buf, unsigned int os_buf_index, - dma_addr_t dma_addr, unsigned int len) + void *os_buf, dma_addr_t dma_addr, unsigned int len) { struct rq_enet_desc *desc = vnic_rq_next_desc(rq); - u64 wrid = 0; - u8 type = os_buf_index ? - RQ_ENET_TYPE_NOT_SOP : RQ_ENET_TYPE_ONLY_SOP; rq_enet_desc_enc(desc, (u64)dma_addr | VNIC_PADDR_TARGET, - type, (u16)len); + RQ_ENET_TYPE_ONLY_SOP, (u16)len); - vnic_rq_post(rq, os_buf, os_buf_index, dma_addr, len, wrid); + vnic_rq_post(rq, os_buf, 0, dma_addr, len, 0); } struct enic;