From patchwork Fri Jun 23 10:04:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13290251 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 54200EB64D7 for ; Fri, 23 Jun 2023 10:05:09 +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=UZb/Z1+jVT3eQQ Oj0yxVsp9pU11GsWLi+sX1Z1n3xonyTOUMifJRXpSi0yaFLLr0FZFeSvsP68Gl1XmtkpbnPL7AEkW dK2ymQZd53mXoWBeYwwbq5E5ZDp2zFIEw1/4Rrk9YY3GVO8eJxERMTqfDj91di/xmZf6EbMjGduOs g86dmvfq8CrBHT7P48dfU2TeKdkOuC+GyHnQ5HLMe7Ste88ie8Oc3j5H2O4Skyb/84z80tCxDHBxe uYHlgUef9ayxKvfLXxW6EDEYb5Hu3Z3X57nOErlDMHEo+/0LEX27614o8VXsk0b4VISW//9wUmO6n yFiqH2k/qpHMpTuarPfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qCdem-0036CY-01; Fri, 23 Jun 2023 10:04:44 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qCdeY-00366J-0I for linux-arm-kernel@lists.infradead.org; Fri, 23 Jun 2023 10:04:31 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-311183ef595so488262f8f.0 for ; Fri, 23 Jun 2023 03:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1687514668; x=1690106668; 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=l0DUJdzlIHLN9/12vsEkAUNYNor4yQLqqSoGRxNk3EPmXOD2uFpAHbY4VklRmVQl3W +ENIrmsfRrIo4VfPjgmUQ/qlVWQ/ASV+aqcDfTJW9cv55BQDIxyjuiuCIZ4ey++WfOVZ e1P2A4jCjaM+XdtvCqaOpk3t2uaYGGziW1b1bYWPSrzQ7RFEhHoKViWdajx1ztsw+2oN bnk9AbhndEj+pJmoqRdzjQ34R9lSf+WGThG2I/dM3n8sMm339S386riM8UpqOyAs/hIl HePSRoIZgG9WM5dzaaaI+QNv3jNFWhnplP86qSx4p1RkU6q37ZAgOElyDOcrJT12BHma qu/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687514668; x=1690106668; 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=PHOANAJcpdUmI3u7Ffq6B2Gk1OMSyldM7AhNrs2AxWS/BiqTd4XH/fLCzxugVLmudD 3WZOCG+Jln9Zhvk5h5pzFYRZ4/yXIWtF3FeoeBhZogy0Jfvu3e1rnfUX9fBmAmTT/e0u C3swDrnfrmMKWACg3IAdZo+TgtFlz47oOjso9YuE0c8AtI+vih+nppv3QCEml67D1rNi 6ytJSBL+MdNUPTy3IVQs0zS1swNhYmXZIjPQ3A+PUJvWPpzXMj4DXHo+qBeoHE9R3aIp r/fqe8N0nnoYWpIvH+ox6F1naUKAy+qxefSUJFwMLldFaTbVZP1DR+gMwDgs2s8X968t k7rQ== X-Gm-Message-State: AC+VfDxFjSq1YqBQF3NVS2JAfNI8EVKy2XYfADGWAtAAiUcunnxt/rKH AoiNCE70K+oUebEf2DpYrqLS5pyCDXSTbms1bzY= X-Google-Smtp-Source: ACHHUZ6FLrSK9VU9Oq4F41PZ3cJGKL7Y2Pamvyhspuem2ue7YRvUpv2Kv8yhkqC7Oo450xcBGrhcpA== X-Received: by 2002:a5d:5346:0:b0:30f:cb74:35f9 with SMTP id t6-20020a5d5346000000b0030fcb7435f9mr17053297wrv.66.1687514667863; Fri, 23 Jun 2023 03:04:27 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:ddc2:ce92:1ed6:27bd]) by smtp.gmail.com with ESMTPSA id x8-20020a5d54c8000000b0030fae360f14sm9079360wrv.68.2023.06.23.03.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 03:04:27 -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 v2 06/11] net: stmmac: dwmac-generic: use stmmac_pltfr_probe() Date: Fri, 23 Jun 2023 12:04:12 +0200 Message-Id: <20230623100417.93592-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230623100417.93592-1-brgl@bgdev.pl> References: <20230623100417.93592-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230623_030430_128793_D26F5B1D X-CRM114-Status: GOOD ( 11.41 ) 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);