Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2241358rdb; Sun, 4 Feb 2024 23:20:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEM98TFZO/FlwK/jEaM+yMh9nMacN7hvMKqc5Mfu1L1IjP5ofmIaDvtJpD2rdfe/vjiejb6 X-Received: by 2002:a17:902:c952:b0:1d9:adc9:2962 with SMTP id i18-20020a170902c95200b001d9adc92962mr2846108pla.20.1707117652005; Sun, 04 Feb 2024 23:20:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707117651; cv=pass; d=google.com; s=arc-20160816; b=0AlOA/0/KnTs2k2+eEvApI2V5JGK7NUGMWKwxU27hFu7jZRHmBKcPiyvo5cO2xA0nA QjC2oGTDh0EVR0KVWYow1R7HJ82xyq4Nteq4Tp8eXJhc9dSKzOZq6LzQJ1ZAGPMMGlVh w5HeP4ZKbjHcri1AjFob+6C/qqfY86utC1CiOzsrB14W3SbIe1D50BNMmo9QOYuGJo82 tLLHvTdq8M3U5oRV9+OahmfrQ7QmVeViJKBUGHyuMt7kK/5IJRxBNnTpbbyVWRyvRYY2 sPboierAlPTsA0/Z4QYMk6QrcptMQFNr2avRawUBaaT7FoASoS8M3QM6W9K6OeDKdwuP rY4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:subject:from:cc :content-language:to:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Lls2u9f2DO2k7CcE3uraENkjtWg5TYbF8i8KDnTBliI=; fh=YgyE4KDlFv3CJmzzqhM3xQQEELOSVv/nzS1mMN6Qrhs=; b=HAYnD2WiUmilIErROO0nrjlQF100j6Yi6QTQZ8f93q36dEFhPL4j2+FpXU4zoQhEOa NT/a4PfiLHKr0AzyWCO/E6aJZAB+6dKVTxW/BvqqF06pMfAEzfzKV/vs8pUeUGLUBh2P cs1B5lVgIys81ySij5Y/34l0OsHLsmyFKf9tKt8AIxlBUBS3cf0sZyWRU0CzolL7hfPP vQS7digZuZPhQ3aPliN7n80eLJ5PpgSzkszhnBZHpY9tu0Pk7uFomtRp2LE3Ww5PNkb+ bNoN4TmiGEHuFSR8NKtwfHS957zMkP+VDmoxAS37bZdgqvgDUA+LCwk/tf6jTSkGVQlL 7nnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=M2L9jptv; 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-52117-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52117-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; AJvYcCW2uY6J9xd2tK1eQgYAZx5khV2a6/8NOVK2Bp7Q8jm1x7hIOVBFjiq0I0wJwPPxFEtt/MY77ouYztk08gDfnDXU62uD+OI+/WnC5khd9g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id je4-20020a170903264400b001d8f126011esi5799757plb.41.2024.02.04.23.20.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 23:20:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52117-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=M2L9jptv; 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-52117-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52117-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 64463284BCA for ; Mon, 5 Feb 2024 07:19:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C4521101C5; Mon, 5 Feb 2024 07:19:00 +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="M2L9jptv" Received: from mout.web.de (mout.web.de [212.227.17.12]) (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 646D011190; Mon, 5 Feb 2024 07:18:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707117540; cv=none; b=nSphi5CRqpYXC+SE+JX861bciXhJwlip07wqENndk66J6M2c4wBYMaJFZiQHMCK3HCD9Pg62cVAtfhpGVoAFBu120S3RKKsqUdLweYZzUcwMTkrB39LHN5dcKRRJ/d6PAcUg4hehEsD52v5vubpRdnfdywDNWf1+ewv0HsY5szw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707117540; c=relaxed/simple; bh=73k30Uuu2I0nXwmzN/giEsYyYLykqNOzfOvlrrvM9QI=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=jUXCCdz4+jvhNA6MeXAVUHd+8+Lnc/6UdzEqojGPm43C7NaWtPEr8yz4FmefHYANqki00+7if57VgyOHQMQLvDAVAyDIGwV60u3ddjWsYIzNuU/nxtN7PfovqtSrwfUvjdQNS4KAzrBwjNVxw+luNlzYv9ZpAese0EFu4nBfh64= 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=M2L9jptv; arc=none smtp.client-ip=212.227.17.12 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=1707117514; x=1707722314; i=markus.elfring@web.de; bh=73k30Uuu2I0nXwmzN/giEsYyYLykqNOzfOvlrrvM9QI=; h=X-UI-Sender-Class:Date:To:Cc:From:Subject; b=M2L9jptvoI4I7+K/EudTNtJrCo0CPh8GMvqhLw1GZXVWPw7519nQigtlsdsflvKj rID500k2cNuaQYce/tTHZi/nagQasi/P36aEfd+bMER9Z1psZ8xmcP1XsjJjDpmD+ If1DhcgKtHvqpFIGibeD2sLrkhJbynu/hR1vhmYsRqyzBtkFreY8t39DA3B5WwJmR W3/a8I3DyWuzpvjmCDgGjjglQd6a8rJTtf5rfjs7V2zFQkkhoijM1acAzQFsg+ki8 JMs7PRZk5ELEXCza8+uUHGma0g7r0Si/Tz4Ho/ysHd2r9FXaaijRaVMe7xy4ImusB m/JNDLfCsQMCTc/Zcg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M7Nmo-1rebQ610LE-007sv2; Mon, 05 Feb 2024 08:18:34 +0100 Message-ID: <0b255d17-deab-4d6e-bf44-d950b512dc14@web.de> Date: Mon, 5 Feb 2024 08:18:31 +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 To: linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org, Borislav Petkov , James Morse , Khuong Dinh , Mauro Carvalho Chehab , Robert Richter , Tony Luck Content-Language: en-GB Cc: LKML From: Markus Elfring Subject: [PATCH] EDAC/xgene: Use devm_platform_get_and_ioremap_resource() in xgene_edac_probe() Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:4hV7VJ0mx1v/VvrknYWWyPT1r0T07XTywcSSrrjZxNUELMe+hag MeVbBYU5q/nEhNx0LZ7rfm9tMQ25/pPdOPBlfB1mBPbH9bElk7c0sEEwTOv/QNFYXPkUDg1 gm25BR26WYV5zBjKKVEJgGH6u3I+VFXERsXymYkVexBoij3lSv9dbX7Wti/2ct06xa1n+tz ob6G05muvdrywSLVHp0eA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ZAg9M4qwheQ=;c5zCXkRmxY+UGlNIsKrF+g1zke3 fGPzSLCw34v1RPBeYLeN09uPFDiiYIpivGB7A10GlwaBdEEVLe5gyKoXB4E2yGEu+4+p44Pgt M0JQyESTNaySDqnd3yADb7GSYB+2nVPU9/9X20FELbf7jAN1qoDyLyUTYmYKCcvU+mPnNv3HL qFevPiEzOe1zesSmEfUa5Wt1HaxGszvx/jsXqQm9BTRSbGROVwmGkOGOjAnIYij1C2OP+n9lw xWcD8y0XwqWL66YtZ7IIXAuD6adgkuK5aqgYvejaog2rRg+KWGINnQbI22UrEmg9nOwisGn7+ azcBlFOpON1E6uAePbgEmuMUkt376Ggtg52udxWoDl/nxlRonv4QdqhZWkpWMsKqSPvXGwqv5 S35o3A5zlGnO2lpgvtAKPMvftHrqJbXELqI/VOFZGJovEVftAIcAEbIN31bubkUB3S3KnPwbA kVU+9SK5IzW2aXHzZkDZtNURbD2G/0rVVjd6emS00QicvaZUQdeQqhgTo1MbnssG5hINMzbHr nbXNXdWRw2tXSPnnLwIIpEBAPsFlO6I/1/V9b715fJT2lVFHWpYlefEcmPFEKmRYRUpGfUiae ciM0FlPkf/ACR6mldBDse1WOy1jFsEeELznNvvjgyn19w49GvC8gIw7GN3UpWQntIJKUDL6qO eXMRgYBr9cSUUt7qp6ejQTvgb1YSQatV0z5U/SUk8JrQZ70XYrLrjYwO4Jw0a0q4Ys43lGAPn +a/w0J+ix4UfjIrQas3RrCdbxLHpvT5ZuLj/J6V1KpGkw9nJT7YjLmWF3qrNRWLNUSN4ai5P3 6eqqLxTzfUoLtVhE/ScEPA5mqf18CI4rLVjMHex0xhF6s= From: Markus Elfring Date: Mon, 5 Feb 2024 08:12:24 +0100 A wrapper function is available since the commit 890cc39a879906b63912482df= c41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()"). Thus reuse existing functionality instead of keeping duplicate source code= . This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring =2D-- drivers/edac/xgene_edac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c index 1b50f8160013..8776765b6d2e 100644 =2D-- a/drivers/edac/xgene_edac.c +++ b/drivers/edac/xgene_edac.c @@ -1903,8 +1903,7 @@ static int xgene_edac_probe(struct platform_device *= pdev) edac->rb_map =3D NULL; } - res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - edac->pcp_csr =3D devm_ioremap_resource(&pdev->dev, res); + edac->pcp_csr =3D devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(edac->pcp_csr)) { dev_err(&pdev->dev, "no PCP resource address\n"); rc =3D PTR_ERR(edac->pcp_csr); =2D- 2.43.0