Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2539031rdb; Mon, 5 Feb 2024 09:29:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHI933yzmM2R5VJpSlIs7y3r/tdMbPNv7UlXDQaCHr8VPyksAflwBRW8OF7QgY6aYDDME+V X-Received: by 2002:aa7:8102:0:b0:6e0:3b97:377 with SMTP id b2-20020aa78102000000b006e03b970377mr169161pfi.33.1707154161291; Mon, 05 Feb 2024 09:29:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707154161; cv=pass; d=google.com; s=arc-20160816; b=FbLBEY6adEhpiwXWTklwwpQCf6QTRZNcVJtCD76RpNVdwb4175gEKd39BhCIbTtFL4 oqBBRZo/RsX7xAXzyAJKG2TPuUESAKc4EDk7F+PVJfB4xyLhAGso6PlQj29SDuCm2Kqd tZWpZ61TBon4szHm1cW5TKwWUM3PEpiH/HpYuF9K127U7oAKe+i8FR2kvnWQq5mN8qwX XKb5yha2GIDr2+KiKya9bfofzIHuhF4Qxey208kMRlwGuwU8ejfMeyHPGyDy+1RH3XW3 Wgz+G203ij2LsZFj46JtFW4BzIuSd+Efm0ku0O8XIErGF+3Ss98qxP7UD9umYc0uag+C 59zA== 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=QJab5g8/Evv7HpDvMbyG1Wq09IDiW3cHdgtMVJpvi9s=; fh=dpnbtjhhPziY2BAWkHlnqIK8Rovf9/rg9qrdzAbTJxk=; b=m37N2QzwZrtH6wDG3CbihLrFdXbkikyNs8EeazS8TB6flhWiYSrRLOwbV4DS0hNr7z l91oWwsmMsC/zA/j90kFw/Mg2DFvlHZy4orLY5QqnxhSp7+q5zgUpVP0RDN9kBFKiKPB goQAiYvDG+0Y8ZD3H/tlV7yRWJUw87OU71/7YUd3hUFyvPzpqm6NK8Lt256mKvMwqKdA wyh3GSl50lq7jMkU4UZ3cpE3BSd6lYufA8i31vHiYpT9Lo+ECD1cZnOypaWBLZ0e2fbK ay2TsQNqmM1qEcUKW9TlvGhSa8mQ1oX14GRBsqktRWavpAgNoHwo9EpCrQciLPgqv2pZ M/DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=PNUfyyDl; 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-53104-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53104-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; AJvYcCUl+hBM2eevqeZJ2W5x/+VgAV6ig7R0uPGaK5LyG1whIZ4Zj5OPEIPi39nVoA1A4RIt/b0UEY/gFIfGs+p1GoPHgTV8rB33dnIOcSXKeg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w15-20020aa79a0f000000b006e052a11b5fsi88472pfj.393.2024.02.05.09.29.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:29:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-53104-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=PNUfyyDl; 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-53104-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-53104-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 9CB142827F0 for ; Mon, 5 Feb 2024 17:29:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5036245949; Mon, 5 Feb 2024 17:28:59 +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="PNUfyyDl" 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 1B60A41218; Mon, 5 Feb 2024 17:28:55 +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=1707154138; cv=none; b=pAZEof2kt3sSGdmva5rZTFS4m/3eyJs+ZmPyLws4lhwy6URZCWMOEX/Q42gEW6ECmMULkPTqygpJQEYpLA0xtMplfctiotLDDXk36+t7z63dfI1dc5Rp6a3B24rCAVx2kpDrDIlo+ECuBw/6NgEAtif2vMwQBPlzXPbfckesWps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707154138; c=relaxed/simple; bh=GnkX8qqYvyQMd2mJCkO1YmK0GeiquaSlbUasLbvc4nA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kPxDhnUi+5pxf1UDn2RcEizILdVF+R8MiIcJ3NADzumNSv/Ip+BdkJ3SPei4xMffhTpHllhtnjGpzSuYfa5O+dKnxXUWxaUC3S3o7DCVu4n82pnnqu3orkIHjnWwvdkmt8VdptSSWWLt1IuC/MESuKzxeDUDy0V7jd0Q4KFZCSw= 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=PNUfyyDl; 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=1707154114; x=1707758914; i=markus.elfring@web.de; bh=GnkX8qqYvyQMd2mJCkO1YmK0GeiquaSlbUasLbvc4nA=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=PNUfyyDluiMQQZVE+qA9Hqx95hEFp//dcIyvG0wGtxmV3LvCwYKU2R+pdTBGShU8 RDqfUCVUHjupWNUOl/OpLlssMf0lwO8U06H8xiAUOqN9OANoBs78cM+SqpeK2Y9e3 fU5o75MsbYxnX0T7DGi2VBtPjhg7VFkUnPoFIfF/S8x9X/Bv7W38SxvTmoN3KSA6P 7xbf0eL4JajawtohwX13xiE/QGAMTJiZvofEyTsRCiNXrXIj5gkI8pOGTMofb7xaz l3vmgIZuIaIT947FW9E/bzR0fkRRGxedFeZTTYSvacRgXpwvW1kXMVNHNO/diu2oy /KjvN9HlOUDVO5sdZg== 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 1Mgzeb-1r5O3z1pBl-00h3rE; Mon, 05 Feb 2024 18:28:34 +0100 Message-ID: <8f011126-c95a-4c71-8bc9-a6b0a5823c96@web.de> Date: Mon, 5 Feb 2024 18:28: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 Subject: Re: [PATCH] pmdomain: mediatek: Use devm_platform_get_and_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 References: From: Markus Elfring In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:JR4A/TH7VX+6fxHtk4rBvyvu9uUzxS01ZNx7ukYZ+MXC2RD7iz7 c42oLIJFBks9maC2WA3glXfX3Svisu5ANYahLTso2aXW7mLjmwcYCJMJjCjzHEzeZJt6o6G zZj/nCidCVTYzvfmzykuHQbQLNO2dHYvbi2EPNp/VRZXpNiUP9D11s7VHKEIr0iWPurbLvr +QqHuwTptTwqS+UVH7r8g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:U2xZDLOeXpg=;fiB8cvep5CQVXtqba7Q5BfUhD2n Kn0QoQ0j4AV5Wcko1+RW7eX0D5E53NTnVgm1TD1FESs3mxO+h7kMG8Y/6TVaciCY3d+2ZoQX9 spEGXByyM8BA1MKx81+VFpWCpyYpksKtipQwFuiFLyZdKbVwzRURG2ODI+h9u09BBot418fzC msjvLu0mB7fA2Pr/iJCCfnPT8Bvks2t7O+UOWj2maJvMCfVfWGfNLr4HTwvjyfEk/3KUCMH2s HIiE3IYrsKJU/XzhztMSg8zbbSJPrgjmTP1X8hW/wi5HAOMrUHp5cUv/g8xa65Y6BgmxBxtmj 1nfirQExAMlakx9sUxINFMfg6Icm2IWCVVVt/yhfF5mwYXXarp59XHYQmK3M8t/6MYdTgysad hs68CuYMQIgUxoD+el9yj3VGcor41CP7jAQlY7jVNka5RwPk8dpAgMxOZVIjBvae3T8mR4uVO kZ57mNYhOLzCPnU0zXOMO5OXA77saYa4t8EroUBgxEJl0YBJ1NYM2uqE9EqP7i0EmLVT09SRj GNPB/ky2OT/3p9+etLKJY+Q9X/udwNIsGpo4WZIQNfQ9UakV8+AlN8bcnjNPYkfGhEFlBNoN9 D2mhuOldIaU8EqVqWlZA3F0uziKFPHjJV/nIn6tp8uDVl3ZqvH2aoJi1dUR6PafLGuzFh9te1 vz2vrjGn9c55cDJqiLT3UvaQl4jZ4WS74bliP7p3JJsbbHCgtxLnBD7MG6l0pUYG3E95B5n3E +3ohmiFxOuab3yKNOdfgc4gCjfZrdr4wKgSp5FL4pMWcmk7MajTatjPSoU9x8uBXMf6hilusd /a5JN9G96FsHN9OybCn6V1gSCb1bLOauvZiKYv6N1U2a8= >> +++ b/drivers/pmdomain/mediatek/mtk-scpsys.c >> @@ -441,8 +441,7 @@ static struct scp *init_scp(struct platform_device = *pdev, >> >> 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_get_and_ioremap_resource(pdev, 0, &= res); > > Given res is further unused, please use devm_platform_ioremap_resource() > instead, and remove the local variable res. I got another idea after looking at the implementation of the function =E2=80=9Cdevm_platform_get_and_ioremap_resource=E2=80=9D once more. https://elixir.bootlin.com/linux/v6.8-rc3/source/drivers/base/platform.c#L= 87 It seems that it is supported to pass a null pointer for the last paramete= r (while this possibility is not mentioned in the interface description so f= ar). How do you think about to benefit from such a design option any more (instead of the determination of a corresponding platform device)? Regards, Markus