From patchwork Wed Jun 21 15:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13287572 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 6F6E3EB64D7 for ; Wed, 21 Jun 2023 15:37:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4L2wtGtUXUkSeE+xOzCXHbFKODMfMhTIrLeP+INlarE=; b=Hx8PYC9qdkGGvL iIxUtUNwaJ27Xvy+ViNrQ+lm3ez7tBhtytsuXeBxxAAvXZogLtNQO2V8pefkciWEHIX+uAEAGAgSg B7lDo5Pvw4pWG8Lgjh0RiXA+bJHjHHmNytpPHct/cpW+4YrlVaD9jamwMF8tNiIMa/VkWO+NwMxtQ N98o26S41JAEkmyDloIp5mp2CuLPG9MCJLWaF+Qg1p88ZJYc3L7ditVfOKU80HEOyNsEOqE89TIqW sxFew8np7FGnJqYMR3AmckqBXFahAc1B7IYkJew7nvNro6ftGcjP/7El1dxiwjc1AlU8IePmLZjqh 6fH6uNgQlb1PR9OH3cow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qBztg-00Exu1-0K; Wed, 21 Jun 2023 15:37:28 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qBztO-00Exnj-1k for linux-arm-kernel@lists.infradead.org; Wed, 21 Jun 2023 15:37:12 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4f86bc35f13so5901655e87.1 for ; Wed, 21 Jun 2023 08:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1687361828; x=1689953828; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yItovFwloe3duebYnq7A6B4V/jKgQ44zzRGa/G+pPW8=; b=CSv88/ZWPsCkujCLeQvR5zV6QJ197upQiupFOf7hhQJLU4holZQmyEM8afOeiopPJI rxkkXknIdFBsXaGs9e5eQl8cmqwLLSitBBUYN4EkfgWs1N3I08bYlFaMCcxWlpL00o5R m+Z0PytTuM0BQ2VA1FUXHz93HaoWpBMXD7Xg1oI0Iex7kwBXSFxukS+BVYvPEM1Z+x/J 1MMnplXM//mLc8MN0qTVv7Q3KJFsN8GnzobJyIhzjWXEbG/2zt6VldBu8G2I7bJGs2ei Te8uSE3lkY289Edv22F486sKBj0Hx/GJT7tkzQsTOMVS4qqtocy0eoZE2IXrcvMDnFyM oU0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687361828; x=1689953828; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yItovFwloe3duebYnq7A6B4V/jKgQ44zzRGa/G+pPW8=; b=EecQRl3rjXSJ+mnV/VueyYTRImOVfVt9tY/9Avi4VbTySmu6p7+SF8HsspvtEzwXx9 N/xdGVUikIS31PHeFU3B3FCHTkJyjOASS7vilnay9XWRiws12X+WRohRngFLLX6SylC9 P2Ld2k9EUGWufVArcAvnK0CxyV5boBWa8MIU+ZwiQM85qvWRa6n52pDli8/FwMv92Ho+ D7OcwkbbX3lun8fnDnizXIpzGNWRuL3ucW+Yfh0h8SO/b9ZhhO/CXp8GaU5xYq+FwbLW EhXEaevW6fNh7W/rRFpfmua/nUEzwh5/uXVMWsotwnLZ6Mcy2xcJ0OjQRbJHbyFkzqCq 1KVw== X-Gm-Message-State: AC+VfDyKZEKlQCrVTdD86/kqwNST/R7QRJUSqdVhR0FJpv13Xgz0LZWE 9LptooJvuFMEUJvvjoBum/UMdajA/ZkfoOD/uJ0= X-Google-Smtp-Source: ACHHUZ6zjgqtk9I7hnzpINsxw7Jk5ONzx9X2XtIX2vI7/3ICM1PCWSNZh/mAZPlvVnMabN82Dm8Q4g== X-Received: by 2002:a05:6512:3b0a:b0:4f8:6fe9:3c9c with SMTP id f10-20020a0565123b0a00b004f86fe93c9cmr992970lfv.49.1687361828170; Wed, 21 Jun 2023 08:37:08 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:a69f:8ee3:6907:ccdf]) by smtp.gmail.com with ESMTPSA id l13-20020a1c790d000000b003f7ed463954sm5322491wme.25.2023.06.21.08.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 08:37:07 -0700 (PDT) From: Bartosz Golaszewski To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Junxiao Chang , Vinod Koul , Bhupesh Sharma Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH net-next 06/11] net: stmmac: dwmac-generic: use stmmac_pltfr_probe() Date: Wed, 21 Jun 2023 17:36:45 +0200 Message-Id: <20230621153650.440350-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230621153650.440350-1-brgl@bgdev.pl> References: <20230621153650.440350-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230621_083710_579146_2FBC1BC9 X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski Shrink the code and remove labels by using the new stmmac_pltfr_probe() function. Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c index dabf05601221..20fc455b3337 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c @@ -46,19 +46,12 @@ static int dwmac_generic_probe(struct platform_device *pdev) plat_dat->unicast_filter_entries = 1; } - /* Custom initialisation (if needed) */ - ret = stmmac_pltfr_init(pdev, plat_dat); + ret = stmmac_pltfr_probe(pdev, plat_dat, &stmmac_res); if (ret) goto err_remove_config_dt; - ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); - if (ret) - goto err_exit; - return 0; -err_exit: - stmmac_pltfr_exit(pdev, plat_dat); err_remove_config_dt: if (pdev->dev.of_node) stmmac_remove_config_dt(pdev, plat_dat);