From patchwork Thu Jun 10 18:14:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 458313 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, 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 7DA4DC48BE5 for ; Thu, 10 Jun 2021 18:14:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 592F5613F1 for ; Thu, 10 Jun 2021 18:14:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbhFJSQ1 (ORCPT ); Thu, 10 Jun 2021 14:16:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhFJSQ0 (ORCPT ); Thu, 10 Jun 2021 14:16:26 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3CB7C061760 for ; Thu, 10 Jun 2021 11:14:29 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id h24so633328ejy.2 for ; Thu, 10 Jun 2021 11:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qKw3yEePw7sdX/XkR5PYfXAFHvNJnLsszbSn8SyUSdc=; b=Fqdf68xyQE8SpKdVm0+8wl1EHMtXlk4i9x48MAwL5kEkb9eJBo/WevEXQj1YTtnZi/ 6umKhUfAUzxR0W20CoXDXIDKPVV9XNUQNSCNls+Gx/slji5gPqoWAZDIAbnhgLUVuZgt t4rKhhDm8D1X80x32QGKxN8hdMXWAdePXudE/SI/b4/RfVfl6sNl0e+DwINgQ4HkClGq YRX5vWU+5HXsg7gI4/mtmM+aoB8tRDgEKpgwwuRwW4l8ruSUXDCWDJd8eHgntGwwdseL Eddk514o7QTBj6qscDXEizFGtQXWPg+54NUYI1xZZOqIaAvHwIdFUqmziJzM4cpoMMYj W1lA== 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=qKw3yEePw7sdX/XkR5PYfXAFHvNJnLsszbSn8SyUSdc=; b=J3EQQWFvMe1LFlESrQD92TlWqqJ6B76C9eh9NMg89oQTJPF3Hbsf5aArxbmz1hcD5I dvYlXpts+N7vCeOnaKurPt15tclVfexwaV7Mr4iIU6mvIwOpI168ZU9Ui3fiWc0Sa0Zr Xjx9moGikNN0hzARgbIErCsQJhHawbot8W95/9+lVWVLJFtVJKcy9WIpicJq8o9u7KF1 GvAZsndGT6OuVccpQL0let2rShkSjNw8tHXvaugYDjY/a3mCZGaFqazRhWMbbpCFHyoa /iKKqU4WJx+RMq0IjQLRcpJ9KRm7lPX+2ohAYffKwOIp3rs+TDGZEEAO9dZqqZmuLi2v crlg== X-Gm-Message-State: AOAM533Vl8AM60md6UxtfhT2BDSaO00LqCMv/iY0VSJW/oC6tYgNV8Zt PWYq0TL+Z5MqJYwtchAUZDWMN/vasQI= X-Google-Smtp-Source: ABdhPJw32iku2epXg1u2J2/xg+Q7I7aFebe/ZBNyTL4VJ08XF8i024Y69nvPDB9nqYNEHiK8vnaIsg== X-Received: by 2002:a17:907:948f:: with SMTP id dm15mr835370ejc.476.1623348868430; Thu, 10 Jun 2021 11:14:28 -0700 (PDT) Received: from localhost.localdomain ([188.26.52.84]) by smtp.gmail.com with ESMTPSA id dh18sm1705660edb.92.2021.06.10.11.14.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 11:14:27 -0700 (PDT) From: Vladimir Oltean To: Jakub Kicinski , "David S. Miller" , netdev@vger.kernel.org Cc: Wong Vee Khee , Ong Boon Leong , Michael Sit Wei Hong , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Jose Abreu , Maxime Coquelin , Heiner Kallweit , Russell King - ARM Linux admin , Florian Fainelli , Andrew Lunn , Vivien Didelot , Vladimir Oltean Subject: [PATCH v2 net-next 03/13] net: stmmac: reduce indentation when calling stmmac_xpcs_setup Date: Thu, 10 Jun 2021 21:14:00 +0300 Message-Id: <20210610181410.1886658-4-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210610181410.1886658-1-olteanv@gmail.com> References: <20210610181410.1886658-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vladimir Oltean There is no reason to embed an if within an if, we can just logically AND the two conditions. Signed-off-by: Vladimir Oltean Reviewed-by: Wong Vee Khee --- v1->v2: none drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 1c881ec8cd04..372673f9af30 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7002,12 +7002,10 @@ int stmmac_dvr_probe(struct device *device, if (priv->plat->speed_mode_2500) priv->plat->speed_mode_2500(ndev, priv->plat->bsp_priv); - if (priv->plat->mdio_bus_data) { - if (priv->plat->mdio_bus_data->has_xpcs) { - ret = stmmac_xpcs_setup(priv->mii); - if (ret) - goto error_xpcs_setup; - } + if (priv->plat->mdio_bus_data && priv->plat->mdio_bus_data->has_xpcs) { + ret = stmmac_xpcs_setup(priv->mii); + if (ret) + goto error_xpcs_setup; } ret = stmmac_phy_setup(priv);