Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3136791rdb; Tue, 6 Feb 2024 08:08:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzaiR3+/umNQbjnQDZzLzZS3/1jq0aTSry2/E6/J758+a6Us6NWVVq+6JYU90ZVNZH8Fqo X-Received: by 2002:a05:622a:1009:b0:42c:3255:75e1 with SMTP id d9-20020a05622a100900b0042c325575e1mr4349874qte.56.1707235737591; Tue, 06 Feb 2024 08:08:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707235737; cv=pass; d=google.com; s=arc-20160816; b=QZzMb1XqeDtOdtYYKtXxT6Yrj8TaIgg3OegBzKly8ssQ0ntDLuyD8JF9AfTWjbGe83 DU5ufxj9kE4Dctk2xG6Dh31qNN5YmFjITb5ncFMnbhtRTq+pceUo+TdPy9Xg2WIF2Rex W1hn38BRiopuEe2aKREsQvQxuEBwhR54ob9galX9yz4Z7mrN5Imo7VgaSJCQ1Zi6+oBT Eu00gLaNVY6UYmztQ4NMtjsjkt4Rnb7I9cRcVegQqSFKjB9uZoPDAlOJT2c6gwPTzWzr VgpFrF3O9iTCzhsrfI0FRKDYhE+UGkWOmW3OYM7uIASLrtCHmhqtu4fDiTzXhFhS036+ g4dg== 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:references :cc:to:from:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=EdICoHTVaodW+n/xPaeGzwzoDmBPQlEugZUyTzmhhOw=; fh=mhkJO0S0Y1jYVVlsjMiSyOfPSs2Gs7mPd3ELi0/gORE=; b=ONdWDGsvgxOW2OmBSd5kn8Abvd9vVHxo3ZH2mdxWSiCHAcrilsWI+a1/r95o67tsBE /QSaRjXNy1wLqetZ2g/VLk22BUB0TmSFaJLV3cs2jb4MUB/O9Qj60iidDv1f15/vICHt 5jyWNQO5DpfTPjl3iRYJgmSZdm2dX68mQFv8KAKExldEIYEdtxiOqS2nDNJUGe7ADvhy ODD2M/OPruvUsIJtmLRJ3QL0yf5Y6CGecNAXBQ3+x9DETBIqi8H1bf74sxZpWN0BbsJb qPXbHl9kiYwYsBoepyU5CZTzGQ1rns8hF9jINbq3gkHJukNMdiHpO7DZdZPLUvV18vd8 wLqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=qow08uAw; 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-55301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55301-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; AJvYcCVd6qLLBeKrXWioGICmVWhbcR44r+wBYeCNaBEid9u6rHWnnban+xJxpBOPuYAsqz2UeUcKsaTMcZRRu2OO86bT3QLvAvoeHunfebE2vQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u14-20020a05622a14ce00b0042c00bed435si2694420qtx.700.2024.02.06.08.08.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 08:08:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=qow08uAw; 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-55301-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55301-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5AB3A1C23D6B for ; Tue, 6 Feb 2024 16:08:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA84F132C38; Tue, 6 Feb 2024 16:08:42 +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="qow08uAw" Received: from mout.web.de (mout.web.de [212.227.15.14]) (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 A31C813474D; Tue, 6 Feb 2024 16:08:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707235722; cv=none; b=jtOhnsAik4NreUMajDgGuCYn3r7q5X21zgnwGN71ItrxHTR93q/oTHlksK7Vg3d2RtItnqhvD+4Cm31Ys1bOOLHAu2yaF63QMB92TnbJv1F2uWp64JjlIdENE6wGvdtDPDfWFQeGuW96a64P72r5r1QjX5LNyAwrLMVl6RfmbnI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707235722; c=relaxed/simple; bh=vTxrG4v2mMuRDOPQJTUsTxo4xRJdjAEb+Gx4TOmxTdc=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=NLe/rJd4+/QoWeuHLksaIW12bAKgH4h5TrJm4qHNAgHmB+Zys86Byqj7OrXBYV6ftWq+PCXA+/rQxL4xCbWSCnfgZaDU1i1j0kIe22T8dIWcy6h06vQwufLpkIwVxiNek3EapLHitd8LUKVo2xJBdmZf2Wfa1KQ6n4AhqdG+eqw= 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=qow08uAw; arc=none smtp.client-ip=212.227.15.14 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=1707235712; x=1707840512; i=markus.elfring@web.de; bh=vTxrG4v2mMuRDOPQJTUsTxo4xRJdjAEb+Gx4TOmxTdc=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References: In-Reply-To; b=qow08uAwuU19vDccnNrSwQm999hAa+xaJqjaRKveLz4TuaqAlPS9xDy/FntFsVhj gpHRLXkhaLsvjAl4qVEgHDGvkmfdObJD7GgrY/uuvFL0OdKVF4zA0VQwdsLjEG7l2 B1ZHGXJQTyFBJn31nLWvTOGy/vwZy9zWL9xbyk6v+zqKHGT0QOmMh16Oc/lI6rvWf DTHqfPPW7/QSvf2L3nmv43pQKNtQ/ccfTg2BGJY851jjzFjIFofDeBuXzyrsb8rRg /Z9Kp3+DVmdiNh5Ipupmk0eACCTAZzT2kT1rXuf/zPOVvOIngMInviTo78oqq95L6 oGao9Zg5yxoe/e5Sxw== 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 1MN6FV-1rH61y465N-00Ilk0; Tue, 06 Feb 2024 17:08:32 +0100 Message-ID: <59412fc9-396d-4b62-95a8-1aed3d61cd0c@web.de> Date: Tue, 6 Feb 2024 17:08:30 +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] bus: omap_l3_noc: Use devm_platform_ioremap_resource() in omap_l3_probe() Content-Language: en-GB From: Markus Elfring To: linux-omap@vger.kernel.org, kernel-janitors@vger.kernel.org, Tony Lindgren Cc: LKML References: <10028785-166f-4473-900a-c845cb690dc8@web.de> In-Reply-To: <10028785-166f-4473-900a-c845cb690dc8@web.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:yMKkzTis1C5GrJg1MYR0yoiI0PL6rmtZvDNGLvL1U/FuGBODU6U YmaRourHQLmJJlI4TyOdG7Z5UkiNz0HHSeuslLd3I7C9QMjuiDBEEkOSJPxWxmJSrhvZKK1 ubwWVK4LkcnXp7ndwro4xC5TiQn7cn/tmr7srnfRZ3FDKg9DACDjk4zBDjpVmG6KYFhtYrs HzKIoRUk3TXQFXJF9ip0g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:CgzI+ARSy5g=;PGo8R9aGxN5wkV9x6th3wTbZxQk ajU59lUXBIyYEMOnll9JQJxGAkAH+2NeFRzzuLJMnXGsVxnfX6/fj6Qwmh9+oLUIV/VjVqLVI 5TUKr4KB1+r0eln8fVx6UXL9nIYzmfiBFyv3JF8dZiv0OvNFCQAK8bV6xNTj55JrIbBK77lPW MwMXdU5VLFFup8kzRvogISabQC+pAK2uUVUeHpo70tuKNGrlZu3XkQjVC5prYiRmr7VShYMdu llgL3FLmplraSZyKsk/5acqp4xYdS+FLbIf/Vi9Mo5cwKiDvXs0WVPBCb8sjvENIOcW71+dBN G7CKSPjhYrxhkZ0az7/MOP0vU7HuezBDsXXtFVsm3w6jAqHiGU/Ezwky5Ug8kp3urgQHhE6XT lZE4CsUXk7mGTNDEzt4nLqveOifaFWnPFH/X3zAKL9S3B+7+HbQ6Z3QTtQaMKtl8imz6k8yRn zwKRjpH/AXgNXV32IxzZ/MHm1rjnKjdd0+M3kICYWiBmqDagSaLMXVKGPnoRuabGevTlD36Xn J0t02bl5reG0V3Nbd43a/crwEvXEOnjBV+YkIWmANn9DkryvOCkm348fsub6OWID0sa7hulRW TmvhpjVoauEHUoarEGeAbCT+v0egoAakA1TovMyYFvX4F4CyLDEZhAJIgox+dcfZKzsC3Mva6 IbUeuFxWu7K4k86RGTHimJi25c6F0anAfcjClQeGdUH+KUPrHNPRsTGfXe3v8YpBdKiW6YOJu aQ+5meeXkVfDZ2WudzVLSTFLPfu9AdWwARqrF2HdUiWbfTOxYD+rVH2DI61a5qUSbCwQblcoj 7CPjb41poqYz3o0bqyGi4IQqVKui2aCHfEOxrDoy7glFA= From: Markus Elfring Date: Tue, 6 Feb 2024 17:01:25 +0100 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/bus/omap_l3_noc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index eb1ba6319fda..f114dee4e937 100644 =2D-- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c @@ -255,16 +255,14 @@ static int omap_l3_probe(struct platform_device *pde= v) /* Get mem resources */ for (i =3D 0, res_idx =3D 0; i < l3->num_modules; i++) { - struct resource *res; - if (l3->l3_base[i] =3D=3D L3_BASE_IS_SUBMODULE) { /* First entry cannot be submodule */ BUG_ON(i =3D=3D 0); l3->l3_base[i] =3D l3->l3_base[i - 1]; continue; } - res =3D platform_get_resource(pdev, IORESOURCE_MEM, res_idx); - l3->l3_base[i] =3D devm_ioremap_resource(&pdev->dev, res); + + l3->l3_base[i] =3D devm_platform_ioremap_resource(pdev, res_idx); if (IS_ERR(l3->l3_base[i])) { dev_err(l3->dev, "ioremap %d failed\n", i); return PTR_ERR(l3->l3_base[i]); =2D- 2.43.0