Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2169130rwd; Fri, 19 May 2023 01:51:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4QnVCriGCCJwth52z121gXSfOS6mQ3AA9Qav2vbSf+/t5WicIwwBI82EIeBjrUbeU1LkBg X-Received: by 2002:a17:902:e74f:b0:1ae:6129:b3e2 with SMTP id p15-20020a170902e74f00b001ae6129b3e2mr1913205plf.28.1684486319321; Fri, 19 May 2023 01:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684486319; cv=none; d=google.com; s=arc-20160816; b=TwVniEvegLSxi4I+xO6h0HWfyJYZ5nx2VvS43BCqfZUMUAbOVl280orftBQe0pzeLv YUZsp8V+UVaU0sBtwjv+YpFiSHv7f3b4e1+fp2jj+Lpr9vRIeiFfOa2RAtsE/0Mfx54K 8Lk/kbApk4h0Qk5IzI99Py4/JvrZOQ7l7kdIwdyVey5p3QqWwyhkYrza84AjjwiKoAm3 UABIb+oOb9oBs5ipHymaLICJMc0BiFTKgFBkF/fJ9lqLbF6n1lAqYfDcwZCJH4tgzPXS 4baEAEDgxw1E5jes1fvgemK0kZfSxQrXQkKWEIRBtENrZI/pBN3yqlRPqkKNs0bOmCPY bYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Z7cSdU9Y8LzGU9WU4VbybsROU22EGt/JaC+4m+e8u2w=; b=eX1TDYDn/HXoacjOjETaspMGMj0KPs2LwG+HN1ZtQCVA3/EcJpaLG3MIyMzaQmPMqd c7A06pbqOnSwRms2vGqAD5PqONdbjewVOCkWhgwU6aJyqAY1Js3qBRK/FxWrSr3tZe9A JbjWUn+gTxRep0bsmjjMXEvB6gtqznidCwUpgZZTN4WRaNCrU5akrq47gJ4ybSw7DqFk xq8bacxUwmPrSO2PRhUKRlVNa8aYl5xNpkZkztS/IRXq7MHDlXkjQMDm3MFirPSbOkKk HoUERFyqW5dMdjD+U3Y2p+o2+eSSZf8oYIAH2xnwsSH2EqsUt5qWhS8TcDZVxwX+AXe5 1twA== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a170902edc200b001ae001e8bc9si3019109plk.188.2023.05.19.01.51.43; Fri, 19 May 2023 01:51:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbjESIjJ (ORCPT + 99 others); Fri, 19 May 2023 04:39:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjESIjH (ORCPT ); Fri, 19 May 2023 04:39:07 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 548AEE5A; Fri, 19 May 2023 01:39:05 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Vj-4ra6_1684485529; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Vj-4ra6_1684485529) by smtp.aliyun-inc.com; Fri, 19 May 2023 16:39:02 +0800 From: Jiapeng Chong To: jesse.brandeburg@intel.com Cc: anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] iavf: Remove useless else if Date: Fri, 19 May 2023 16:38:48 +0800 Message-Id: <20230519083848.58828-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_IN_DEF_SPF_WL 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: X-Mailing-List: linux-kernel@vger.kernel.org The assignment of the else and if branches is the same, so the if else here is redundant, so we remove it. ./drivers/net/ethernet/intel/iavf/iavf_main.c:2203:6-8: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=5255 Signed-off-by: Jiapeng Chong --- drivers/net/ethernet/intel/iavf/iavf_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index 2de4baff4c20..cf8538cebfe0 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -2200,8 +2200,6 @@ iavf_set_vlan_offload_features(struct iavf_adapter *adapter, vlan_ethertype = ETH_P_8021Q; else if (prev_features & (NETIF_F_HW_VLAN_STAG_RX | NETIF_F_HW_VLAN_STAG_TX)) vlan_ethertype = ETH_P_8021AD; - else if (prev_features & (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX)) - vlan_ethertype = ETH_P_8021Q; else vlan_ethertype = ETH_P_8021Q; -- 2.20.1.7.g153144c