Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3107748rdb; Tue, 6 Feb 2024 07:24:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvrTLiJBI8jdwyLSwinIvJ8D5lvyEH1x60P3G4G6x78TGZHmWa9s16jMxk+J0OX/ZST6+X X-Received: by 2002:a17:90a:a014:b0:296:643:bd00 with SMTP id q20-20020a17090aa01400b002960643bd00mr2780021pjp.23.1707233069747; Tue, 06 Feb 2024 07:24:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707233069; cv=pass; d=google.com; s=arc-20160816; b=V32OQeMAOSvS+khJSpKU5AwwafZFWmdYQrHBw66SgxEfwJAa2eFoE/0MZ509Vb84qv 7nLdHQfrxz0Jkl5KxXfM9JtAt8/kk+Nm4pQDhbuEnMETwmPu/o5t4AogRmGLoJdGcGmf 3Doug2HKHHJF8sFemayuBHXZ7to7zz+ZF3TMGC5i1wqaFizeGoSqRZ4+P23eaTjQWW2G Ig7tL0oB3pR1KIV8XTb4mp4B8TheHf0BAsgD6WlHJUehBqR5lCoC9Wl7DuTi8C0dH5dh n6Nu5YTrzjX2C1yN3ksl2u5QsJJZpZtFJiOpSzOmBT9PatUMy5EoA2K3tNa5GPfnTa8d NG4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=JKCZke1KMPopQ9RKPdCxdFTkVP9U+Bz1cnxAljvkmYE=; fh=3qtXcBXVFQpiDIqTiD1B5MUKXQkMCwPGw6HAMryehZQ=; b=MpAp8rzcWwV2AWgg+LWcUfBoaBLJhdryLFeRywNbUASQH6MbzPrvz7/2gVvyghjP5m c+X11XiEjAJSizHMBaBfCuoqj5WJpA0SpAHTqRhbJZSqTzh9gJg66frkDqP4uktfVckx qM9XqR1/EfHKyf30jyokOUtEF3PhqAdfnqTjiHaOq+6LThW3ZxkKgpAtn2n5WVoGbexF MWybNJjm26pQqDqUcmZYW9Ck65Ebxc+N8xMBV41PZqTC8mFPSwb4kfMk6CNt6i9r01Nx tPvHNTDQ5w1E5GymFHb3GrZrbSFatwlBHEqKJ/otmqoHEb6CFQuzNmU9tP/f7z29mFOx 922A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SWXIoCxE; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-55157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCVpe/3utQacE0CSJFf6xB9uT84lv6QctacvP2NkeF5Hbtx+5zXESOtd6zCBMGweRCDV++rRYdme4cHj8v8Wv8S8yZZBxsUb+421GkAt/A== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q11-20020a170902c74b00b001d5e247e336si1741067plq.628.2024.02.06.07.24.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 07:24:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SWXIoCxE; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-55157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55157-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4D1E6B30D7E for ; Tue, 6 Feb 2024 14:58:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C38813342F; Tue, 6 Feb 2024 14:56:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SWXIoCxE" Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25493133420 for ; Tue, 6 Feb 2024 14:56:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707231362; cv=none; b=TnGT/Vnrgg4fFBurtXK3THacd+QgCxFIHoPUY0X1jd1ZnDrP57HVFATUbRpr5V6it54GXM/Io0bmaMaRy9FEnCsl4QgCnohgN+YapimvRi/2eUG+oGslfULfWikF6u7bPH4uoremUhY/1yNzVSOnwwcb48DuGDOQt1GZPk+Nbus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707231362; c=relaxed/simple; bh=hXolM7uNjrqi4kvTV1pVtTTaI60yBGc/tHdLQl6Jd68=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=qpH80O8s1k89am0kLvq18FLVPMU2VQWb3BLKPadI69dCKFOVRZnNJ3PtzFdS7UeViaDHLq16IwT0UqeTBc54xEmvPPHmCxj7Jdw9iLFiYYX889BP7qSFWX94+QNJOPTilSayo125L0udcAZ1HRzHedYzyxw3jXsOirldqOr+4h8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SWXIoCxE; arc=none smtp.client-ip=209.85.161.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5961a2726aaso3293559eaf.0 for ; Tue, 06 Feb 2024 06:56:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707231360; x=1707836160; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JKCZke1KMPopQ9RKPdCxdFTkVP9U+Bz1cnxAljvkmYE=; b=SWXIoCxEkE7gxoZcd8yCWS72shPdnhLgjxYmrAxh70zJq6Zs1JgzBCAdIkaR/biSgI ywQFPM5Y6+jBqrWmro71jC/IJc+wxykVMpO3flRlJuK25WD2ommgk2PZqyXjCjnWCY1R Hbf7gB6yG2liZyOIlwZiC/AModrZ2tkV8PkpzPb3/xe3chWfScZPrqCEEPCFkW5sOUjD BfPvMw743aVPDaUEOaQ0opBMlZXofY2aOEymKPaSfB2im/pALYen31TL1w9yYCxN14sv WW9thKxlSxszgcBlFd6Ay9OC5WWNjbGhweW1fLsIE2u2HQ7Qfbbp8k4mzEYTtIK4kUq0 0k0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707231360; x=1707836160; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JKCZke1KMPopQ9RKPdCxdFTkVP9U+Bz1cnxAljvkmYE=; b=fxApoILLAc5KituSI8OoMyShLBUHYfmDEJrQi+C1ESqyQT1A0I2v7KP577I2msvdiT pM/0iLCUBwCXCJNz3M0MwVsKsnY5eyy4lydd8j+1Kj3G/Hgb+8T70SVWbgpq43zDmjYT uTcNtlwW+l8s083HEsNCD8DmPCdMQ+Um6jXqMgQdOdTbvvV1pc5bFkvyiraYJjKR6C5M khnVdpSZInKR2LcxDY9AJoda9BUgB4tzqgoMYPRLi/UI6kya1zCOWZkXEnOS8gzRaZv+ 1Oqp3BZ/16ZwrzRXjoEDj/5m+IvSbY18ulVaM4f+eMakMpqx8xGuitI8c3iEzQX3gAzn Qe3w== X-Gm-Message-State: AOJu0YwJW/hraU3iDnCFopnkHeT/yEPkZGORykq60rnt3XDBKbIn1ynZ jo0Ay1s8TdZHv5skoCOM3pste67HL2Q33vZFFyTSWVj717xv3WdK6FOIZ4/36QUQxwCKXEC7cqS K8nckDChkjYHm3rfwgQJ+av2/v9DbvgezWvmfJw== X-Received: by 2002:a05:6359:4113:b0:176:40fb:cf3a with SMTP id kh19-20020a056359411300b0017640fbcf3amr2357172rwc.14.1707231360167; Tue, 06 Feb 2024 06:56:00 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <6e397bf2-1d45-434f-8619-58a737a138e3@web.de> In-Reply-To: <6e397bf2-1d45-434f-8619-58a737a138e3@web.de> From: Ulf Hansson Date: Tue, 6 Feb 2024 15:55:24 +0100 Message-ID: Subject: Re: [PATCH v2] pmdomain: mediatek: Use devm_platform_ioremap_resource() in init_scp() To: Markus Elfring Cc: 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 , LKML , Geert Uytterhoeven Content-Type: text/plain; charset="UTF-8" On Tue, 6 Feb 2024 at 10:21, Markus Elfring wrote: > > From: Markus Elfring > Date: Tue, 6 Feb 2024 10:05:34 +0100 > Subject: [PATCH v2] pmdomain: mediatek: Use devm_platform_ioremap_resource() in init_scp() > > A wrapper function is available since the commit 7945f929f1a77a1c8887a97ca07f87626858ff42 > ("drivers: provide devm_platform_ioremap_resource()"). > > * Thus reuse existing functionality instead of keeping duplicate source code. > > * Delete a local variable which became unnecessary with this refactoring. > > > This issue was transformed by using the Coccinelle software. > > Signed-off-by: Markus Elfring Applied for next, thanks! Kind regards Uffe > --- > > v2: > The transformation pattern was adjusted based on advices by known contributors. > > Examples: > * Doug Anderson > * Geert Uytterhoeven > * Robin Murphy > > > drivers/pmdomain/mediatek/mtk-scpsys.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/pmdomain/mediatek/mtk-scpsys.c b/drivers/pmdomain/mediatek/mtk-scpsys.c > index b374d01fdac7..59a7a8c261ed 100644 > --- a/drivers/pmdomain/mediatek/mtk-scpsys.c > +++ b/drivers/pmdomain/mediatek/mtk-scpsys.c > @@ -425,7 +425,6 @@ static struct scp *init_scp(struct platform_device *pdev, > bool bus_prot_reg_update) > { > struct genpd_onecell_data *pd_data; > - struct resource *res; > int i, j; > struct scp *scp; > struct clk *clk[CLK_MAX]; > @@ -441,8 +440,7 @@ static struct scp *init_scp(struct platform_device *pdev, > > scp->dev = &pdev->dev; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - scp->base = devm_ioremap_resource(&pdev->dev, res); > + scp->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(scp->base)) > return ERR_CAST(scp->base); > > -- > 2.43.0 >