From nobody Wed Dec 17 04:16:35 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 0261321D00E for ; Wed, 5 Feb 2025 20:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738786276; cv=none; b=M0x5MyVfSd9RUIrVaEj18iiplx/S5Fggd/5SEpKUYtJ2VyEAWh4d5ohOFF3k/t6KcR4kV6utdDTWr7bK4nmESUBBXzHiGyz2XInkmqB84O6hrQEoQ49/Y9mMqyrOM9JkCOEjKqd1dgiPkp7SKHWMdY/2YqW4tJukU/6kFQ8eZ8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738786276; c=relaxed/simple; bh=7+Q2lsuHInmFMU6F4dj3qB4yNCyOo0pZ9W9kufCkjVw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uym2eHgDSe/pYkKHrHGcEtO5GPJYQcKRfBQj9dJtYJGE+dJbitMsSV0o7ZOyoqF7D/OOyDMOFgB2bkVR47NSKiDbRJ4OaNjlql+bxAtY3//vEAne2gisTB/DnIt1yvdVP5WXatws/hrhFAOSnTJmnFJviT902rxsxsirRCl2Yd8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Cm44ddxb; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Cm44ddxb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738786274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SZeGtn73Y88CUfVnHvmhJXIyAiaLqqpqwADZqySX09U=; b=Cm44ddxb2OKViHdwzseSVHNaWLLRGZpT50zaTasGgYwCJ+DRLOKzJTM8fUTU2VKhy6jRGA gRVJzKE2Qoqwdoz+KgBT/Q51qjqLHE/vg+XCrp1fLNe9JQVRcug/Czmy+tzeOS1p/RdkZP TNOSsM08bFAJ61ZcTDqGZJU1k+cpBuE= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-357-3WWc_lScOwmw5O8Fu9VkmA-1; Wed, 05 Feb 2025 15:11:09 -0500 X-MC-Unique: 3WWc_lScOwmw5O8Fu9VkmA-1 X-Mimecast-MFC-AGG-ID: 3WWc_lScOwmw5O8Fu9VkmA Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B462D1800985; Wed, 5 Feb 2025 20:11:07 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.17.21]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7C50519560A3; Wed, 5 Feb 2025 20:10:57 +0000 (UTC) From: Anusha Srivatsa Date: Wed, 05 Feb 2025 15:08:06 -0500 Subject: [PATCH 10/12] drm/tiny: move to devm_platform_ioremap_resource() usage Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250205-mem-cocci-newapi-v1-10-aebf2b0e2300@redhat.com> References: <20250205-mem-cocci-newapi-v1-0-aebf2b0e2300@redhat.com> In-Reply-To: <20250205-mem-cocci-newapi-v1-0-aebf2b0e2300@redhat.com> To: Joel Stanley , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Andrew Jeffery , Stefan Agner , Alison Wang , Xinliang Liu , Tian Tao , Xinwei Kong , Sumit Semwal , Yongqin Liu , John Stultz , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , Marek Vasut , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Orson Zhai , Baolin Wang , Chunyan Zhang , Alain Volmat , Raphael Gallais-Pou , Yannick Fertre , Raphael Gallais-Pou , Philippe Cornu , Maxime Coquelin , Alexandre Torgue , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Alexey Brodkin , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance , Jonathan Corbet Cc: linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, imx@lists.linux.dev, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-tegra@vger.kernel.org, linux-doc@vger.kernel.org, Anusha Srivatsa X-Developer-Signature: v=1; a=ed25519-sha256; t=1738786137; l=1744; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=7+Q2lsuHInmFMU6F4dj3qB4yNCyOo0pZ9W9kufCkjVw=; b=760bfuqeQwB2H7jkE4dYuBDK73EXGEZNFWeKXn1Of96MzG/gKvOtfpspbFSJECAZcDlGGB/p8 CY4DM7EBirEA1qRG0o0TqcMkXSTVS6lZYO5NB4/ZPvsibEJrpSbIKQu X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Replace platform_get_resource + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_1@ identifier res; expression ioremap_res; identifier pdev; @@ -struct resource *res; ... -res =3D platform_get_resource(pdev,...); -ioremap_res =3D devm_ioremap_resource(...); +ioremap_res =3D devm_platform_ioremap_resource(pdev,0); Cc: Maarten Lankhorst Cc: Maxime Ripard Reviewed-by: Maxime Ripard Acked-by: Alexey Brodkin Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/tiny/arcpgu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c index 2748d1f21d8697275047886865a5518792a4dd7c..7cf0f0ea1bfe4fa82234a120b52= 837e26a8ee5b0 100644 --- a/drivers/gpu/drm/tiny/arcpgu.c +++ b/drivers/gpu/drm/tiny/arcpgu.c @@ -253,7 +253,6 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpg= u) struct device_node *encoder_node =3D NULL, *endpoint_node =3D NULL; struct drm_connector *connector =3D NULL; struct drm_device *drm =3D &arcpgu->drm; - struct resource *res; int ret; =20 arcpgu->clk =3D devm_clk_get(drm->dev, "pxlclk"); @@ -270,8 +269,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpg= u) drm->mode_config.max_height =3D 1080; drm->mode_config.funcs =3D &arcpgu_drm_modecfg_funcs; =20 - res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - arcpgu->regs =3D devm_ioremap_resource(&pdev->dev, res); + arcpgu->regs =3D devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(arcpgu->regs)) return PTR_ERR(arcpgu->regs); =20 --=20 2.47.0