From patchwork Fri Jun 11 20:05:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12316481 X-Patchwork-Delegate: kuba@kernel.org 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.8 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,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 5D810C48BD1 for ; Fri, 11 Jun 2021 20:06:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A2B6613D9 for ; Fri, 11 Jun 2021 20:06:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230467AbhFKUIN (ORCPT ); Fri, 11 Jun 2021 16:08:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230298AbhFKUIG (ORCPT ); Fri, 11 Jun 2021 16:08:06 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D80CCC061574 for ; Fri, 11 Jun 2021 13:05:51 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id s6so38421755edu.10 for ; Fri, 11 Jun 2021 13:05:51 -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=9aLb5MTiMiX+eIH3cIXkfteLFULp/N00+e1rMmviAS8=; b=Km1XT8H83tLT8TNyIdLMRFimyUb95Z0/elr91QOxZ5/pCz2ISBWGfpm29wY2XYnH7V L2AvEZo1tb3v3QMaggr3aXQ4vIjG10EYNX8mdYVKgMBw2woWqqukBPj1zx6azfFpleIZ ZygKuEZwjRACnhxVW8nACqSr8UmrJv2DHpWy6ki6GBvy/giHXciB8ZV69wiWpOZKktlP nLj4VPBujEw1s4KM/j/4k7VRrtY3jqPg+DM4trsgSOvZmBOVR0cADLNsZQ2Kw4gJjnPh 0NlfqLzF7qLF95C8ypzYhUuXlL49LMiUAu8SWWX4ZJ503LQ3GOdYEXM4ZxkgOn2qV+46 zH9w== 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=9aLb5MTiMiX+eIH3cIXkfteLFULp/N00+e1rMmviAS8=; b=k/BfC+fJLMdPhu9uWauRetP1eMjgcUVAhl/7PjeWp96r2hb7eLVR5X/7ZGsk/atZaD XsLvj6ZwtXkvpqEoamXlDL/kwFqb2rXwQ6YE+fxkDAjwYalu2sjy41KE5Y9ODFIkrl4R 97WdaO5eUchBfvXVfl80SRPKKXof+/1isW1TROVJHt1oo0BNBE/WAoAGEPc/Qvbaxixf O9v2EhPhtQ8oycCpRRAsqRACgGXGUsE6nnpBOb/vfhiLndvUcfOzh61l9QmyVT7eNNOO 8L3S9Mp/uu0G7IMhC3pVTDsHTZ40ZJpLcZisYdAiunfSheVnLN/6ElAv5jt7CEJsN+Fc fGzg== X-Gm-Message-State: AOAM53382HsmdkeV4HQo0kw2BDonsQ3txn3nMYlzcWMxEWHd6FVur6ZM HoLk9wd0ipCtkuOyfgpgHqEvFWWTYoQ= X-Google-Smtp-Source: ABdhPJzmu8weoHDB0sMFCwMDVFSD6la1dr12loV+A+iUkl97xaxZjnJz5nrydk6D8sqLXDXAxV3bIg== X-Received: by 2002:aa7:d555:: with SMTP id u21mr5600674edr.84.1623441950434; Fri, 11 Jun 2021 13:05:50 -0700 (PDT) Received: from localhost.localdomain ([188.26.52.84]) by smtp.gmail.com with ESMTPSA id w2sm2392084ejn.118.2021.06.11.13.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 13:05:50 -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 , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Vladimir Oltean Subject: [PATCH v3 net-next 03/13] net: stmmac: reduce indentation when calling stmmac_xpcs_setup Date: Fri, 11 Jun 2021 23:05:21 +0300 Message-Id: <20210611200531.2384819-4-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611200531.2384819-1-olteanv@gmail.com> References: <20210611200531.2384819-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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 --- v2->v3: none 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 db97cd4b871d..975b90805359 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7003,12 +7003,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);