Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp933806imm; Thu, 4 Oct 2018 05:51:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV63pYoYi6ZzV2v4vG+udsyEbUNaSuGWAjHNUXo1HLSbfpwAJMlIBubZiZjXjX3cdGC7fo1Tk X-Received: by 2002:a63:2903:: with SMTP id p3-v6mr340309pgp.188.1538657516178; Thu, 04 Oct 2018 05:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538657516; cv=none; d=google.com; s=arc-20160816; b=Lzw9BDdoAg6cwGVmYJb5Cc/WmkpNcpcudStwHFfC0qYmeiLGByQHkoCunEAc/ib9th LosX7Qdxw1LtxXv1PaAnfPcJrxIXbPCXP02kjPYDj5sc9jJyzXxAddBzVfTjr2i7uRSL dcL7N0nKZxJwAO2UH0c7xfxl6stusmtlAeoVAcg6WQBh/jSARmdhyjPDisBTyqsSxilh oBFtb/Rdv4aJzRc7pQcYpNVw+Q40UqwioZLARev0llNNci2r4qm1R46oSg7arGAetYz1 sgzA3vNnAIYWgkpm1yYDFcis1Kmt8f6MixM9gIimC37elcBHUJCBERf1TaNq6eYmc4Ra t+VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=90QoVPDhWv/xu2oNQTD8S1hdvHlwKjpWeloWOpOTSaY=; b=EowFw9LbqOG1NY0/ky8kyU/XJthOEORpIm6tjbO82ctfHbgQrw38j9WHhuo+/PJYxR HNLP3142q6PecJTH0kEMXUDHxqttrfp/ywroAsG1mwOPTK/g3cLJWtFR/1KkoDd7ORBT 2P4NyHUh1sh1YNJIyuWmJZf/WG3cTogvXuQOLF3zWiy9Slr2FpRkNeXBg7kDZ3ZmICbQ E0DzP7quYaLsgDou/pXCOfXTNlYy/C8ZpOiqSYh8FV44885UdNeeQA4lbDjlZjLDDum3 lMl/Kd8ntoYr3VtUkBSj4v1qf6o/pm/iNBL+EUOZa5SNXHmUeFc3c/4BKWgQLuDBOfO7 VvQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6-v6si4793208plz.74.2018.10.04.05.51.40; Thu, 04 Oct 2018 05:51:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbeJDToV (ORCPT + 99 others); Thu, 4 Oct 2018 15:44:21 -0400 Received: from mail.bootlin.com ([62.4.15.54]:37532 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727256AbeJDToU (ORCPT ); Thu, 4 Oct 2018 15:44:20 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 08C1E207C4; Thu, 4 Oct 2018 14:51:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (AAubervilliers-681-1-28-153.w90-88.abo.wanadoo.fr [90.88.148.153]) by mail.bootlin.com (Postfix) with ESMTPSA id ACC1E20802; Thu, 4 Oct 2018 14:50:49 +0200 (CEST) From: Quentin Schulz To: davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com Cc: allan.nielsen@microchip.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com, Quentin Schulz Subject: [PATCH net-next v2 5/6] net: phy: mscc: shorten `x != 0` condition to `x` Date: Thu, 4 Oct 2018 14:47:27 +0200 Message-Id: <20181004124728.9821-6-quentin.schulz@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181004124728.9821-1-quentin.schulz@bootlin.com> References: <20181004124728.9821-1-quentin.schulz@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org `if (x != 0)` is basically a more verbose version of `if (x)` so let's use the latter so it's consistent throughout the whole driver. Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: Quentin Schulz --- drivers/net/phy/mscc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index c136ed71110b..720d8dc81410 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c @@ -318,7 +318,7 @@ static int vsc85xx_mdix_set(struct phy_device *phydev, u8 mdix) DISABLE_HP_AUTO_MDIX_MASK); } rc = phy_write(phydev, MSCC_PHY_BYPASS_CONTROL, reg_val); - if (rc != 0) + if (rc) return rc; oldpage = phy_select_page(phydev, MSCC_PHY_PAGE_EXTENDED); @@ -334,7 +334,7 @@ static int vsc85xx_mdix_set(struct phy_device *phydev, u8 mdix) else if (mdix == ETH_TP_MDI_X) reg_val |= FORCE_MDI_CROSSOVER_MDIX; rc = __phy_write(phydev, MSCC_PHY_EXT_MODE_CNTL, reg_val); - if (rc != 0) + if (rc) goto out; rc = phy_restore_page(phydev, oldpage, rc); @@ -458,14 +458,14 @@ static int vsc85xx_wol_set(struct phy_device *phydev, reg_val = phy_read(phydev, MII_VSC85XX_INT_MASK); reg_val |= MII_VSC85XX_INT_MASK_WOL; rc = phy_write(phydev, MII_VSC85XX_INT_MASK, reg_val); - if (rc != 0) + if (rc) goto out_unlock; } else { /* Disable the WOL interrupt */ reg_val = phy_read(phydev, MII_VSC85XX_INT_MASK); reg_val &= (~MII_VSC85XX_INT_MASK_WOL); rc = phy_write(phydev, MII_VSC85XX_INT_MASK, reg_val); - if (rc != 0) + if (rc) goto out_unlock; } /* Clear WOL iterrupt status */ @@ -614,7 +614,7 @@ static int vsc85xx_edge_rate_cntl_set(struct phy_device *phydev, u8 edge_rate) reg_val &= ~(EDGE_RATE_CNTL_MASK); reg_val |= (edge_rate << EDGE_RATE_CNTL_POS); rc = __phy_write(phydev, MSCC_PHY_WOL_MAC_CONTROL, reg_val); - if (rc != 0) + if (rc) goto out_unlock; out_unlock: @@ -649,7 +649,7 @@ static int vsc85xx_mac_if_set(struct phy_device *phydev, goto out_unlock; } rc = phy_write(phydev, MSCC_PHY_EXT_PHY_CNTL_1, reg_val); - if (rc != 0) + if (rc) goto out_unlock; rc = genphy_soft_reset(phydev); -- 2.17.1