Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2376909rdb; Mon, 5 Feb 2024 04:59:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IH40dq4tavcQCHUV7duSVvXQscuRdKD3EZtpjx+Ukm2bJuC6ZPgY29FG43061z5zw84tXbz X-Received: by 2002:a05:6870:799a:b0:219:7e3f:1372 with SMTP id he26-20020a056870799a00b002197e3f1372mr2925069oab.26.1707137968384; Mon, 05 Feb 2024 04:59:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707137968; cv=pass; d=google.com; s=arc-20160816; b=hB5TMQEY67doyJv63G6Vu1ee/AH3vQrl3fIDknKLHWJqoYHucM8jcaeNSJbjSFCSqD 9zJbTsLn+N1mgeTHNOFZEE8ixuMW4axWQvoleGNtZSknYH7PjRoTb10+2uIXbtCCSVz1 Eis1xQf0L1IFTXaBL7iRuL9qT7l3Z80wehDni8b3yl3bLo5wHnhxqHUbFzBbKfXRkGp5 Uzc+yusUsvXM6vxS1FH75pF7FiEdgVHMpdNlK0b9Hr+JNwenLqQq5e6Qoc0cM5Xuq4OC EDysIwC/9UCGKHK+FvSd6/8MAOV25lsC9jzmD4BQAfiyPVoIoLos+Sw3IgOb2FFsCDEm Oz1A== 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=1kWGAeYZpeOLnVUVlSLqeCjEPEV9phb5EKTMnP7NRDY=; fh=k2mp/QcHBSOfXl2hDxmOjPTWQGquob2t2w1MSeDE4sA=; b=XZnsJeNFhTJ2QTw6QRojjVf5zCBceueEEKh2f8jYXK+5E/l/S8mBxUYAfMDZri/hr0 bnRDjEiIxGb9qUzfNbJ4cOrD+9Ypfv1KxW9bIPdqWnZP2BK5eMFt8Ld3nw9maFpZBFFL 9UgnsTvUUsmXE5TPMmHZbQZGDdcsW+mq9w14Yymi5LmtRhz2B3aPCxo8BqA/8bQfXRTx epCehf+WHz9CW8sb0X9ZC5jM/TgVLdb1OnpLCtZrSzwRqenam1ujp9ZOhty2ywG4JcHl L+PgCKrirKZfw8/IhTGks+kD5NtQlfOuNJNhmxzZWiwZDuW1Rv+f4QyWX174Q2Aw1HCJ lnOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=Aa6kIfpv; 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-52666-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52666-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; AJvYcCWUISxCn++nIm3wWcL0ztLRVKtYOQVYd7bQhDo1HrPCPh84SxDHWFPqT8IIqVb8K9Q5OMaPrmWMfnBZt/zy+nvOM4mXpMmnrfLeDSConw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q124-20020a632a82000000b005ce172ef504si5752176pgq.36.2024.02.05.04.59.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 04:59:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52666-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=Aa6kIfpv; 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-52666-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52666-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 5FA90282CC4 for ; Mon, 5 Feb 2024 12:59:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E252A2C68D; Mon, 5 Feb 2024 12:55:10 +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="Aa6kIfpv" 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 910FE25745; Mon, 5 Feb 2024 12:55:07 +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=1707137710; cv=none; b=N21OZgDSHs8RidOTM602ba7biE6IMWTS5k7F3pnTI7WA+efUxhYqsOO9mTyrAiogllLahA1JjG9r+AxtKmGaQZomIDyxq0Qa3y7HgxJ4yYZ+8hzwiEG1+evvMtmboLXcJwJ7Jbea6rMr7wFSPVo2NLYPYesSZQauHUbO68XrVOs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707137710; c=relaxed/simple; bh=ubxYnRTkDHR9gQ/MmRDSdOi510bYVVITttwnMFoHQBo=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=dpzRvDXZs3kO5fwiSXnPPJJzUyr3TIelBAhZFZ1YvLW+8glYy6j1ziFXjMyGozQCfcGcSyDEwgp3BRHCP021kEswQMjVZ3MV1j47mdRTxJ6ofgSkXycw9TDX0bmi3w3NajLH16E0vbTQjcuDm5csaISO41cr8XkgFdEoIVV5+/U= 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=Aa6kIfpv; 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=1707137668; x=1707742468; i=markus.elfring@web.de; bh=ubxYnRTkDHR9gQ/MmRDSdOi510bYVVITttwnMFoHQBo=; h=X-UI-Sender-Class:Date:To:Cc:From:Subject; b=Aa6kIfpvb253opFrQSAf9awwBYK1avsyqkrSFGALrUVQPhwSqaa8j5ob7qJ+/aMj agaY40rOLo21Dwo6NTRKXoCRdNjXdqL6V0c5mf8v+3TpDTCRPAXgDsym1naj9Q2Me k+4MDTHXip0epjZprK23EOLQ72h6j8Lo67iawQsdGUhV6t2MUcaLXZS7hYiYa0IOz xL28g7QXxCAuEcSkkFp9WGGd2ZYEMh9yl4h6wjLhD29FXYFd+FnPeOJDM3AYeAU2V 4uvmDdn9L1RM5zVo8biFhe9NwhPxNDO4nlyT6FgCnCPyDaRn9m8Vhdh2KGvgFyBGM STFEjlhy2yqCK6ub7w== 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 1Ml46y-1r9lhQ2xJs-00lklC; Mon, 05 Feb 2024 13:54:28 +0100 Message-ID: <29e9dc0f-5597-4fee-be5c-25a5ab4fe2dc@web.de> Date: Mon, 5 Feb 2024 13:54:24 +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, "David S. Miller" , Eric Dumazet , Gerhard Engleder , Heiner Kallweit , Jakub Kicinski , Maciej Fijalkowski , Paolo Abeni , Yunsheng Lin Content-Language: en-GB Cc: LKML From: Markus Elfring Subject: [PATCH] tsnep: Use devm_platform_get_and_ioremap_resource() in tsnep_probe() Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:vHzRAgSYM5kFE8q9ZgJf4a2rOZyWIl96TFDBb5SYZFTfE3kolAE rYzb/bg4F1yEXM9XiYZxDKia0/D2jkGB66sc2fxoswtsDQdMCVvzlMPh8M6X2ZHR9ej6y28 BeORuWSl5QEWroybb/tYPaHbEmDEa4H0aaDLvaLvjKVCAVwzWFa1oAe9BXbCtF+NuptaTh+ AxWVu+cWD4OTLbffmgdNQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Yf5+cjo6St8=;bHOr7z08bxlZSe/lZ0lJhLOqphJ aZUwHMRBEwnJuCXU8v1E7VSeDNgIy7WH6RgIOdE1M9RD8kvI8pAixgMQLZGqFcZSgnj5ejxRV cRDawMA6JfOPBLF1pYSeG6/8BxiWMmKBgV6ohzbKkVht5VxezolJtsiq2QAdXfHw+hNoOagfT qWYN8LdXyIqeQBzTYpFAAK14/7E/e5mAAdQF+3JRRjoU4vrgOsPZ7wsaMliWMmlfI1uODKFPS Rvi9KTnUQyCX6tF14X1VB04vW+FzuqhUPP5ZiVlWhRnXSPqGxmBoJf8xMmtJM49HgL1VVevmW KJtaoOVSClivVDplBPECY9HOAlso/ZsmJuEc8lQVkJDwDsc7OMoDLO+aJEeFL1ElB3bHIC1uu 7benc0h4Ny0Sfhqc0VwXZkCkiiDcNf2BwHosIEVlqZOKUUqNxjvttF+St35yI7UJLVQ4acjZS bH2jCO2NditzFDvpiaNkBlugaiB8jlwESIPMOVooRKstqtF0r8WvBA4jIYLiNnwPKxA9Xhzn/ i2Lsz9NIOaabA8Xn9EWdozadLNQRBSYN8jW69V+ldR0/+iBqpFFuVy07gVGkdX+okFzjZPx9W NBQ7gnjb1/UV8hyZuhTVkeIExhrPgJZhqzr/ndpm7CZDAVkWQ+8/FQ2AUw15OgshYDTR45u6t PoHtpH/BKeC4nc21YYifFBSnHXPtRZUBbnDrEBnUH3W6NoCBNZJr8Aq9u+Gj6CxHpkc4WQCIz fE/i9kQGWlMlX6G4NvrRW/wVJbuMwMJR9gyWpN3z2gXOrYm02IRxDUgTE/MV+ZMqFOZxffybX 5Vu6keUHvw9J5PaYmdQQvTXlANaNVOYHCGUa+tgPZStds= From: Markus Elfring Date: Mon, 5 Feb 2024 13:43:14 +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/engleder/tsnep_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethe= rnet/engleder/tsnep_main.c index eb64118f5b18..498c4d47e0fa 100644 =2D-- a/drivers/net/ethernet/engleder/tsnep_main.c +++ b/drivers/net/ethernet/engleder/tsnep_main.c @@ -2564,8 +2564,7 @@ static int tsnep_probe(struct platform_device *pdev) mutex_init(&adapter->rxnfc_lock); INIT_LIST_HEAD(&adapter->rxnfc_rules); - io =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - adapter->addr =3D devm_ioremap_resource(&pdev->dev, io); + adapter->addr =3D devm_platform_get_and_ioremap_resource(pdev, 0, &io); if (IS_ERR(adapter->addr)) return PTR_ERR(adapter->addr); netdev->mem_start =3D io->start; =2D- 2.43.0