From patchwork Mon May 10 16:52:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matteo Croce X-Patchwork-Id: 433459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ADA7C433ED for ; Mon, 10 May 2021 16:53:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C7C661585 for ; Mon, 10 May 2021 16:53:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232024AbhEJQyH (ORCPT ); Mon, 10 May 2021 12:54:07 -0400 Received: from mail-ej1-f52.google.com ([209.85.218.52]:45619 "EHLO mail-ej1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231984AbhEJQyG (ORCPT ); Mon, 10 May 2021 12:54:06 -0400 Received: by mail-ej1-f52.google.com with SMTP id u3so25515170eja.12; Mon, 10 May 2021 09:53:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s3fZm1oKAFiR2LH1z5a0f75rqEbK9aM0B+6RlH1/noo=; b=kE5ym1r34tdwUpevhsO4D4/fHHUhVWahJ9LvYjVbnp5orBqZYjNnc8FeHdcnscA9BO 7OM3S+F9z5QD7TeczVNGHS1DfOCVRHYOouc4InJPfH5BuAi7lFZnMEkxNJWc237WxyGS kd4Yle9PNIq7uX1VdAYahzFa4V+Z61Lgd+SvUjAFTH0nKhea2re+Lg7QLe1OEBPXoFC7 YzXyQM/gleHY1NXZabr44sMJOhugyTaFu1AKjq3Pj2FYal0+cyvhpwBwBbj9W+CDr9qI 3IBMWqVu4exVgO+DlKN8Gahg7pX75gK3re6VjTiuxfJTmhHGtbkC/p7xllOGzlyeFycR oy8w== X-Gm-Message-State: AOAM533OJmqglcZLt+rYWw+ma9mjT3lfO9AC2b4Ubfgf49kBR5tyGFz3 pUoadId0SUPa9Rg25M+PPXo= X-Google-Smtp-Source: ABdhPJyFDRgwHiibixIYtfSxw9/B7rRVTJoY/3VDNQF9DMokSCab3HP8tY3sfVZirfIG5IXzvp+wdQ== X-Received: by 2002:a17:906:a48:: with SMTP id x8mr26577632ejf.127.1620665580594; Mon, 10 May 2021 09:53:00 -0700 (PDT) Received: from msft-t490s.teknoraver.net (net-5-94-253-60.cust.vodafonedsl.it. [5.94.253.60]) by smtp.gmail.com with ESMTPSA id t7sm11930469eds.26.2021.05.10.09.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 09:53:00 -0700 (PDT) From: Matteo Croce To: Marcin Wojtas , Russell King , netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/2] mvpp2: remove unused parameter Date: Mon, 10 May 2021 18:52:31 +0200 Message-Id: <20210510165232.16609-2-mcroce@linux.microsoft.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510165232.16609-1-mcroce@linux.microsoft.com> References: <20210510165232.16609-1-mcroce@linux.microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Matteo Croce mvpp2_run_xdp() has an unused parameter rxq, remove it. Fixes: 07dd0a7aae7f ("mvpp2: add basic XDP support") Signed-off-by: Matteo Croce --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index ec706d614cac..28b8d9b3cbe6 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -3784,9 +3784,9 @@ mvpp2_xdp_xmit(struct net_device *dev, int num_frame, } static int -mvpp2_run_xdp(struct mvpp2_port *port, struct mvpp2_rx_queue *rxq, - struct bpf_prog *prog, struct xdp_buff *xdp, - struct page_pool *pp, struct mvpp2_pcpu_stats *stats) +mvpp2_run_xdp(struct mvpp2_port *port, struct bpf_prog *prog, + struct xdp_buff *xdp, struct page_pool *pp, + struct mvpp2_pcpu_stats *stats) { unsigned int len, sync, err; struct page *page; @@ -3925,7 +3925,7 @@ static int mvpp2_rx(struct mvpp2_port *port, struct napi_struct *napi, MVPP2_MH_SIZE + MVPP2_SKB_HEADROOM, rx_bytes, false); - ret = mvpp2_run_xdp(port, rxq, xdp_prog, &xdp, pp, &ps); + ret = mvpp2_run_xdp(port, xdp_prog, &xdp, pp, &ps); if (ret) { xdp_ret |= ret; From patchwork Mon May 10 16:52:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matteo Croce X-Patchwork-Id: 434769 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17A14C433ED for ; Mon, 10 May 2021 16:53:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBFEA611C2 for ; Mon, 10 May 2021 16:53:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232152AbhEJQyq (ORCPT ); Mon, 10 May 2021 12:54:46 -0400 Received: from mail-ed1-f52.google.com ([209.85.208.52]:42780 "EHLO mail-ed1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbhEJQyl (ORCPT ); Mon, 10 May 2021 12:54:41 -0400 Received: by mail-ed1-f52.google.com with SMTP id j26so15849861edf.9; Mon, 10 May 2021 09:53:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2bXLkpVtMXslYGX6op0binKvERZGlOYLeffR5i5Xpes=; b=ZdaRHOrJFGUSTeNBKjpmCmpyVKiO/EZsv1TM7WabPkGhOIMbkMiE2X3xPuDODn32S7 5Vm2CyOxaV6gY59OtAqtRfSbFEqnW6OvPSfrSUZ0xKyZTVMmxNYwFk2HotbsOmWv/s3w WWy8KysqMdL2bgUDfqqINzqOASBeXs9jS39upm93cuSLX56xuxw1tpI6D+KmQEJBL1BJ z9fNEbQh9VXXVKGDNk+aw+MUc995994tdTUfZSvSeh1ZRQvJkU6gddM3OEZ/r/riDaRH GGvYp9Sdfk+0lEwg81LrYGeVkp1kQj1We6FsV9ackvIBc3odDe4Ga074RbnHHFHr/ye/ MhZA== X-Gm-Message-State: AOAM530Q1ttA9WhVZzujVXVA5S6mtdxwSNRTyh14n5PDMEN6cNZBG3yB viXLBVnQKOQORF1wpmLmf7U= X-Google-Smtp-Source: ABdhPJyoCeWu3cKJZP4w9f4u4GDXo7AIUbWfJ+14Y7oBTmEO0V0G8zmQGxjiqFhFjrtHOOl3YlDz5w== X-Received: by 2002:a05:6402:416:: with SMTP id q22mr30713096edv.204.1620665613644; Mon, 10 May 2021 09:53:33 -0700 (PDT) Received: from msft-t490s.teknoraver.net (net-5-94-253-60.cust.vodafonedsl.it. [5.94.253.60]) by smtp.gmail.com with ESMTPSA id t7sm11930469eds.26.2021.05.10.09.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 09:53:33 -0700 (PDT) From: Matteo Croce To: Marcin Wojtas , Russell King , netdev@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , linux-kernel@vger.kernel.org Subject: [PATCH net-next 2/2] mvpp2: suppress warning Date: Mon, 10 May 2021 18:52:32 +0200 Message-Id: <20210510165232.16609-3-mcroce@linux.microsoft.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510165232.16609-1-mcroce@linux.microsoft.com> References: <20210510165232.16609-1-mcroce@linux.microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Matteo Croce Remove some unreachable code, so to suppress this warning: drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c: In function ‘mvpp2_prs_tcam_first_free’: drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c:397:10: warning: comparison is always false due to limited range of data type [-Wtype-limits] 397 | if (end >= MVPP2_PRS_TCAM_SRAM_SIZE) | ^~ Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Matteo Croce --- drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c index 7cc7d72d761e..93575800ca92 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c @@ -394,9 +394,6 @@ static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start, if (start > end) swap(start, end); - if (end >= MVPP2_PRS_TCAM_SRAM_SIZE) - end = MVPP2_PRS_TCAM_SRAM_SIZE - 1; - for (tid = start; tid <= end; tid++) { if (!priv->prs_shadow[tid].valid) return tid;