Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2408727rdb; Mon, 5 Feb 2024 05:57:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZ6APx4bd0/XNhZ3M6Y27C4qbF5+4/eylDNO3ERxm71L4/wmJvq3cDp6R/4VydBwemt1ss X-Received: by 2002:a0c:aa1a:0:b0:685:edc7:62c0 with SMTP id d26-20020a0caa1a000000b00685edc762c0mr4997527qvb.30.1707141431525; Mon, 05 Feb 2024 05:57:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707141431; cv=pass; d=google.com; s=arc-20160816; b=X8Vjy9qvvtl/EulF6la1rDQ4bM8mzHTyHiQbYhuKBxABu3xtEoqrjE4Vw8MO2EqE8K fIiTbuUtFtLVx29M0Pgf8mIJao0RS7j5ZJRyxktnSwyTiwldc5nFRx2xydMuW0XH0E36 TJHtRBon6RZkkqT18yBAK7bfC0jeDbuegLzNW9Ekz1fkau+PBMew7ZIvYYqjLwvDsz5H K1O0k+AstV11GpOshswjHDivgjuz4SojWmtVUZYTwdbz+9bVQjDO4yQIRU1lSqDFY82M 20WsKJm2Re4m8c26jj7oZ3cXq5M6uLTIEWpE/tlRjBoP4xTGe/1CzM3C6AT4BpL0walg iVbw== 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=dg7KhVabIiLcru0hyt+MCwkdEnsIWMbkIvITkhS/lYo=; fh=VDA1wHvXmHWMw1O9NsEamcarYIlfd3TceeL88MqIDjw=; b=PYJ3r9ETouQvaJNJCoUaYlBXPmkR0mufbmMoD/IZfncAtIeILIonVgs9PyuEgH0YpS qEARcEzIr+8gEkIhM2mSTxbcx66p+1SNsth6/LWri9+I0u6N/wF3M2daN4QSVVr8tzhn phy4Z+8DIt7rIhZpCCTaBI1NnGDJXG3CuTukSCP6CZzAVvGp0S38z37JiNs5g4Zz2gZS ondcBXGFla5DkjbNu2e7ZEWb7vzD2srJ1A008ZdQLpcIaOmCoNjvl+Dju6PtRq/J81Mu d9PIQuP6Z+MtnWccQFyZy70sJVZf9Wcs20IKaRH+ZrAF5Uwc+ZBuKuKz2GvNB3GulTyq AI5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=HjTm0cjI; 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-52758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52758-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; AJvYcCWjNbZeW/duiUyYiw+JwsFGGkqNGywdzG/NnTbutBLmHKzQGh4kKFyJPMDY8WkMm091K3WQfNQA+iRdaQ2BqZKINvq31S4S+q3kcz8//g== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id eu16-20020ad44f50000000b0067f6f831c13si8151400qvb.219.2024.02.05.05.57.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 05:57:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52758-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=HjTm0cjI; 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-52758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52758-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 457011C242BB for ; Mon, 5 Feb 2024 13:56:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD58C2C18F; Mon, 5 Feb 2024 13:55:55 +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="HjTm0cjI" Received: from mout.web.de (mout.web.de [212.227.15.3]) (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 67DA42C18E; Mon, 5 Feb 2024 13:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.3 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707141354; cv=none; b=hY6Cn5MgMU88MJ0xr5NUOB0LjtIIqVDlLqyu/LLJKX9albzKJoTkmH3kIOybUcJXIyn9T/VQhQxsdJ+DlY/GMDfk+pRVwRcmqUbVqJHQj7WTW3ARkKGgui1CjaPZkqZKAhZ9Rl8qUT/AYU8CH3wNBrGXKXrM+KkyYuycccO2s1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707141354; c=relaxed/simple; bh=OCQlC6fsw7RMniTUmuvaoqgcVSnBwtdH0tkNLVCdCq8=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=omj06vOZfhsorxkbTyx6LDacbwX80QISf04KGaSh7peY9gT7M22a2Tce5HoXhqV6ooWJQHWajEqnm6v5IhRwUseIAq+e4//UqQXQKmFQmZa4/qr3dTArLAmXGqvLFhWXn3E7g9XuW84nt1GSd5dq4GcumgSfCiFDTqvOJGthlzg= 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=HjTm0cjI; arc=none smtp.client-ip=212.227.15.3 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=1707141327; x=1707746127; i=markus.elfring@web.de; bh=OCQlC6fsw7RMniTUmuvaoqgcVSnBwtdH0tkNLVCdCq8=; h=X-UI-Sender-Class:Date:To:Cc:From:Subject; b=HjTm0cjIhCbiMgsdEel77y7fv7NC6Nxsj7jv8GhO97SXEgb80r7lEmSsnvClOo2k VRo9narPy0zxhHgqewR5nWaWe1/RFPO8uhNXot/GYfNXg4/mfx9qGOE7ipoctl/QT 7ouWHRyhDooc+FoR8S4frgEy+udQ/exFyhlmIvp4OhY7oI+cjSyUBEFxCxYvaQieB LhkMTbxEPKAPTQTLXlPgAUB5eulc/PTD6LCMHpE5o70wlqNsuYvazVxq+KOFlXygY cfCED3D1wd7mfkxSWusHEb0HtYz+uWXaizN6O6dBrhoL4x85vo3Y+nEkCkawfPi9J 0yKqqnj6ySiWnpd2fg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.85.95]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MBS71-1rjsY53cFD-00CvRd; Mon, 05 Feb 2024 14:55:26 +0100 Message-ID: Date: Mon, 5 Feb 2024 14:55:23 +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: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Michal Simek , Paolo Abeni , Radhey Shyam Pandey , Rob Herring , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Wei Fang Content-Language: en-GB Cc: LKML From: Markus Elfring Subject: [PATCH] net: emaclite: Use devm_platform_get_and_ioremap_resource() in xemaclite_of_probe() Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:HpdtEuakUvahbDKCQGbUBcJH36NhioRvkShEPpZoWqMQzGg2Udd /66drifHYG+/g/EHez/UbXsmBO6j0hVXMihQB7PpnVN3Kse2RaGRq1n1IJLo83c6UWHPt5s qikcEeE6Nn8vGJ6t1+LCL6V9QE0S+Zo0yGsJ8wCOWwtjU5U5+7xpxcjAUs2W2cQ7M0/MfYj x/Ow/w0rihGGsmWWtwGjA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:DX5qSgtT2yY=;FgO4dz25//lf7S/k9N4m/F1fSkO +78p+4kNPIMGJRtNflgVgoo8qWGIRjTl7v4YzqPB0omKxGZYcRQHS4noibbgO910/zBmyQ6gc 2mRH8lIwjH5IniM5IZf3sV2O/z4nGGmc0GoJyZlXe/gCjTs+9+aA/f1RhSlXkcobxzD5HWRyQ pJbNLEYl8APxI7gnybKG85B7hepN1/dXB4enZK9uRd0DpJaY4qLZeR7Ob2MLGv4qwBR4zotGK aDtz5wbpYvPWsmgfDoKcP4og+HBncBXPmw+zbsyWTIp2uWUZwUhJcetr6I18EfgT0pHscP9+I MYgXJ/RFbIVd5PUtzwEAHQ4W9hyCH6BUHC3lQjhwI6mFwpSNldW4PEZTCyDQySY+WYIJhmTsE 74KAAOXWXE+pW3aIy+TCbj9yiazBfFnxMf0hGhoxhpOzQXRx/RMD38+YMgKpdJRHMWcvWv2nT e7hjhAqw+QFlZgKLBpMl4PSddZcJdh+MQXTDuRt+Aqde2pMDtv84pJjDUH9n6bkJ8YMsQBS0S 7LJa0LXIPbVChJ1NiaWXZGHw+YjaT08Ok840dYMU0oKOhcKud4fes9nw8OeF/4ypEYQDFYIaF v/nSLHcxZ4G9Xi86aUJJKztZ0KdsmRmkkww+4C5Ii0yn6PLacy5Hlfz9jB7knZN0GnjZSYhS9 wf1sAJc1rlqg74WElTVpPg0hj6l9HfZblAFKXiDPYmemE7EG1oNTq+LI8JVeuutSZGCKkZSvm KV/+6fWej+r7PuND9xJSZZBJx2rHyaL+wgT+zGftwKBCACI0cSx74W8ryUsdwGrfUdibxRzlR ZbImIoeCr/Io+lMei6EJiEb/cjz8qOscxadJIpCqJ3DiA= From: Markus Elfring Date: Mon, 5 Feb 2024 14:44:20 +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/net/ethernet/xilinx/xilinx_emaclite.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/e= thernet/xilinx/xilinx_emaclite.c index 765aa516aada..940452d0a4d2 100644 =2D-- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c @@ -1114,8 +1114,7 @@ static int xemaclite_of_probe(struct platform_device= *ofdev) ndev->irq =3D rc; - res =3D platform_get_resource(ofdev, IORESOURCE_MEM, 0); - lp->base_addr =3D devm_ioremap_resource(&ofdev->dev, res); + lp->base_addr =3D devm_platform_get_and_ioremap_resource(ofdev, 0, &res)= ; if (IS_ERR(lp->base_addr)) { rc =3D PTR_ERR(lp->base_addr); goto error; =2D- 2.43.0