From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F5C5C77B7C for ; Wed, 24 May 2023 15:52:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1D9C841F46; Wed, 24 May 2023 15:52:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 1D9C841F46 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1684943526; bh=nzZVFvSxEriQkzO7AOlx38TEMiu9zYFdur5BKCkiJPM=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=m585kEkX7h40lWucZtnI/dOva63u+Ud+Cpr5TZMdvj+w/rKML6l2YwKUZ+nFK2cA+ Q0oAdgqh2XBy4VnXEhL2Nz9nA1X4fBs/Vdu2u12TOVxuJ1jMiPhJ8v6UFoSo9y1DpR dg1xf7jrXgZQKZwML8ewN7QLqPC2sE35ZUJXl3kZP/HZb0m+ICjfTxlyyiIkMTUVbV B7beJwA6mmuZkygLUjB4657E8bTM1aXm1+ZnwxO9Yqm3LGij+8ls/eG2Sg4d5aJQ7F bm0X1877xjoDfqDRKjypLe/V+ssphI4dXLQXrFLsKXliWVgub96Wn9oOz36LpKJLit b4O83Qst6L/3A== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mBUwD0QE4rmc; Wed, 24 May 2023 15:52:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id CCDE541F48; Wed, 24 May 2023 15:52:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org CCDE541F48 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id B88851BF325 for ; Wed, 24 May 2023 15:52:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 90D9340420 for ; Wed, 24 May 2023 15:52:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 90D9340420 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id THMLDKSVT6L7 for ; Wed, 24 May 2023 15:52:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org AEAC4401AD Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp2.osuosl.org (Postfix) with ESMTPS id AEAC4401AD for ; Wed, 24 May 2023 15:52:00 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B4536311B; Wed, 24 May 2023 15:51:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A7C3C4339C; Wed, 24 May 2023 15:51:58 +0000 (UTC) Date: Wed, 24 May 2023 08:51:57 -0700 From: Jakub Kicinski To: Jiapeng Chong Message-ID: <20230524085157.59aeebea@kernel.org> In-Reply-To: <20230524100203.28645-1-jiapeng.chong@linux.alibaba.com> References: <20230524100203.28645-1-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684943519; bh=XWnQo/qdI9QS7Vl/TkbgebkpbwZYMFbbX7jgoE+jOEU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oDrl9cg8f/SvTELCMV33pKctM2szKyacR/eO0Q1jQWAeWTh1hfYZQswJbhdxGIMUC 0MSuSHsyWEV9Ug+dOST1xVUsLbbw02/1PSnW21LIURe5MvLfnGO5G9O3G4nWOwwfUg EYIUQpTzudn4A2vwvmDTC0nEFbHx0pcVCueQ6AE44lvgUEkhP3Ah6SfexPa9+rFgob c5DVRTFSSQTzSeyyAQZ7wXnt8BXSzxYSY/9fr96DZo3t0RaX3BZoSJ3vfpa5viqWHS p1tvAPVGKzt6wZnc3DALBTJvuA5CH8sRJGc01fmyWGO4iv37LtAu6cg1i//5ymOr72 JtPRTaJ+jTKXQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=oDrl9cg8 Subject: Re: [Intel-wired-lan] [PATCH v2] iavf: Remove useless else if X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Abaci Robot , jesse.brandeburg@intel.com, linux-kernel@vger.kernel.org, edumazet@google.com, intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, pabeni@redhat.com, davem@davemloft.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, 24 May 2023 18:02:03 +0800 Jiapeng Chong wrote: > 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 > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5255 > Signed-off-by: Jiapeng Chong Looking thru git history most of the patches you send for this check are converting perfectly valid code. Please change the check to ignore if (cond) /*A*/ else if (cond2) /*B*/ else /*B*/ -- pw-bot: reject _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17A9EC7EE23 for ; Wed, 24 May 2023 15:52:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjEXPwG (ORCPT ); Wed, 24 May 2023 11:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237197AbjEXPwE (ORCPT ); Wed, 24 May 2023 11:52:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3B4119 for ; Wed, 24 May 2023 08:52:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A76FE6326E for ; Wed, 24 May 2023 15:51:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A7C3C4339C; Wed, 24 May 2023 15:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684943519; bh=XWnQo/qdI9QS7Vl/TkbgebkpbwZYMFbbX7jgoE+jOEU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oDrl9cg8f/SvTELCMV33pKctM2szKyacR/eO0Q1jQWAeWTh1hfYZQswJbhdxGIMUC 0MSuSHsyWEV9Ug+dOST1xVUsLbbw02/1PSnW21LIURe5MvLfnGO5G9O3G4nWOwwfUg EYIUQpTzudn4A2vwvmDTC0nEFbHx0pcVCueQ6AE44lvgUEkhP3Ah6SfexPa9+rFgob c5DVRTFSSQTzSeyyAQZ7wXnt8BXSzxYSY/9fr96DZo3t0RaX3BZoSJ3vfpa5viqWHS p1tvAPVGKzt6wZnc3DALBTJvuA5CH8sRJGc01fmyWGO4iv37LtAu6cg1i//5ymOr72 JtPRTaJ+jTKXQ== Date: Wed, 24 May 2023 08:51:57 -0700 From: Jakub Kicinski To: Jiapeng Chong Cc: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH v2] iavf: Remove useless else if Message-ID: <20230524085157.59aeebea@kernel.org> In-Reply-To: <20230524100203.28645-1-jiapeng.chong@linux.alibaba.com> References: <20230524100203.28645-1-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 May 2023 18:02:03 +0800 Jiapeng Chong wrote: > 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 > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5255 > Signed-off-by: Jiapeng Chong Looking thru git history most of the patches you send for this check are converting perfectly valid code. Please change the check to ignore if (cond) /*A*/ else if (cond2) /*B*/ else /*B*/ -- pw-bot: reject