Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2916937rdb; Tue, 6 Feb 2024 01:24:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHfB61UfP4gz895NmjOjln2skUy+whYvZYkC0U3luE9AGAtwUa8Mbh0gUDkwvetVKQJ8EQ X-Received: by 2002:aa7:84c6:0:b0:6dd:c436:4d82 with SMTP id x6-20020aa784c6000000b006ddc4364d82mr1665886pfn.23.1707211455550; Tue, 06 Feb 2024 01:24:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707211455; cv=pass; d=google.com; s=arc-20160816; b=iunRUJ1jpmo3TuMjrsyPLRWle4li4BkT/TuLrTkoJIHxdqHueMa7uMvUiJmmiqcTz+ E0c1mxnYE0wvGIdX2kcfol6Nc9kbF7Xf9ZaYAdTQHbL1R9xLHsYV6oXhWqtjKVbzExuL HnC/YhlvpUePawypX6X2ky5z4I8chi+D3859mATrfPl3UmwDSl6sJlVAekMJQRbntPtv 1J0qVszR3HdjwGN1ep/HKbzxTPy//Q/D9P0KWeCS6ymz32iGZq7KZaTSX74T6KaMZOxu LIIH3awI9AUuNFbYOi0zTdY4MxZIqR5j1JWx1zYU3910ncTQ7i1FhbqEyfhETqxmEgf5 g8oQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=b+CYWLn2IiAH5mXLQN9lGQyrLbT4HP2FHCy8MSCdo6U=; fh=LSbbMYk9aUMoeOV/PuEhOw1TUIdecC23jixrfob98uM=; b=0kXL7ihl1O0YDGVLHIp2VKUv1kNVpQzLXlOD3ukGLOnQin7KoGlM4HU1SOHXWha9lj mwUK4edlJnVlMcKNFCgmbjVVfnV7yw7rwSawn+Wihd0nzNUIvcXlrSxN/xiK0NHwcg+P ERZDRxuhCrsUmunP9Hf97RIkKg8nsCFDTQyKuSfgED/biHIkqtgInJFqpeQBpDQIwI6K o/ZInzRMOWmRR2x0uGbXf45K9PnSH+8vbfxa6jU7iVoyRi4icSlvnvPC7mwLs3BrRPEK BPTg41X4AsbU12Po7ZMOBxxQhhazbPeEFewgigbsvqPWC8wQ20t3HvjzkMBgoEaDFcYO wtyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=f5L8NiUB; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-54578-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54578-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de X-Forwarded-Encrypted: i=1; AJvYcCX+OE0gyKgHN8SkF7NFQsSDOsMnsHODwNbocFE9kNmA7pIGio9DrR2w/5sEPPmJ/514H5qu1r/P8fWq6XriU7HALEtr2T5PPjpM6VryZw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id jc39-20020a056a006ca700b006d9b2420e50si1291019pfb.358.2024.02.06.01.24.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 01:24:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54578-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=f5L8NiUB; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-54578-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54578-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 560DAB229AC for ; Tue, 6 Feb 2024 09:22:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B53C812DDB5; Tue, 6 Feb 2024 09:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="f5L8NiUB" Received: from mout.web.de (mout.web.de [212.227.15.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59155481DB; Tue, 6 Feb 2024 09:21:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211311; cv=none; b=WTy4cpxSWApJvsAwlcg3lGQogqbERGlRsvwlLKSl79w4xyEjDI5MXRgoNcf0NkgPltFv6kr9DDpGBBODF0aLe+4LBOUDj+9yWtUuOxkFXcwejrosnwCQNL9ZZyj8RVWAsg8fvzVq41DKCYVB7+ZEtyWOCHoCMVWIPHMhQxkAfRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211311; c=relaxed/simple; bh=Z0EJLNfhbuuNB4ZK6fiRLpTdMpGVb/m6FT+YnPWA8Os=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=V+TBy+nTUE8xBbXltyY0/cvYlRFLyIkVByk59tqXa5oCQRM4EzXxwHvcrndSIFREJQZOkzPjx7nvNfdMjf3x01CeqkE+69tHIYymEqFuhJiQs5VXsPGaOSQqYDtxO8raRzMsjd8hGx+8+DHOMmLcSxnxLqQJkIjfLbIIIReaMyA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=f5L8NiUB; arc=none smtp.client-ip=212.227.15.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1707211287; x=1707816087; i=markus.elfring@web.de; bh=Z0EJLNfhbuuNB4ZK6fiRLpTdMpGVb/m6FT+YnPWA8Os=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=f5L8NiUBgNX8Uipf3MwDtARtbv6cRF7eDe2ikchGVv2MsHSksTRuPfnIaJ89BMKk N+nBe6B/TPoQrXEROxlb+rNxoBUHrGGwpfVQE1ntv10RtX++jKXtg66d1TnDy4gq8 QDNooBWppCH/5z2gcXo2UHDKHm/JO4D4swYW95r3+ufxbOE+wL6+PXqpzkC10EX7J ZFqmYaIPIfUxME4KTomKW8M/Ca6ioUI4FIHoAdJu1DGey59KKSaUjGLTL0oFmZo6R U79N3m1FjmanDGlJH6cnUQwxoZ+6hkNP1yR9DQtshnOtiB3LJWH4A23gvsJfS3rQi gnpqNN6GwNbCQGQ8vg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MjxeO-1r8uC738hs-00kep7; Tue, 06 Feb 2024 10:21:27 +0100 Message-ID: <6e397bf2-1d45-434f-8619-58a737a138e3@web.de> Date: Tue, 6 Feb 2024 10:21:26 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH v2] pmdomain: mediatek: Use devm_platform_ioremap_resource() in init_scp() Content-Language: en-GB To: Geert Uytterhoeven , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org, Angelo Gioacchino Del Regno , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Jernej Skrabec , Matthias Brugger , Rob Herring , Ulf Hansson Cc: LKML , Geert Uytterhoeven References: From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:sIgkR6RZholr8f23reVbxTGlh3vc3TB9Xak75+eYK+SHo4A2Dyf 2VHa6jkH4tMwyR4rmkEM2xlTZT8ZDWE2/x2TOte++WTx3+PSt29kdt1f5i3Or/8NGH0whyz LqP6PhelcgvmsvplzqryLSzP5LvRY81PrsMeD6CKGNlFvHTqZ/LSU+ouMbAw3LD93PwkEk0 RFUNWcvPjWNhBI3dWK8Ew== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:abdyAH2ZPBU=;QCSFV8TEkFa488xf+eC1ys85/0j xj2oAxsznVBHos30HaNxlG6WkB9oK4YyBAzNZbpHrYpQeqQM7hpH8BazIAYAN/AM0veztM5Lp USMpYz22I46Tonr7B7atTqiHJ2SwiHD7YglNQ2RSR9LWTWU1xMQlVGXQRNGA7XN2niFmfouut bF6KC5I7cZxjFP3w1TMN4aHRTrFAnsrAyQKhMfHNB6xuwx3jLb9ADjryNTfO0gEQPP0mxNYPM 9RlH6kaYkPddOd9yQFA9lWaUoWfC/1ca20KiW80wHHbHgXWZLgIY7ubPVj0zEfT/Ta0LlWqtr 1MxM6/UiGytFicpFEr5mw6EQ03UQ9WwJ5itNgxScOdfMRqDQS2XyI3+qBS21VmL87G/L+b03m rhFLVpdIW8VhWmmMwSCBO6IcpOWgmdaz1mP4CDtCtLaxncaTborhmmODE9r5TIxIIeBcL2zvs pcxlK9cK2Cr0xF3AzaedEpdRCZW+OS/PfYPXoA3XQ7ZSULLjdrc0BRv7CVy2hCMg5kzkEPlka zeyMxMEVaSQ535cOeWD6D/AVyYcKOmeEBI6xlufew2uIUBT2Vn0RkivRJiRbHZqxCgiPQVbOz Km9M6Y++j51Aj1HYQSQPCQDty5DWht0q3I30EaJYafDKUJRr2ANnY/xH2VLCj643ElIYiwoO/ DJaiexE8kbP/mhEeayApuLZFVMHzz8qIjSkAoNLBW9y8pn12PDH3d3UESsf70rKacLygmxQwo Ly7woKDRPGjM1P9MxRQE/NDKw4/lhCHt0DjvS0Cotv7iXQIsnoHsX6bRslOclBaulTL+SAg59 uqi6LeVYc2gwGKjg6VWvH0Z8ajMmbqdDwBqTPE4FtrdBc= From: Markus Elfring Date: Tue, 6 Feb 2024 10:05:34 +0100 Subject: [PATCH v2] pmdomain: mediatek: Use devm_platform_ioremap_resource= () in init_scp() A wrapper function is available since the commit 7945f929f1a77a1c8887a97ca= 07f87626858ff42 ("drivers: provide devm_platform_ioremap_resource()"). * Thus reuse existing functionality instead of keeping duplicate source co= de. * Delete a local variable which became unnecessary with this refactoring. This issue was transformed by using the Coccinelle software. Signed-off-by: Markus Elfring =2D-- v2: The transformation pattern was adjusted based on advices by known contribu= tors. Examples: * Doug Anderson * Geert Uytterhoeven * Robin Murphy drivers/pmdomain/mediatek/mtk-scpsys.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pmdomain/mediatek/mtk-scpsys.c b/drivers/pmdomain/med= iatek/mtk-scpsys.c index b374d01fdac7..59a7a8c261ed 100644 =2D-- a/drivers/pmdomain/mediatek/mtk-scpsys.c +++ b/drivers/pmdomain/mediatek/mtk-scpsys.c @@ -425,7 +425,6 @@ static struct scp *init_scp(struct platform_device *pd= ev, bool bus_prot_reg_update) { struct genpd_onecell_data *pd_data; - struct resource *res; int i, j; struct scp *scp; struct clk *clk[CLK_MAX]; @@ -441,8 +440,7 @@ static struct scp *init_scp(struct platform_device *pd= ev, scp->dev =3D &pdev->dev; - res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - scp->base =3D devm_ioremap_resource(&pdev->dev, res); + scp->base =3D devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(scp->base)) return ERR_CAST(scp->base); =2D- 2.43.0