Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp66972lfe; Fri, 15 Apr 2022 19:50:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM7nMwPG48yzOkIeb3RZmZzqfZVPsOfBei4WN/nJr85dfKQfZHRAGYJoD8lWx5YL8bzG1k X-Received: by 2002:a17:902:eb92:b0:158:4cc9:698e with SMTP id q18-20020a170902eb9200b001584cc9698emr1774625plg.147.1650077438582; Fri, 15 Apr 2022 19:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650077438; cv=none; d=google.com; s=arc-20160816; b=nfoAmwSJyuZGP3UxWifQ2VOuigBHW7zKDBeftLjQgXOt89ILtarvr9FC4gFtzGDedJ kyXTUbYQicb5xaweAJjxf8ZUlo6QnzBj2t26HzCc/GCoKF/+UB6NYto35WbdSbxWYUBO cZqbPMnrdNzxl81FkQgThckQN0nd9mCkeRhSxN8LyDHH5R4szFDncxv+RBwLxqVG/a90 q8LxNqJQcLWZoo50UwvJCZlK7UAwdaEbTcYF5K3aPw7MnkqyxXopxRiWP5gAwx5b7ziM UqMvYXbeauzbgSF7NGJUh/1VTWY4hOvkXydBKNipAkHl4FPvldHHxqTAwNSoIePxSN62 ud5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JSSksXfSHT8J5RaVPGQ9iInEYYQkEPPrA2/YVmqRfXs=; b=J0B4G2tYjWCads7XlkrviiZ3FKwg3+0PC0vPmO+yD8ovSjOPDGrQG3Cwdfo9ACnvzh wUk3Uh1upY2nz2E8tPXfAjiP2PwCPUqJxgSuFqlgNlwxqGvC/IUDS/nwVsGaVE1uBEWS uuXxoK2q+hhpxzwlN8OzYMmbuvF61Ja5Fnas/vRVw4RBtIkQ1SEWW8+K03gN/+Su6bd0 rUBuMqX22bV3l3rq94NpTlX8a/wjYxpiN1gDnjdTh8E1lG3JqpKGh/1A0WFV1ZH8UF/S 5oMmJKzAvW6iNBko/zP6X5T3v1cvsbCk4+dqzjrf7/m1GYXoZM+2QBsoycfYRsYYukWf F7Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OU2Yqq+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h6-20020a170902f54600b00153b2d16490si3141451plf.152.2022.04.15.19.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OU2Yqq+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D7B42B19C; Fri, 15 Apr 2022 19:08:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229459AbiDPCEi (ORCPT + 99 others); Fri, 15 Apr 2022 22:04:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbiDPCEh (ORCPT ); Fri, 15 Apr 2022 22:04:37 -0400 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 717C31342DF; Fri, 15 Apr 2022 18:54:01 -0700 (PDT) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-dacc470e03so9414001fac.5; Fri, 15 Apr 2022 18:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JSSksXfSHT8J5RaVPGQ9iInEYYQkEPPrA2/YVmqRfXs=; b=OU2Yqq+f86YpQJByLea2+P16BM8pxSSyWmk1uKVQm9hHeePVtZyDivMG10YhUTbIbw r+Lg4uSnR7ZRcHD0wUaQVXk7g72nWv1DcdTSBMpdx/8GtKC46hUtiKnHIYly4HbNYgG3 3zZebYK2ItjOkSEAgK3SMa26KNQi3yvUXaNjwgxJpDW1K2lHXiNtUNmZl+bvvDvTGn99 WxBcq29+4inQvCgIUQbE5uowI1ykjtiwxpvSaHxU9AnAB+COJy4VQKeV9xHHuRYUbNl1 g2xuJEHq7422mYxkUjWKlBEeYl+vQp/FoxDHTTJpSzayNIsrn97+RnuOznmIx9PzbeUA 0SAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JSSksXfSHT8J5RaVPGQ9iInEYYQkEPPrA2/YVmqRfXs=; b=Q0JfEQvsxc73HI8dA6GmBZpv9onAcdLcNezPV3aw7NgRqs/nTaqyV1wVqiI44b6SIB hquFtnIlPAyFpDYsQn/N7wjYtwhS/66BwDnJ/xlHPOkX9R/bGmcxJ6Rt+5x5X1iHhOyj hDizvy3qB+cJ5B6t81sdIceUOjrkIbp6NDHOFnEqAQNDeUJIk2DKkYeO60t+Oad8Np3c 0s/QxVgmoLQfxeDtoRpGkHDxwiGmStTtxlXxcUJTcHD5RkKLX+pLVRcgbeEBkkRPE8Ow IvKZIlNCLWc7RcLi0Bkb1rSCKJ0bDVcAIFJcwkr2v1JnfReV7m06cQgqbsk1r2+dJZx7 Jw8A== X-Gm-Message-State: AOAM532Fl+tYP1oYBLsVZ5yJQKCmfScZ28rr+mEDJaDZNQDGWE8HWhOQ 7g/UEyWgzt1Ti1a6ekIUrjAyr99i+EG6iw== X-Received: by 2002:a17:90b:1c8f:b0:1b8:c6dc:ca61 with SMTP id oo15-20020a17090b1c8f00b001b8c6dcca61mr1702855pjb.13.1650073476694; Fri, 15 Apr 2022 18:44:36 -0700 (PDT) Received: from d3 ([2405:6580:97e0:3100:ae94:2ee7:59a:4846]) by smtp.gmail.com with ESMTPSA id q91-20020a17090a1b6400b001d0dcaf7920sm2917613pjq.6.2022.04.15.18.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:44:36 -0700 (PDT) Date: Sat, 16 Apr 2022 10:44:30 +0900 From: Benjamin Poirier To: Yihao Han Cc: Shahed Shaikh , Manish Chopra , GR-Linux-NIC-Dev@marvell.com, "David S. Miller" , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@vivo.com Subject: Re: [PATCH v2] net: qlogic: qlcnic: simplify if-if to if-else Message-ID: References: <20220415120949.86169-1-hanyihao@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220415120949.86169-1-hanyihao@vivo.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On 2022-04-15 05:09 -0700, Yihao Han wrote: > Replace `if (!pause->autoneg)` with `else` for simplification > according to the kernel coding style: > > "Do not unnecessarily use braces where a single statement will do." > > ... > > "This does not apply if only one branch of a conditional statement is > a single statement; in the latter case use braces in both branches" > > Please refer to: > https://www.kernel.org/doc/html/v5.17-rc8/process/coding-style.html This commit log is even more confusing than v1. Only the first line is correct. > > Suggested-by: Benjamin Poirier I did not suggest this change. Please remove the tag. > Signed-off-by: Yihao Han > --- > v2:edit commit message > --- > drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c > index bd0607680329..e3842eaf1532 100644 > --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c > +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c > @@ -3752,7 +3752,7 @@ int qlcnic_83xx_set_pauseparam(struct qlcnic_adapter *adapter, > if (ahw->port_type == QLCNIC_GBE) { > if (pause->autoneg) > ahw->port_config |= QLC_83XX_ENABLE_AUTONEG; > - if (!pause->autoneg) > + else > ahw->port_config &= ~QLC_83XX_ENABLE_AUTONEG; > } else if ((ahw->port_type == QLCNIC_XGBE) && (pause->autoneg)) { > return -EOPNOTSUPP; > -- > 2.17.1 >