From patchwork Tue Jan 28 22:29:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D85A4C02193 for ; Tue, 28 Jan 2025 22:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HmFvH9jnwWMHznPDF0lsUnIMS0zxQ0Cjj2cBONQ32e0=; b=S8XGb8rl/BMpZFUILrycsC3MQf VyBhh+utl5yGt62txDkBqxA9rn+6Pnw94cYq+w5JAM3QdK/tjMD+12kp4QtqgZjkli9ZqNydMv6Xk poYd+9lDRh9SbS0MN1sUtkzWd+dXGwVOa0OxWg48o2PtHuFAhnc4DvW1Z+Bhl/TL1RZcFLHhNDCNk xV5YE+JdfXJrX0fxEhRjTXy+Ld7z/gKa0XGHEy6zxKVbSILhRpanO6nJzn0nkeQW1FUOg2Uc3o+n9 P0/Qa9x429ugedzs9d1TNZB3oJVUPFUZdOJGY/SAdaNpsQHfS06pSDp1YIFDeHJBHLNIgS5lY0pYa EyJf3aag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8C-00000005x8L-063Q; Tue, 28 Jan 2025 22:32:28 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu89-00000005x5J-03wN for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103542; 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=HmFvH9jnwWMHznPDF0lsUnIMS0zxQ0Cjj2cBONQ32e0=; b=iVvxA27skp05SXXZmdWhHWFKBEuGliqSouFzeUhghsperKvWJLIJOgR95xRrHvFhJcFKF0 LCuFhqzLVwbrO3NEgJCDZUxy0iLe1ShLLv0eDW17pPc3CCAyuKSvv+490C3mvfP4k106ef mtJFrhHHMgbDWIEH95KlnlSMT7tYlNc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-76-dU-QctAoPsayneJunUncAg-1; Tue, 28 Jan 2025 17:30:47 -0500 X-MC-Unique: dU-QctAoPsayneJunUncAg-1 X-Mimecast-MFC-AGG-ID: dU-QctAoPsayneJunUncAg Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D9444195608D; Tue, 28 Jan 2025 22:30:40 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AC44018008D4; Tue, 28 Jan 2025 22:30:27 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:25 -0500 Subject: [PATCH 01/14] drm/aspeed: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-1-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1375; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=3yjjteo5TK5ux7t99sLxgYSvQl7c9hRZtBGpvh9qRJw=; b=Z0V135r7CUwOl+nqJW1+aMVcuyTzYTXlZnu3ZGdK2yGuOHRHjYkUUmWJWB/NIJjSdbDVXuCkx x1dguxptwSzBiYOX1BR+v9CcXE2W31YR+x4davqSB83Klo0RZbPR6OL X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: RbtRyPtxdIvtiTXAHq-DwGXyzKtspTtwN0r2BE75GaU_1738103442 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143225_118995_A6032EA7 X-CRM114-Status: GOOD ( 10.46 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Joel Stanley Signed-off-by: Anusha Srivatsa Acked-by: Andrew Jeffery Reviewed-by: Maxime Ripard --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index 397e677a691c2c6d199063f44358196a4569b389..46094cca297479d1cf19f6db99538c5e7a0fec92 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -144,11 +144,9 @@ static int aspeed_gfx_load(struct drm_device *drm) struct aspeed_gfx *priv = to_aspeed_gfx(drm); struct device_node *np = pdev->dev.of_node; const struct aspeed_gfx_config *config; - struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(drm->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); From patchwork Tue Jan 28 22:29:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953272 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23298C02194 for ; Tue, 28 Jan 2025 22:33:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lAlVhEovi3Moc7M0X3CwlbuNR4AC2AlPw2mJBO4AZuI=; b=s5v7Dq4Ord9P4dqOvyZfCND6Uq WAXVK4DouNaN4ZlJRl8kXjm5BGCQPjHXJwdE41gPkHt5agB7mJi8K7YIKacV/Orl7rUEgcr8riqli Wd/59l/z/xQDSum2IeZay89g5ou3aObznyd/Tx2B53rzph8MRVMSH4n5BVw07L9kkjxHuLDDU+nPf x77WdG9xhxcsqeBvi5WUTF7kb7SLk3+3FGjvcgRdW0fLzDY14OwRvlVzAnNt8Wl2o0FaxU92SNWWi ZnRV4V7LcW3EHmvmq8qGazVGs8ylKzqbAAR1aNrd0TlRAUEeQPrtV3o3Es7NNr0uYOnJS5RVPV2qZ EnNvRdOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8k-00000005xp1-07P0; Tue, 28 Jan 2025 22:33:02 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8g-00000005xjF-1d5M for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:33:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103577; 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=lAlVhEovi3Moc7M0X3CwlbuNR4AC2AlPw2mJBO4AZuI=; b=cNq8pVSIF8Qymmo4Isbtq5FpLa3IP105aalZW+NfKm2tugZCapafk8zF2GYwc5UdDU7vtH KVWi28XPBu78CmQYYdcnu67MwRvkpV2YW/dEq4erUjrLd+AeSPu4GMl0OqlvhdrISyMzEn XF40pzNENKWHPZqAcHw/3KWYOxELygs= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-67-k1KRTK1yM5GR1U36nh5WLw-1; Tue, 28 Jan 2025 17:31:03 -0500 X-MC-Unique: k1KRTK1yM5GR1U36nh5WLw-1 X-Mimecast-MFC-AGG-ID: k1KRTK1yM5GR1U36nh5WLw Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D52AC195608A; Tue, 28 Jan 2025 22:30:54 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 315BF180035E; Tue, 28 Jan 2025 22:30:41 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:26 -0500 Subject: [PATCH 02/14] drm/fsl-dcu: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-2-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1572; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=E/x0XHfCIYue1aYPjwmvjhLSrhE3WYrX8VtBbLE/Ors=; b=o/s7NBj4DCNY2pulLJsJuj/ZWooQ7Q4OXjwNgE+GzlT4LHlVgk+SwhztgWU9DBj2cokJBlAMD 1cuOYyBx9wgDmTlkdvTPHqjWzzViiuIkUi85/Bq3GHnhQvaMLPCb6uC X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: PubZiST16bBImIk4Eb-VBXipwQfWnavX2eWExU13t3A_1738103456 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143258_511750_49574FD7 X-CRM114-Status: GOOD ( 11.92 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Stefan Agner Cc: Alison Wang Signed-off-by: Anusha Srivatsa Reviewed-by: Maxime Ripard --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 03b076db9381a5db0bff6576cda2772495a61fed..3bbfc1b56a6557e2f54d2b7ed099531053871341 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -260,7 +260,6 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) struct fsl_dcu_drm_device *fsl_dev; struct drm_device *drm; struct device *dev = &pdev->dev; - struct resource *res; void __iomem *base; struct clk *pix_clk_in; char pix_clk_name[32]; @@ -278,8 +277,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) return -ENODEV; fsl_dev->soc = id->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { ret = PTR_ERR(base); return ret; From patchwork Tue Jan 28 22:29:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B58DC0218A for ; Tue, 28 Jan 2025 22:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8ppu6Hxn7eds6hVdudyY6IyGaw0deGVqQvLkC+3cElE=; b=d+fo0Y+kRb3mMzwvoAaf+DV6CW t/kBH0yu3yHHgejWIsBR10C3f8GyEKyvty7DUqA6Wc7ebG3m3fjG98U20ulfoys4Z4WJc4llSXwAg sdTUYNDegB9aWYM5XtrRArmRkdSntZPzQVFb5A0US4XBW8NwnbzvV1ytZAWFc6oy660aMcA7kzweC TTUxZtCCcULJ34RXIxLuSnVd0t8Oxb8YLoGsj00mPr3H9cmgxsldwdtULDwmHYQAyyKH9l9o0eiua dW/2XJMujyAdv0z+mhtEylB1Bq10be4M4cALuyy1CiJj2Fh5ln66i96lsWw5XWfPHQrt0zpn0kmV+ RFyXs8pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8U-00000005xU1-0V31; Tue, 28 Jan 2025 22:32:46 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8R-00000005xPm-23sL for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103562; 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=8ppu6Hxn7eds6hVdudyY6IyGaw0deGVqQvLkC+3cElE=; b=BCSEyag1g++JmAvbd0EAqym02kzydiArLJxh7ptTra2bd3xMEs6RxVjy3vIEvVa76TxSzl ILwYkU017IEH9YJUGgKeOB03ogmSkbD0Rj6cMrpVNEmCjbIDxnXJTvoKOJvqEw/vDIkEcI W617JSbd+DKqoz6jbE8uupEJvIMUFWM= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-GPMXt3rGMeahSr_HoeOi3A-1; Tue, 28 Jan 2025 17:31:13 -0500 X-MC-Unique: GPMXt3rGMeahSr_HoeOi3A-1 X-Mimecast-MFC-AGG-ID: GPMXt3rGMeahSr_HoeOi3A Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3676E1955DCC; Tue, 28 Jan 2025 22:31:07 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2C55218008D4; Tue, 28 Jan 2025 22:30:55 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:27 -0500 Subject: [PATCH 03/14] drm/hisilicon: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-3-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=2919; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=Psk2ovSxNSmPk2j8mgWkV0b48v8ExBeAmG1+F82B7t4=; b=1sq/7D6zzuwyG7D9t25OtBv+NjBas+ltESTs3qH9oSOySLstuoe5U0ByLencsB3oi9NzB5N1T 0tjbtLixIFCDdv/UfLyukM8IVBaBlWK/938tBYGgq+90ECO4eJGfjlp X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ip7C7n6XTyX9o_znwtWa0vI5TmOWUZ__BKwF7ucM5MQ_1738103468 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143243_605497_278851AE X-CRM114-Status: GOOD ( 14.00 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Xinliang Liu Cc: Tian Tao Cc: Xinwei Kong Cc: Sumit Semwal Cc: Yongqin Liu Cc: John Stultz Signed-off-by: Anusha Srivatsa Reviewed-by: Maxime Ripard --- drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 4 +--- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c index 2eea9fb0e76bf3ead8f5914e6ebb65b5b3603b9a..e80debdc41763357cb2cf321205c0dfac80a911e 100644 --- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c +++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c @@ -825,7 +825,6 @@ static const struct component_ops dsi_ops = { static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi) { struct dsi_hw_ctx *ctx = dsi->ctx; - struct resource *res; ctx->pclk = devm_clk_get(&pdev->dev, "pclk"); if (IS_ERR(ctx->pclk)) { @@ -833,8 +832,7 @@ static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi) return PTR_ERR(ctx->pclk); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctx->base = devm_ioremap_resource(&pdev->dev, res); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctx->base)) { DRM_ERROR("failed to remap dsi io region\n"); return PTR_ERR(ctx->base); diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 2eb49177ac42bc6dba692328cca5c99d5925041c..45c4eb008ad5d639340f769ad022d186ec454722 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -844,7 +844,6 @@ static struct drm_plane_funcs ade_plane_funcs = { static void *ade_hw_ctx_alloc(struct platform_device *pdev, struct drm_crtc *crtc) { - struct resource *res; struct device *dev = &pdev->dev; struct device_node *np = pdev->dev.of_node; struct ade_hw_ctx *ctx = NULL; @@ -856,8 +855,7 @@ static void *ade_hw_ctx_alloc(struct platform_device *pdev, return ERR_PTR(-ENOMEM); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctx->base = devm_ioremap_resource(dev, res); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctx->base)) { DRM_ERROR("failed to remap ade io base\n"); return ERR_PTR(-EIO); From patchwork Tue Jan 28 22:29:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B243BC0218A for ; Tue, 28 Jan 2025 22:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OOJO4gc/B+VHUdBaesnMxetPUuR8LvhMIAVa1+IoQu4=; b=rMAnqkDaIYBJiArcdGBbHUkSMp T4noVZNQdlTQPoVCp0woCN0CQ+p+WP75vL46RbVTw9pRlOWZKYnLJocmPb16v7McGva4ZnFCXWMK9 ytRWrmr+hdFlQj8CG5YGo4h1WAmWI7aqwanxcu1AQqnQgZ6C58KRWyZsi/BLQY5c4smQlv7dh48Qs AVi74Sy8oit2Mm/E0jupuhYvkos0SbD3BZMT+ZHX0g/tx9r0HsANdXVkd6DRxxOXeAs2JP8FcHjaz IRTT+sqIU15PdMaTk2UWmYOTHdsiDlf3sLq7O3RBKZEfpttuR5J4yFH6eWqZHZ0w2pdXLBTEtQKy4 csvi+hjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8o-00000005xw1-35Em; Tue, 28 Jan 2025 22:33:06 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8j-00000005xnu-3i7m for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:33:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103581; 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=OOJO4gc/B+VHUdBaesnMxetPUuR8LvhMIAVa1+IoQu4=; b=bI6QyhPoB6jQOhv3K7xCYbjW7+hxL5IeJsdgwPJBTYCfwkd0+d7m870IlOFyidfuHHpv7X mfaKsMu1PVHlXS1e/WoFxw4qFXd+csY7zNXyjpDCl4hMz8Ry5XpixtfcEDK++9GTesRydL 1lJoAZNFnMtYTYdKG3ct4fuQg84khtE= Received: from mx-prod-mc-08.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-136-7j-pl0h6Pz2nIB6mBhVRKg-1; Tue, 28 Jan 2025 17:31:26 -0500 X-MC-Unique: 7j-pl0h6Pz2nIB6mBhVRKg-1 X-Mimecast-MFC-AGG-ID: 7j-pl0h6Pz2nIB6mBhVRKg Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1AC71180188A; Tue, 28 Jan 2025 22:31:19 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 68A8D18008D8; Tue, 28 Jan 2025 22:31:07 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:28 -0500 Subject: [PATCH 04/14] drm/mediatek: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-4-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=8685; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=gaN5bJDrpd5isCfkjzOID9ayJIdjOxeGWmWcCy/9kzE=; b=4JqLKC3lLko04weQ+MEDCYBVXDqsSlfwxocDxAFY3BYTnrKl36ckJSkpR+MWd1F9pxscvg3xv KKBNFra279iB+pnUVuA35jZdjT3NrPWCBYvKORymFXIYhpBzZ41z2d4 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: e5VJ98SEW1Ne9jTckoad_4Ty6f8mS9Ex6368H1NXSHw_1738103480 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143302_045487_AEC561FD X-CRM114-Status: GOOD ( 13.29 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/mediatek/mtk_disp_color.c | 4 +--- drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 4 +--- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 4 +--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +--- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 4 +--- drivers/gpu/drm/mediatek/mtk_dsi.c | 4 +--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 +--- drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 4 +--- 8 files changed, 8 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_color.c b/drivers/gpu/drm/mediatek/mtk_disp_color.c index dd8433a38282a9ba1bcc3a4ddd01dd89738ccb60..39c7de4cdcc16b56a5a1d046aaabaf5580227ed2 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_color.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_color.c @@ -96,7 +96,6 @@ static int mtk_disp_color_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_disp_color *priv; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -108,8 +107,7 @@ static int mtk_disp_color_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(priv->clk), "failed to get color clk\n"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) return dev_err_probe(dev, PTR_ERR(priv->regs), "failed to ioremap color\n"); diff --git a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c index b17b11d93846f2019d8c4afb294375333e22dc42..8afd15006df2a21f3f52fe00eca3c5501f4fb76a 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_gamma.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_gamma.c @@ -256,7 +256,6 @@ static int mtk_disp_gamma_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_disp_gamma *priv; - struct resource *res; int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -268,8 +267,7 @@ static int mtk_disp_gamma_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(priv->clk), "failed to get gamma clk\n"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) return dev_err_probe(dev, PTR_ERR(priv->regs), "failed to ioremap gamma\n"); diff --git a/drivers/gpu/drm/mediatek/mtk_disp_merge.c b/drivers/gpu/drm/mediatek/mtk_disp_merge.c index 563b1b248fbbb38ef03bb3e3ceecdd265961df60..b174dda091d3fbd16796e8e128b030fccf5b902c 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_merge.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_merge.c @@ -306,7 +306,6 @@ static const struct component_ops mtk_disp_merge_component_ops = { static int mtk_disp_merge_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct mtk_disp_merge *priv; int ret; @@ -314,8 +313,7 @@ static int mtk_disp_merge_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) return dev_err_probe(dev, PTR_ERR(priv->regs), "failed to ioremap merge\n"); diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c index df82cea4bb79c472acbb66e0df27fbad3e70bd20..d0581c4e3c999cf865fdd0aaf4c2f38dd404926e 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c @@ -604,7 +604,6 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_disp_ovl *priv; - struct resource *res; int irq; int ret; @@ -621,8 +620,7 @@ static int mtk_disp_ovl_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(priv->clk), "failed to get ovl clk\n"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) return dev_err_probe(dev, PTR_ERR(priv->regs), "failed to ioremap ovl\n"); diff --git a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c index bf47790e4d6be5d60070c63c15c75fa201cc4b27..c9d41d75e7f2a3af5820921b7e563da377ce8d0d 100644 --- a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c +++ b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c @@ -313,7 +313,6 @@ static int mtk_disp_rdma_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_disp_rdma *priv; - struct resource *res; int irq; int ret; @@ -330,8 +329,7 @@ static int mtk_disp_rdma_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(priv->clk), "failed to get rdma clk\n"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) return dev_err_probe(dev, PTR_ERR(priv->regs), "failed to ioremap rdma\n"); diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 40752f2320548fbf6c7de96b18e8a636ac9c31be..f298293471de49473dd05973383dc22f7d3b6c23 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -1192,7 +1192,6 @@ static int mtk_dsi_probe(struct platform_device *pdev) { struct mtk_dsi *dsi; struct device *dev = &pdev->dev; - struct resource *regs; int irq_num; int ret; @@ -1217,8 +1216,7 @@ static int mtk_dsi_probe(struct platform_device *pdev) if (IS_ERR(dsi->hs_clk)) return dev_err_probe(dev, PTR_ERR(dsi->hs_clk), "Failed to get hs clock\n"); - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dsi->regs = devm_ioremap_resource(dev, regs); + dsi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dsi->regs)) return dev_err_probe(dev, PTR_ERR(dsi->regs), "Failed to ioremap memory\n"); diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index ca82bc829cb96446d4d34eeef45848df03bd716b..d729c13590cb5ec176f15b680c262a26b677e6aa 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -1425,7 +1425,6 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, struct device_node *cec_np, *remote, *i2c_np; struct platform_device *cec_pdev; struct regmap *regmap; - struct resource *mem; int ret; ret = mtk_hdmi_get_all_clk(hdmi, np); @@ -1471,8 +1470,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, } hdmi->sys_regmap = regmap; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hdmi->regs = devm_ioremap_resource(dev, mem); + hdmi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hdmi->regs)) { ret = PTR_ERR(hdmi->regs); goto put_device; diff --git a/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c b/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c index fc69ee38ce7d6a245a7460cfde8de426e83b2e80..7982788ae9df51f1a378d8d538737f38af7299f2 100644 --- a/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c +++ b/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c @@ -291,7 +291,6 @@ static const struct component_ops mtk_mdp_rdma_component_ops = { static int mtk_mdp_rdma_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct mtk_mdp_rdma *priv; int ret = 0; @@ -299,8 +298,7 @@ static int mtk_mdp_rdma_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(dev, res); + priv->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->regs)) return dev_err_probe(dev, PTR_ERR(priv->regs), "failed to ioremap rdma\n"); From patchwork Tue Jan 28 22:29:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5479C0218D for ; Tue, 28 Jan 2025 22:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uBHgf3oei/qHmIZpbMF9VehDvC+EICOlxAHVG2vbAos=; b=Frl31wsKueR5o7JQoRFmMbMq2u 1aScQ27avOGtLMqyU0rR0q/hfbUgy+MRnUeH/FY+qs0d8e1bZcIdfFg/Jzyzf+qxz6iZlhQweBTY2 GSeiMkTMha5feJ+DNfZ3x8uXOABryICptNseISVEStUSFGFcGUAwcfv7H+liUMb2paaGrAfSy0aJd Y7vEiXb/E9zcw+zs6huxD3RdkBypLGMAGHZQMoj5Y6+m549LNQf7OwgCsxMXcCUQmyFedC1LIOPin Gc5wEFcIuVsseJa2/WKQz5u0kVOJDXNMhlBObHR1jH2WLHmGJsHERIR+K8v6swrf5ubVwmCzb1MN2 PI6cYhUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7U-00000005wWn-28xE; Tue, 28 Jan 2025 22:31:44 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7R-00000005wTD-05ED for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:31:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103499; 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=uBHgf3oei/qHmIZpbMF9VehDvC+EICOlxAHVG2vbAos=; b=jIY3QfC9PtFjT9dAJ7JyzPEEIfHkjAAq6HnhBMQw8Ml54ZWTAWPEe5NbAgVJZCLQf9xKYC lg70R/MbLmz06Fjv/bSSqaTQoalhM2ua7I+dAspT5av9FUDrreGDF0mPhjPXjsLJB2iZLl rWhH1m4CDWoIDnvZGtpxXHkXwkch+00= 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-673-fxGDwM2BPi2Fc2IPObJXkg-1; Tue, 28 Jan 2025 17:31:37 -0500 X-MC-Unique: fxGDwM2BPi2Fc2IPObJXkg-1 X-Mimecast-MFC-AGG-ID: fxGDwM2BPi2Fc2IPObJXkg Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 3F1441800366; Tue, 28 Jan 2025 22:31:31 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 67E34180035E; Tue, 28 Jan 2025 22:31:19 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:29 -0500 Subject: [PATCH 05/14] drm/meson: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-5-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1714; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=f2q+dLROh+nmfHqYKZQjWCkJEGeXIqlbeRtQt42VgCQ=; b=lhClH7lzArBOUdWbc4Q4UnvQ1RCQ19pVNRVv63WKBHzCVgJMxuArGJpHa8TYtAgCNIzt7DlYr NxuKblbIiv5BF/Ek4dNs87o4KLEP61IBFsptwDPsRW00XhC+FVopP4m X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: f5Im36_-s8O0uuC-j73dQkS73ijvvaNdqmEZHkh0eqk_1738103492 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143141_135587_A5E1F89B X-CRM114-Status: GOOD ( 11.30 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Replace platform_get_resource_byname + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_3@ identifier res; expression ioremap; identifier pdev; constant mem; expression name; @@ -struct resource *res; ... -res = platform_get_resource_byname(pdev,mem,name); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource_byname(pdev,name); Cc: Neil Armstrong Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/meson/meson_drv.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 81d2ee37e7732dca89d02347b9c972300b38771a..6c805805b7a7f675f8bb03944318972eb4df864e 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -184,7 +184,6 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) const struct meson_drm_match_data *match; struct meson_drm *priv; struct drm_device *drm; - struct resource *res; void __iomem *regs; int ret, i; @@ -220,14 +219,8 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) } priv->io_base = regs; - - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hhi"); - if (!res) { - ret = -EINVAL; - goto free_drm; - } /* Simply ioremap since it may be a shared register zone */ - regs = devm_ioremap(dev, res->start, resource_size(res)); + regs = devm_platform_ioremap_resource_byname(pdev, "hhi"); if (!regs) { ret = -EADDRNOTAVAIL; goto free_drm; From patchwork Tue Jan 28 22:29:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953264 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5A7AC02193 for ; Tue, 28 Jan 2025 22:31:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yMcBg9K49M3BeejEiLmSt5GBgrJzsgbnQ34MkO1WtxM=; b=CQzKXZipD1gax78AqDPeAGrQzY WhBfd9N6HljXXX3JZ9OPjiSIzAuD2DsZb1Q17L6x5nDr6/1+a6bfvRVHQeMEGjKIB+WnXcor+wKX2 nOOlHLcnMyBgzgj0Ubxk0acM0ucSTX3RGzb12sLrV2gnUeipTUgPcoiNA9OfroFYGJ5W5ceEuFwHJ z3NLXJ//jhzlefnVuUzZjBMoUj3TFL/guTMCMRVX/ncuSq69SRzPE6ooURsshKgaK9C4WQiFWn5Tp q4EwtdsmN1JbjTDBZIho6sL5TG3ePpI29vbfCLR+z0dY8Z0Qvx918pQBJzlyL3koF2ZGiSVj7Bf/+ YTfnbLWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7h-00000005wgU-45mw; Tue, 28 Jan 2025 22:31:57 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7f-00000005wdg-2inf for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:31:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103514; 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=yMcBg9K49M3BeejEiLmSt5GBgrJzsgbnQ34MkO1WtxM=; b=W2YVihjmurK6bCRrgnnSs5xXf+esdsnx2RFs5bHHoYgWPZTsi4XmH9YGTIHtQsHxp9DG1y QnHFJSvqEH3VqFJIWJQnbjocAkpaNVjUr7y9KLACFNQASFWZWBhYivcaHNOLrWnYnyHUHm qWKqlJyUwMPF9NkSbyoAOIQSqrXDO9E= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-658-l34GlrawO-K0fA0KVgkKpA-1; Tue, 28 Jan 2025 17:31:50 -0500 X-MC-Unique: l34GlrawO-K0fA0KVgkKpA-1 X-Mimecast-MFC-AGG-ID: l34GlrawO-K0fA0KVgkKpA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A4DF219560B8; Tue, 28 Jan 2025 22:31:42 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8B20018008E0; Tue, 28 Jan 2025 22:31:31 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:30 -0500 Subject: [PATCH 06/14] drm/mxsfb: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-6-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=2475; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=v1L4cPFDHFCRceX3WACQnVLoVu2mFhNUCVhK5pDvpqY=; b=I44qT4OB+punCyftMrmGeaLcqI0wLiLGsgdJU8Fg2L87XeeVfgAHvvMvf7IHN//dxeGK9GTyZ pBEjXPFreDECZ+17nDv5++iCAiXB7JsTsmQ37mQBE4989Nq5bR28eDx X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: PFO0Cl7s0iGQ8tN6QSAQ1H0CfbcLtivJfCupzrk8IAM_1738103503 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143155_754922_8F98A06E X-CRM114-Status: GOOD ( 11.76 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Marek Vasut Cc: Stefan Agner Signed-off-by: Anusha Srivatsa Reviewed-by: Maxime Ripard --- drivers/gpu/drm/mxsfb/lcdif_drv.c | 4 +--- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c index 8ee00f59ca821cea8e823e7100fb4d7534283994..fcb2a7517377e9a5bbd2997c578c579b1b079f92 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -134,7 +134,6 @@ static int lcdif_load(struct drm_device *drm) { struct platform_device *pdev = to_platform_device(drm->dev); struct lcdif_drm_private *lcdif; - struct resource *res; int ret; lcdif = devm_kzalloc(&pdev->dev, sizeof(*lcdif), GFP_KERNEL); @@ -144,8 +143,7 @@ static int lcdif_load(struct drm_device *drm) lcdif->drm = drm; drm->dev_private = lcdif; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - lcdif->base = devm_ioremap_resource(drm->dev, res); + lcdif->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(lcdif->base)) return PTR_ERR(lcdif->base); diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 59020862cf65e5cc488903f1263ed16dfbce06f9..377d4c4c9979ad9538cfec5464827a82936f811b 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -215,7 +215,6 @@ static int mxsfb_load(struct drm_device *drm, { struct platform_device *pdev = to_platform_device(drm->dev); struct mxsfb_drm_private *mxsfb; - struct resource *res; int ret; mxsfb = devm_kzalloc(&pdev->dev, sizeof(*mxsfb), GFP_KERNEL); @@ -226,8 +225,7 @@ static int mxsfb_load(struct drm_device *drm, drm->dev_private = mxsfb; mxsfb->devdata = devdata; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mxsfb->base = devm_ioremap_resource(drm->dev, res); + mxsfb->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mxsfb->base)) return PTR_ERR(mxsfb->base); From patchwork Tue Jan 28 22:29:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A605C02193 for ; Tue, 28 Jan 2025 22:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FT+LB9XyHtC4Gj89X2CISx5zHalQ981h59ZAU2H883M=; b=q+ItJl/JDZCKwKMhkNlC5T3jMU d0rVUPjHL1y26uFw6vlO4AtNLQHPRAJzfqmODq0KvjsO9FHoJCmIgryulg0NCHwrQAGE5Y/x+6emi pQlCzy7kKfIlOdYBhKZzXfWyse/5ipNr7AZX/m2nvf8Dh1mgK4ajIKp4aT4a2rgvMJsf7pfXlcwPv 0b9BNv04N2c0VfByskmDlOgbHmoiGQ7i6x7R3kFgqkQwk2763Kjb8pV8xpNdFB5ZvKhy9YEJcmV0W RChZ69YZcs2LHBsaUfdHCpfjQDBidzpxBm8mIzaOa13AiacN5P0j+wz6+DGsiYSthbFdnoWA2T3TJ E0jd18Zg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7s-00000005wop-1dVW; Tue, 28 Jan 2025 22:32:08 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7q-00000005wmf-1kgh for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103525; 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=FT+LB9XyHtC4Gj89X2CISx5zHalQ981h59ZAU2H883M=; b=eZoCXk0MVDi+8qjDTsgdvIqQjHMljHoCeCGNEp5AhLr3WMGkdFRMPz2Lnc0marql7zr2sD AL0vHXq6fQxqVO1Lf0VAeZxLtsm2gakkpvv6jjyGR7vP0y/7rzvNrIcgqf4gp2KhJPBV36 5iDHLKDhkMU6u/Iqv+5gxSentC62BPw= 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-329-M2RzTAHnMa-s-Qvyv4CCZQ-1; Tue, 28 Jan 2025 17:32:00 -0500 X-MC-Unique: M2RzTAHnMa-s-Qvyv4CCZQ-1 X-Mimecast-MFC-AGG-ID: M2RzTAHnMa-s-Qvyv4CCZQ Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 EEC54180034D; Tue, 28 Jan 2025 22:31:53 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D4F2818008DC; Tue, 28 Jan 2025 22:31:42 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:31 -0500 Subject: [PATCH 07/14] drm/rockchip: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-7-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1654; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=ajXPI9xB0Rs31Rc4x9qTz/uAYXcdrRjutTTRm1keGG4=; b=LDffY/YSoJthJibzS51SC42ZXvZrbp2ayc7zabHlWIb3613ZhwERUpoDhV+XXcJIzmp40r+tI M92TihMbvZQAPKQMCFEl20B8k7s+n0MjBVXZT6Ras5dWx8LX3W0QmuA X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: JEmqKsqaGFoTCDqJcNa--SaE-1kn7OxzvBlZn_baRGM_1738103514 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143206_528937_3974B9C9 X-CRM114-Status: GOOD ( 10.94 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Sandy Huang Cc: Heiko StĆ¼bner Cc: Andy Yan Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 57747f1cff26e444ef3569983d6a7f7922f03ff7..4c639f7c868907fc35ce22f2ef7e281ad85c2d9e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -2187,7 +2187,6 @@ static int vop_bind(struct device *dev, struct device *master, void *data) const struct vop_data *vop_data; struct drm_device *drm_dev = data; struct vop *vop; - struct resource *res; int ret, irq; vop_data = of_device_get_match_data(dev); @@ -2207,8 +2206,7 @@ static int vop_bind(struct device *dev, struct device *master, void *data) vop_win_init(vop); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - vop->regs = devm_ioremap_resource(dev, res); + vop->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(vop->regs)) return PTR_ERR(vop->regs); vop->len = resource_size(res); From patchwork Tue Jan 28 22:29:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953266 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 283E2C0218D for ; Tue, 28 Jan 2025 22:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vTQQyop+FvNGZGa2HymGI+zd4XYA6ac0SZNdQLlY4mQ=; b=2LXGLEYKdDDpKCNTAk0+La+EyO NeDTNlCVHxut8NzA8FbVIxNxd4cj6PLNJYSlF1TIlqCYDBsOx8fzyfcQOslxm9Z5hl2E+2trHizZi iMpU0eXRHFquP+OYjLWCkFJ15Ufi7DjtOCT5Bd/NL8Afl9VQFPGOwjropIGOB3KdnN9k62mQvGj2h VnMWoh1fB+VVua+AP5lbijp1a9pf4k9eFYg2zyXXZnbLSXSN4YVkius4gLZqwG28IlCXp5PvpjS3q vVbtv2Xmgtp6TElNCgDzwRoKh3wsOEe7erfkrRiAYiaeyiPZspdw1b4eMI2M79/ucdCGDE1Xx0FsJ mN/CiSNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu80-00000005wwg-19Vf; Tue, 28 Jan 2025 22:32:16 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7x-00000005wt7-3qg7 for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103533; 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=vTQQyop+FvNGZGa2HymGI+zd4XYA6ac0SZNdQLlY4mQ=; b=KYZrtux6ktZ4Padbcq+aXHoyBBsCox8JQgQPOsvdC7JuuvPdiLckVPfBJLV9prBJlqRl/e 9y6kjzhyeQiTZkjTUxEqThsbHmsduVLWw9FRMZF1KdNDTvpWXY50U/ht4r8OfkKgT0VJV3 kEIjCUVEhRHc26xxcPYQkDOIQntqKLw= Received: from mx-prod-mc-08.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-675-XUqArcTLMuC2ZyQxOHv7Mw-1; Tue, 28 Jan 2025 17:32:10 -0500 X-MC-Unique: XUqArcTLMuC2ZyQxOHv7Mw-1 X-Mimecast-MFC-AGG-ID: XUqArcTLMuC2ZyQxOHv7Mw Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 538281800373; Tue, 28 Jan 2025 22:32:05 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 475BE180035E; Tue, 28 Jan 2025 22:31:54 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:32 -0500 Subject: [PATCH 08/14] drm/sprd: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-8-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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 , Dmitry Baryshkov X-Developer-Signature: v=1; a=ed25519-sha256; t=1738103410; l=2394; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=xnOKo4d5zLC6SAtMuS91xcrNjPZ1X4hCGtOsaEUix3w=; b=XgsYJ66PhNrSwobzID2quJsO/E4TlQulcqJ0vDOaqNkS9r21x5hzmGgeEwFBj/9RpC8lljWPY VUfmqi45nPXBguhotnYxuL+j1ormJXYrHE4tEfU5gpBjGDi4cVT7ok6 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: to9k2Wv5Lk-dkwidz-0H9D0rB-6i8ZqY7WxvaMPG4bQ_1738103525 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143214_045647_F46F4A66 X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Replace platform_get_resource + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule_2@ identifier res; expression ioremap; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource(pdev,0); Cc: Chunyan Zhang Cc: Dmitry Baryshkov Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/sprd/sprd_dpu.c | 9 +-------- drivers/gpu/drm/sprd/sprd_dsi.c | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c index cb2816985305fd19eac27413c214681a5a1e9ffa..65cd5aa1634eee5a6735ccffa4ee3979844d92ce 100644 --- a/drivers/gpu/drm/sprd/sprd_dpu.c +++ b/drivers/gpu/drm/sprd/sprd_dpu.c @@ -784,16 +784,9 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu, { struct platform_device *pdev = to_platform_device(dev); struct dpu_context *ctx = &dpu->ctx; - struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "failed to get I/O resource\n"); - return -EINVAL; - } - - ctx->base = devm_ioremap(dev, res->start, resource_size(res)); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (!ctx->base) { dev_err(dev, "failed to map dpu registers\n"); return -EFAULT; diff --git a/drivers/gpu/drm/sprd/sprd_dsi.c b/drivers/gpu/drm/sprd/sprd_dsi.c index 8fc26479bb6bce0aa94914f49d0986a7e19326c1..1668bb4166ab0ad3812c5654244544a9caf249a6 100644 --- a/drivers/gpu/drm/sprd/sprd_dsi.c +++ b/drivers/gpu/drm/sprd/sprd_dsi.c @@ -901,15 +901,8 @@ static int sprd_dsi_context_init(struct sprd_dsi *dsi, { struct platform_device *pdev = to_platform_device(dev); struct dsi_context *ctx = &dsi->ctx; - struct resource *res; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "failed to get I/O resource\n"); - return -EINVAL; - } - - ctx->base = devm_ioremap(dev, res->start, resource_size(res)); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (!ctx->base) { drm_err(dsi->drm, "failed to map dsi host registers\n"); return -ENXIO; From patchwork Tue Jan 28 22:29:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953268 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A968EC0218A for ; Tue, 28 Jan 2025 22:32:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VIJ5Kry5fQSY9xKb4EzJWEIWjDvQbQdKGXZAWVgTCeM=; b=HsircctHHUueCHdqGQiU3rBUsq LJPJmNXGZaXfReEbqOkZFXpXIkyOysWF6CMFFsoft1b3HtPpt2Egh2mfZYXM3nKl0mbgiKMiZILvh uNrQ7o6oM0YQ/GBsQaMJJTCunHmscexlrYfAskQ0YbxqAgQcXcdPNerhIuKVuccogm/pMrMOFONZe KGbpQSXBCQDppRfnL2ECBrF+gBHu+37xMU2n5HLVhzOSbbJ9lfxwYJls1oav0XIz30tMypjfjXdxN KZdQrlakPaSDEOt0k64D9+RIfbefTdZfoHOD5nGOrr+A+74oarNYnjzVxUjo78+MKtKj+7iu1s5HO O5euWj0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8H-00000005xDt-3MIh; Tue, 28 Jan 2025 22:32:33 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8E-00000005x9J-0xYR for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103549; 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=VIJ5Kry5fQSY9xKb4EzJWEIWjDvQbQdKGXZAWVgTCeM=; b=FxYc6Iq6Xl7rw3C6AcU+j/rvhBEaFRbbG2nKd/j78Z4C6a75PQf2t/TVTQ03cYT4F6EnS9 Jdyq9Bif7ZGDGtGulcjzq4TrBX1ObF6t5BD49ILUrsOOb6hanpZzq4gjwTk6jR4gUfEZ8i R7Y0vrXAR8Oc1xLiVhWoJs+0GHKrouo= Received: from mx-prod-mc-08.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-499-UYemQA77OOmnvGolnUTm_w-1; Tue, 28 Jan 2025 17:32:27 -0500 X-MC-Unique: UYemQA77OOmnvGolnUTm_w-1 X-Mimecast-MFC-AGG-ID: UYemQA77OOmnvGolnUTm_w Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A49221801883; Tue, 28 Jan 2025 22:32:16 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A11C118008C0; Tue, 28 Jan 2025 22:32:05 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:33 -0500 Subject: [PATCH 09/14] drm/sti: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-9-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=8252; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=JbskecsnMIpBU4lrFilQz4/qcpYNCTq/NrtxA3xb7+4=; b=IpIP+jWe+07YEUQSzIEZo8JdiYByGIXY+slEamVaLYuLLhO1QLUUyVQFCReSBehNAC3KLJMI5 Y/QbRDjTbCOBXVkOOiWhLzmZwTzKDG7PjoQf1vK9lvIySB/51cAHmBd X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7eU9TKfjC5jD-jHUhMIFAeHU4vmN2to13GgYygd3oT4_1738103537 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143230_355100_721FF608 X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Replace platform_get_resource/_byname + devm_ioremap with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: @rule@ identifier res; expression ioremap; identifier pdev; constant mem; expression name; @@ -struct resource *res; ... -res = platform_get_resource_byname(pdev,mem,name); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource_byname(pdev,name); and @rule_2@ identifier res; expression ioremap; identifier pdev; @@ -struct resource *res; ... -res = platform_get_resource(pdev,...); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource(pdev,0); Cc: Alain Volmat Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/sti/sti_compositor.c | 10 +--------- drivers/gpu/drm/sti/sti_dvo.c | 10 +--------- drivers/gpu/drm/sti/sti_hda.c | 10 +--------- drivers/gpu/drm/sti/sti_hdmi.c | 11 +---------- drivers/gpu/drm/sti/sti_hqvdp.c | 10 +--------- drivers/gpu/drm/sti/sti_tvout.c | 10 +--------- drivers/gpu/drm/sti/sti_vtg.c | 10 +--------- 7 files changed, 7 insertions(+), 64 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c index 063f82d23d80c4ba83624a0066a18416a2b37351..7aefce6706ba2cd7d97a33228c9b9812edecf06f 100644 --- a/drivers/gpu/drm/sti/sti_compositor.c +++ b/drivers/gpu/drm/sti/sti_compositor.c @@ -177,7 +177,6 @@ static int sti_compositor_probe(struct platform_device *pdev) struct device_node *np = dev->of_node; struct device_node *vtg_np; struct sti_compositor *compo; - struct resource *res; unsigned int i; compo = devm_kzalloc(dev, sizeof(*compo), GFP_KERNEL); @@ -194,14 +193,7 @@ static int sti_compositor_probe(struct platform_device *pdev) memcpy(&compo->data, of_match_node(compositor_of_match, np)->data, sizeof(struct sti_compositor_data)); - - /* Get Memory ressources */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - DRM_ERROR("Get memory resource failed\n"); - return -ENXIO; - } - compo->regs = devm_ioremap(dev, res->start, resource_size(res)); + compo->regs = devm_platform_ioremap_resource(pdev, 0); if (compo->regs == NULL) { DRM_ERROR("Register mapping failed\n"); return -ENXIO; diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c index c6c2abaa1891cd3ea025805b50d275ec314512c3..660588f01f90950a9b2c180ab230188c19901f26 100644 --- a/drivers/gpu/drm/sti/sti_dvo.c +++ b/drivers/gpu/drm/sti/sti_dvo.c @@ -511,7 +511,6 @@ static int sti_dvo_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sti_dvo *dvo; - struct resource *res; struct device_node *np = dev->of_node; DRM_INFO("%s\n", __func__); @@ -523,14 +522,7 @@ static int sti_dvo_probe(struct platform_device *pdev) } dvo->dev = pdev->dev; - - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dvo-reg"); - if (!res) { - DRM_ERROR("Invalid dvo resource\n"); - return -ENOMEM; - } - dvo->regs = devm_ioremap(dev, res->start, - resource_size(res)); + dvo->regs = devm_platform_ioremap_resource_byname(pdev, "dvo-reg"); if (!dvo->regs) return -ENOMEM; diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c index b12863bea95559c4f874eb94cea8938609d435d4..28fde4c568d0069ecf2f2f69f5be0e87c1d5f4f3 100644 --- a/drivers/gpu/drm/sti/sti_hda.c +++ b/drivers/gpu/drm/sti/sti_hda.c @@ -741,7 +741,6 @@ static int sti_hda_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sti_hda *hda; - struct resource *res; DRM_INFO("%s\n", __func__); @@ -750,14 +749,7 @@ static int sti_hda_probe(struct platform_device *pdev) return -ENOMEM; hda->dev = pdev->dev; - - /* Get resources */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hda-reg"); - if (!res) { - DRM_ERROR("Invalid hda resource\n"); - return -ENOMEM; - } - hda->regs = devm_ioremap(dev, res->start, resource_size(res)); + hda->regs = devm_platform_ioremap_resource_byname(pdev, "hda-reg"); if (!hda->regs) return -ENOMEM; diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index ca2fe17de4a5d1e0199e59a97e6c7601e139ed9e..666143c48b0d0f2c20cd26323ddbc8e69d966622 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c @@ -1380,7 +1380,6 @@ static int sti_hdmi_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct sti_hdmi *hdmi; struct device_node *np = dev->of_node; - struct resource *res; struct device_node *ddc; int ret; @@ -1399,15 +1398,7 @@ static int sti_hdmi_probe(struct platform_device *pdev) } hdmi->dev = pdev->dev; - - /* Get resources */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hdmi-reg"); - if (!res) { - DRM_ERROR("Invalid hdmi resource\n"); - ret = -ENOMEM; - goto release_adapter; - } - hdmi->regs = devm_ioremap(dev, res->start, resource_size(res)); + hdmi->regs = devm_platform_ioremap_resource_byname(pdev, "hdmi-reg"); if (!hdmi->regs) { ret = -ENOMEM; goto release_adapter; diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index 0f658709c9d0d398c4eed65202443db9d0b41f8c..420395598d119a403d531211022e6005d6a2bd59 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c @@ -1356,7 +1356,6 @@ static int sti_hqvdp_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *vtg_np; struct sti_hqvdp *hqvdp; - struct resource *res; DRM_DEBUG_DRIVER("\n"); @@ -1367,14 +1366,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev) } hqvdp->dev = dev; - - /* Get Memory resources */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - DRM_ERROR("Get memory resource failed\n"); - return -ENXIO; - } - hqvdp->regs = devm_ioremap(dev, res->start, resource_size(res)); + hqvdp->regs = devm_platform_ioremap_resource(pdev, 0); if (!hqvdp->regs) { DRM_ERROR("Register mapping failed\n"); return -ENXIO; diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index af6c06f448c4819def8cc0d0836e30f991529690..0bebe815f5e7567f84388af93723a6fa7d2cc7a2 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c @@ -838,7 +838,6 @@ static int sti_tvout_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *node = dev->of_node; struct sti_tvout *tvout; - struct resource *res; DRM_INFO("%s\n", __func__); @@ -850,14 +849,7 @@ static int sti_tvout_probe(struct platform_device *pdev) return -ENOMEM; tvout->dev = dev; - - /* get memory resources */ - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "tvout-reg"); - if (!res) { - DRM_ERROR("Invalid glue resource\n"); - return -ENOMEM; - } - tvout->regs = devm_ioremap(dev, res->start, resource_size(res)); + tvout->regs = devm_platform_ioremap_resource_byname(pdev, "tvout-reg"); if (!tvout->regs) return -ENOMEM; diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c index 5ba469b711b5318e9e9e6d8df127fb8933d1fac1..b5353fe774d72fd629ecd3ef75a5d2817ca8617f 100644 --- a/drivers/gpu/drm/sti/sti_vtg.c +++ b/drivers/gpu/drm/sti/sti_vtg.c @@ -380,20 +380,12 @@ static int vtg_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct sti_vtg *vtg; - struct resource *res; int ret; vtg = devm_kzalloc(dev, sizeof(*vtg), GFP_KERNEL); if (!vtg) return -ENOMEM; - - /* Get Memory ressources */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - DRM_ERROR("Get memory resource failed\n"); - return -ENOMEM; - } - vtg->regs = devm_ioremap(dev, res->start, resource_size(res)); + vtg->regs = devm_platform_ioremap_resource(pdev, 0); if (!vtg->regs) { DRM_ERROR("failed to remap I/O memory\n"); return -ENOMEM; From patchwork Tue Jan 28 22:29:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B9ABC0218A for ; Tue, 28 Jan 2025 22:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=N/Il65n7d2FNdwRu7j2DfL+2gqiTcQ9juutchj4unv8=; b=xCikBTpn2MN1BbHuQ0TxtvacCu teLEc/g0Nf4rb5kSzjAPHD0IyilU3iyCXLFNmo82KXMbAxHVuE8Luc7WyhKJkv5KS5r7dMdaWKmFA TZPPvpBXK3xf0ctddqH8no5sHYOEWMK/7QZGdG1q+JOc2YhFN5oOpYJmKFP4Ua0Dlm5raai+94Af/ 7DP0OsEa5r+8u6XdBJa4sP4D2nBvlVwa8fR/zMBlWxM4DRcKkP0P8TjWScSFNRg4bymPhvgx4ux7t UgXo8SvSKFrAKpgsIlE6JrfMEwqSz1W4muKzJUN0s3aw/+POz7MuDpa2tDtnIdj0Sqs/gR2Iqoh9n 2rOIjkIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8R-00000005xQt-2q02; Tue, 28 Jan 2025 22:32:43 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8O-00000005xML-3dui for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103560; 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=N/Il65n7d2FNdwRu7j2DfL+2gqiTcQ9juutchj4unv8=; b=XDvDr48GkeWDNTiPUPJTjWOjlPswghy7JKqjc3Naubcadf8IOYyJrQcU4Jfheqt92Ku1ki j17CVZq5AQRvO7N7DTEvm7Fql04fkgBFBjCABA9AWD7NOT1Up6foOaV9L2fjEDTc2Zz9jV jYRP9FOctXnjo0qEtIJatPvEjBjJKOE= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-198-Z5t1DH4TPUSNjcxacOkECA-1; Tue, 28 Jan 2025 17:32:35 -0500 X-MC-Unique: Z5t1DH4TPUSNjcxacOkECA-1 X-Mimecast-MFC-AGG-ID: Z5t1DH4TPUSNjcxacOkECA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BA29A195608B; Tue, 28 Jan 2025 22:32:27 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F1FCA18008D4; Tue, 28 Jan 2025 22:32:16 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:34 -0500 Subject: [PATCH 10/14] drm/stm: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-10-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1552; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=SBQvLlE5WdolnkNtVzzAyIi/XRoTRcXCfSRhVrqoWuM=; b=gTFB4qqvXFU3N6mS6uEVgMa+d38j8Ixc/qOlT74VphyV+UdXlGHEHukzxa+uSO2Rhcqqyl575 DbvTLy76BbYBQleInZIE9L46We9yrtR4G/j4tW0IKFhF1vxosUJKLo9 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Gn8b43dPGGhahpBavaXxbBERFw5YXGGxY6kmcNJDTMI_1738103548 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143240_976534_7E068B6B X-CRM114-Status: GOOD ( 10.38 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Yannick Fertre Cc: Raphael Gallais-Pou Cc: Philippe Cornu Signed-off-by: Anusha Srivatsa Acked-by: Raphael Gallais-Pou --- drivers/gpu/drm/stm/ltdc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 54a73753eff98902012c6012914fa8c6482affbd..ba315c66a04d72758b9d3cfcd842432877f66d3a 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -1900,7 +1900,6 @@ int ltdc_load(struct drm_device *ddev) struct drm_panel *panel; struct drm_crtc *crtc; struct reset_control *rstc; - struct resource *res; int irq, i, nb_endpoints; int ret = -ENODEV; @@ -1966,8 +1965,7 @@ int ltdc_load(struct drm_device *ddev) reset_control_deassert(rstc); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ldev->regs = devm_ioremap_resource(dev, res); + ldev->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ldev->regs)) { DRM_ERROR("Unable to get ltdc registers\n"); ret = PTR_ERR(ldev->regs); From patchwork Tue Jan 28 22:29:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A91AC0218D for ; Tue, 28 Jan 2025 22:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wVqNI1/TrfETM/W6VLhpkYz7Ok2MvNQq7ZAk5O1kADQ=; b=0l8xVvIeHWu/v3rXFftgEdMFDX FxWcNpdl6zBF4v4wdp8nHGV73Mx4kub8QSppDiXqALX14Cu3CFoubAiRZw3e5G0whQVm4i+nMRdvA f63ngf71HiqrqEAqKPzsRdYt0QtVlBxAgLOPr1gOKwjC4ToHubIDv9HIS3n/pURWRdTsgKsa0JNhs Jsax4e4z6/q3qtsfS2sP85WOe/9Pp45Egh36+uYSuG10gaIFDt5nvYvDXXf8DLeHc8/lu/4/f9sNb T3MnnjVl2kq7yGdY3pENKSM33SwBskZKHYF5tI7DeHrlKLCQZMIA2GaOhKlhzEICSnewTTbIAtASg kEXVrxvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8Y-00000005xZv-0vU9; Tue, 28 Jan 2025 22:32:50 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8V-00000005xVD-2WcA for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103566; 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=wVqNI1/TrfETM/W6VLhpkYz7Ok2MvNQq7ZAk5O1kADQ=; b=dgJW2w9t+AdbhSACG91WKSM0NXzK8PRhBGecEjiPCaH0KrpfmytLclyfEqFFFy5S+r7eC5 7wpx9zSUjLX7g81lrkzW1xUGn7p3YcvgXSi6jmQ0oPiwT6S1tofbpQJrW+hCXqTu5rEH53 BAXMJRYdqT0ONmkkjaZO/VTJcK3ML+0= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-ltBlB9-0MweETrq6s_WCrw-1; Tue, 28 Jan 2025 17:32:44 -0500 X-MC-Unique: ltBlB9-0MweETrq6s_WCrw-1 X-Mimecast-MFC-AGG-ID: ltBlB9-0MweETrq6s_WCrw Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 26D96195608A; Tue, 28 Jan 2025 22:32:39 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0E499180035E; Tue, 28 Jan 2025 22:32:27 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:35 -0500 Subject: [PATCH 11/14] drm/tegra: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-11-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1511; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=B7MXxbnjHwFTZC+SrazJe/OLt24FsrMH9PsVVy2fVYg=; b=tDq/Jv9ERfnUVEZ6UKQIrh99AKDKTQ5fLAXgu7e8Xt56bSa2J0FGl8W2z3oJnUnw4HcjNk5zW gy6GdLcIvfLA2DTS9nqYX5KKpY3+i+k57mAfQT+oZclprV4hq7nOzFl X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: sX35JdagSnMXFK6ELeWIBagCkPBTk725krn4cbcq6h8_1738103559 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143247_721944_E6D1A5AA X-CRM114-Status: GOOD ( 11.20 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Thierry Reding Cc: Mikko Perttunen Signed-off-by: Anusha Srivatsa Reviewed-by: Maxime Ripard --- drivers/gpu/drm/tegra/dsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 4a8cd9ed0a9414b2f40b716fa8c02aff038a53e0..51f1ed897f8e473f45f89ff3e2d99f66d2c80f21 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -1564,7 +1564,6 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi) static int tegra_dsi_probe(struct platform_device *pdev) { struct tegra_dsi *dsi; - struct resource *regs; int err; dsi = devm_kzalloc(&pdev->dev, sizeof(*dsi), GFP_KERNEL); @@ -1636,8 +1635,7 @@ static int tegra_dsi_probe(struct platform_device *pdev) goto remove; } - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dsi->regs = devm_ioremap_resource(&pdev->dev, regs); + dsi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dsi->regs)) { err = PTR_ERR(dsi->regs); goto remove; From patchwork Tue Jan 28 22:29:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44148C0218D for ; Tue, 28 Jan 2025 22:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Pb2HbxFi1UkzTHzB0D6b6QSgY8vGSn5FQjAxJAUQsW0=; b=CXJg0hRHiObCDx1D+Jx4SWRNzJ IcJFVZAOl73qYqFNZFS/W5cl6SEgSF5ljRGjtnP0vdSooMBYHZM+NZ524LCS/owfT1XVJRQWy5giJ enDGOszbA9dLXJsMjkDanm0dODAVBcHFpmX0XO6csMAZu4i0otV8IG/ZiCdCcwHPGFp6228Pj98UR MqidBu3Mp8TnJAppjwOtcHYHkGESWEIN2stYvMQ+sMMkNvhV7E/lJDwKGMYZr2x1BjdlQShehLgMl DVFJ8Oq7ai8PMsqBBzveOIMdnU8Qu1PRBFN1O9UoIJdtB7z1eQGD+PoJf6p5vyUSOZq5jiJ5djU6b hv7CRNlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8j-00000005xnx-1UGu; Tue, 28 Jan 2025 22:33:01 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8g-00000005xik-004l for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:32:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103577; 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=Pb2HbxFi1UkzTHzB0D6b6QSgY8vGSn5FQjAxJAUQsW0=; b=PV7LHBry3iLtQdf+AKn6+JzF3ohLxwcp1h7XBGnEwNU2HsGyr5ZeLgQukENmB88DOKRLYj yTC9q2anC7ilGXLwR0wxTnH5QddcV0Ilv3AjBd5ARKOsUAoJ7MXNK4zPyUY+Quxvz5Hkxo F7exejjWpOCQ9pFV8HPzmQxbDVaDN44= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-BSixol-_M6e7wUG4frDlRA-1; Tue, 28 Jan 2025 17:32:55 -0500 X-MC-Unique: BSixol-_M6e7wUG4frDlRA-1 X-Mimecast-MFC-AGG-ID: BSixol-_M6e7wUG4frDlRA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3F81C19560BB; Tue, 28 Jan 2025 22:32:50 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 725E218008C0; Tue, 28 Jan 2025 22:32:39 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:36 -0500 Subject: [PATCH 12/14] drm/tiny: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-12-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1645; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=9d7uBMuelma+LMbh6GD+LA0ZympzdWZofR4S17vucE8=; b=4YHmYZetO87f+jmmI59PKLUPwI2FTUfKjf5rifnY3lkAv6f1Lt0cnon/OlUrlnrU3uF+WfGtr M0NOu1ABUYpD8l6AljaqkdkdQZuOjon5ueK8ryJ3rXX6sNlHc+eriFf X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9ZIuWTvuvJBcWSv0uH8XH7KnTZAQ8XLC5_Ohz_8RCig_1738103570 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143258_133333_5E57738E X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 = platform_get_resource(pdev,...); -ioremap_res = devm_ioremap_resource(...); +ioremap_res = devm_platform_ioremap_resource(pdev,0); Cc: Maarten Lankhorst Cc: Maxime Ripard Signed-off-by: Anusha Srivatsa Reviewed-by: Maxime Ripard --- 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..7cf0f0ea1bfe4fa82234a120b52837e26a8ee5b0 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 *arcpgu) struct device_node *encoder_node = NULL, *endpoint_node = NULL; struct drm_connector *connector = NULL; struct drm_device *drm = &arcpgu->drm; - struct resource *res; int ret; arcpgu->clk = devm_clk_get(drm->dev, "pxlclk"); @@ -270,8 +269,7 @@ static int arcpgu_load(struct arcpgu_drm_private *arcpgu) drm->mode_config.max_height = 1080; drm->mode_config.funcs = &arcpgu_drm_modecfg_funcs; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - arcpgu->regs = devm_ioremap_resource(&pdev->dev, res); + arcpgu->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(arcpgu->regs)) return PTR_ERR(arcpgu->regs); From patchwork Tue Jan 28 22:29:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FDDCC0218A for ; Tue, 28 Jan 2025 22:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4eOh+r5POEBIZHTbq+nHznMj04j4TeTNMfqN9ncpUe8=; b=SIc134+hGZoTMu/K+e/DoQrSIF e2fT4OZgTMi2Rf8JZdakTKd8n6dTbQQfaEv5YYspGbq/W0uUCkETzYjgixfImC/pZ4icwHU30aaOs esmvzQu19juavPuOpnfFAV/Ohlqj+aROv6jKUVx9sgTVMYD2CnuzO/tdh68fns2SgT3aV3cvtKO7g vPzRs7szdEh7qFKnc0+14ezPcPm5D16+JklMMNU+40D8eP/pR6OVhFO7mfuaNVadvvy//lNwmY/Ko fiixc93PxeaLHXI5x0ORtQWlerLKlDtBrBQlLdWzoAYlDJbm7OzFrc3PSI9AFejIRtPKd5I/RY6zF jXNwPgRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8w-00000005y5d-1eEB; Tue, 28 Jan 2025 22:33:14 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8t-00000005y1k-2i6d for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:33:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103590; 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=4eOh+r5POEBIZHTbq+nHznMj04j4TeTNMfqN9ncpUe8=; b=LFsLAf3+RSy/McjcjBj3KBZMgbdXjP9t0lGRBYsQ/boZlOUSCbqsjQ7H31/PLWjL6YQyuI pPcx8VbICkILcINOCy7QNm2UqI//fee6inH2cNt/VmRHPgCBkFWs+QoivSq4vWEue6+ScF xm5tH+OtuPhIKPYqbBux4iW7i9/JOX4= 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-646-JJiTDf_rMPiltZe2Gtxs5w-1; Tue, 28 Jan 2025 17:33:07 -0500 X-MC-Unique: JJiTDf_rMPiltZe2Gtxs5w-1 X-Mimecast-MFC-AGG-ID: JJiTDf_rMPiltZe2Gtxs5w Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 C65151800268; Tue, 28 Jan 2025 22:33:01 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6E29418008C0; Tue, 28 Jan 2025 22:32:50 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:37 -0500 Subject: [PATCH 13/14] drm/vc4: move to devm_platform_ioremap_resource() usage MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-13-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1689; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=4vxmIMCntNkLYWUXI5TlhVdnqmm2AsRbVZgcmO441nM=; b=5O8Ivj3HJZboc/7qkLN9ieN1tdgZ+256U7GLYJr170ZR/+aEj1nNMDOzAkFeg5anubD5oaxWF sGYOK3IPQARAgRjIsuLaaVG0kGOTrTsEWSIShMKxlngxbxGfGebRp+0 X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9H4J4UUBXPRz1WxY420uTeIcpR76PfI-m2iw65JFU7k_1738103582 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143311_762235_EB4B6701 X-CRM114-Status: GOOD ( 11.39 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Replace platform_get_resource_byname + devm_ioremap_resource with just devm_platform_ioremap_resource() Used Coccinelle to do this change. SmPl patch: //rule s/(devm_)platform_get_resource_byname + //(devm_)ioremap/devm_platform_ioremap_resource. @rule_3@ identifier res; expression ioremap; identifier pdev; constant mem; expression name; @@ -struct resource *res; ... -res = platform_get_resource_byname(pdev,mem,name); <... -if (!res) { -... -} ...> -ioremap = devm_ioremap(...); +ioremap = devm_platform_ioremap_resource_byname(pdev,name); Cc: Maxime Ripard Cc: Dave Stevenson Cc: "MaĆ­ra Canal" Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/vc4/vc4_hdmi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 47d9ada98430634cfd8c1e21c2a4d00d501bab7e..e22733f8159aa4b247a915e24a236f620bae932c 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -2951,15 +2951,10 @@ static int vc5_hdmi_init_resources(struct drm_device *drm, { struct platform_device *pdev = vc4_hdmi->pdev; struct device *dev = &pdev->dev; - struct resource *res; int ret; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hdmi"); - if (!res) - return -ENODEV; - - vc4_hdmi->hdmicore_regs = devm_ioremap(dev, res->start, - resource_size(res)); + vc4_hdmi->hdmicore_regs = devm_platform_ioremap_resource_byname(pdev, + "hdmi"); if (!vc4_hdmi->hdmicore_regs) return -ENOMEM; From patchwork Tue Jan 28 22:29:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anusha Srivatsa X-Patchwork-Id: 13953277 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF443C0218D for ; Tue, 28 Jan 2025 22:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Cc:To:In-Reply-To:References:Message-Id:MIME-Version:Subject: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LBt0xhKg/k6By/AvzZb28FkpDdmTA/WjeTTyuRHg9tA=; b=S3dLxL479mKySiKWRFKD2Vu792 wlLz8QWVxWb+XZ3gklburueTuG4ECVAnsxHdMnHMCSrxhRh8ofe0GTZkW8AHLLCMGxCVRkVevrU2u Y/2HwfnjnNd/zE7bJg+s3/g5insUsSWXRlfwrFbw5hMqwFkEQhOk/3Aft0qZ0+INTk6NANHxvTrKq uXxoTDdK9fyv50SBG4gv+38i0pnm7ijxTMAni+udye0yPACrDKsWPFUeolNN/+1ylGpVO3M+1Oq5f j6E5XnF+LGgyvbKGzURYXyxUnFcoYhUJITwnGfutExuP3zGLuxuvY84VK2Xw43rppu5EEUy7PtgNm TRgP/Kgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu99-00000005yHO-4C6q; Tue, 28 Jan 2025 22:33:28 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tcu95-00000005yCL-2pbP for linux-mediatek@lists.infradead.org; Tue, 28 Jan 2025 22:33:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103602; 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=LBt0xhKg/k6By/AvzZb28FkpDdmTA/WjeTTyuRHg9tA=; b=BoWDDyPxUjvFeRF9skFouE72BJZDhAIOJulNmitT3xKYeukUBFbcftJf5shSPlErwBfKW4 0x+UDwtueIkuPcHYdN/zYIFs/yQIQbUmSfwkoJKQSq7RQGbgHJWy9IWPhH96UbnigzpaXc YF1J+N7AU9XCToWRUtjFd8oT+sPUWBc= 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-677-yq4hKjUZNIiv1YzmZBLdbA-1; Tue, 28 Jan 2025 17:33:18 -0500 X-MC-Unique: yq4hKjUZNIiv1YzmZBLdbA-1 X-Mimecast-MFC-AGG-ID: yq4hKjUZNIiv1YzmZBLdbA Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 654161800360; Tue, 28 Jan 2025 22:33:13 +0000 (UTC) Received: from asrivats-na.rmtustx.csb (unknown [10.2.16.231]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1E61618008D4; Tue, 28 Jan 2025 22:33:01 +0000 (UTC) From: Anusha Srivatsa Date: Tue, 28 Jan 2025 17:29:38 -0500 Subject: [PATCH 14/14] Documentation: Update the todo MIME-Version: 1.0 Message-Id: <20250128-cocci-memory-api-v1-14-0d1609a29587@redhat.com> References: <20250128-cocci-memory-api-v1-0-0d1609a29587@redhat.com> In-Reply-To: <20250128-cocci-memory-api-v1-0-0d1609a29587@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 , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , 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_Cana?= =?utf-8?q?l?= , 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, linux-amlogic@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=1738103410; l=1237; i=asrivats@redhat.com; s=20250122; h=from:subject:message-id; bh=1uza9zHT5KB2vg0jmKcDXlF6fg11a6R907qgLnhqIds=; b=s5MVeYZLBGOWUc20PuIIuL9SunjfVvp7SriFVQzP3zS3xF7J9noCxYaIm5Y8I3dDRoMe/Vp1q iFtY+RhL+bwCkiRRg25tfa75tUVeP5EtP7QOvWyFI7spHEbLcbYZPRL X-Developer-Key: i=asrivats@redhat.com; a=ed25519; pk=brnIHkBsUZEhyW6Zyn0U92AeIZ1psws/q8VFbIkf1AU= X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Jz-iwjkg5TtB_GBLDK031Bp5m-jgqOzCRzH03sBLrl4_1738103593 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143323_789186_3FE174B6 X-CRM114-Status: UNSURE ( 9.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Remove the TODO now that this series addresses the changes needed. Cc: Thomas Zimmermann Signed-off-by: Anusha Srivatsa --- Documentation/gpu/todo.rst | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 256d0d1cb2164bd94f9b610a751b907834d96a21..b5aa5f776cfe0916b98bddf791c65abe974834cf 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -441,21 +441,6 @@ Contact: Thomas Zimmermann Level: Intermediate -Request memory regions in all drivers -------------------------------------- - -Go through all drivers and add code to request the memory regions that the -driver uses. This requires adding calls to request_mem_region(), -pci_request_region() or similar functions. Use helpers for managed cleanup -where possible. - -Drivers are pretty bad at doing this and there used to be conflicts among -DRM and fbdev drivers. Still, it's the correct thing to do. - -Contact: Thomas Zimmermann - -Level: Starter - Remove driver dependencies on FB_DEVICE ---------------------------------------