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: 13953312 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 47E37C0218A for ; Tue, 28 Jan 2025 22:32:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=kI1h4pjAvhlufcNpQAgLzPoHRxxZa3xfOcCQulRVAjQ=; b=tQmNIBUhGcAiLV d3WIY02PC/xHLroFIrUvTP8wU6n8QU5En/7w5vy/Fr0B+iqGag8k8wCuIQvAo+OYVtpVFunefTYUr FzlL0IUMEEGmMX+9arnXwFYrE0PDvtA84IJ7pAFVv4WVhUVFpqLL/vRJmW15NEX49bL6hAdpDiuMX fn11OazyksbxT42/otD41LNP+xMoC1+Um5rMcNR6wt7OIGcqnt7r5fJEJ6FGJxKcbwn/mHXSIs+gJ TawiapQP34kJFmBQiLckgUfbGo7fudQ2XUs+rYzFEh5wq22T5cwCu8ekG9Bt2gQtJtSpPDp3aLnoR gH/6ZaFM/hWIlGwoqxQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu85-00000005x2w-05sb; Tue, 28 Jan 2025 22:32:21 +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 1tcu81-00000005wxO-1fXF for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103536; 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=LPiTGQpJqSPCc6Y0zJs02W0o3CR1sJkMGtSjo4ZfGmrWueV+wrRcHdXhps5JqQg7fPszMr dyNCVVX+kovcC5ThQFMS7hKksKdjg89BPZXVo8NCcH7CsIkIdBtCaYWU+8PWRUM4Qqw+AP 9582pbjWpPWC5SBKZfm0fBYjOc2DiEE= 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: Nyy_QlxZ-pSW5b-RTjkOOX2hdbwWekHrXUPJZYhFB-I_1738103442 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143217_577701_A347317E X-CRM114-Status: GOOD ( 10.22 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953314 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 CD087C02194 for ; Tue, 28 Jan 2025 22:32:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=prZ8nscvgw49L0cxe68SFYV/MDpVH5RqH86ickdj/PE=; b=sa+5ZEVLr0VRyT lSN9ldoU0zmT6PoomUhz2veqBHrajPhM4GTW9EYwnVEiFEDfGPdnsMOef9pU8pl11tReamBIBkWLu MU4qlOvXemt+RQs/HdQLywHshZtB76tPXO+7j+x+0CDtKnsKgXrMEQwa88fHFzvPU+fPGCg6lnes9 QBcTfZBg7/FMvOkGDOixUEJJeol/C+DrK/lln9ES/c6oNJXbKJvvfprlsFIC3ahKx874oX8z890/S AGA67SD7mC6I5WNGTM0iOHzDWTzX4xQXnGU1a+el/7PweQZ6l/yLAhiRRan89DiNWUWXXcSrp5Zza tZj6W6ff83XGq51S+09Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8M-00000005xJm-2Zl8; Tue, 28 Jan 2025 22:32:38 +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 1tcu8I-00000005xDx-1mw1 for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103553; 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=QoVkEhD2adx4Np1SbHWxZcUDhUXqjB3StWhyhiuH3rnSd2tIJn3y8lnJMRkyNoqeujvgqN TyJcjvjb/x2NZX+l6vN4MRB7U/qZsMaZAqEcUTyjOtTCClTocSSDaL2EsqudhU6pGL5mll 4Du6mli/evY311qEfR2jktr1NAlazSk= 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: qTYNOsC7aBlFHvlWHiAagSMdRZegpq16TKkxndDykWQ_1738103456 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143234_537707_435FA1FC X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953316 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 565F5C0218A for ; Tue, 28 Jan 2025 22:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=lmD11N1z8n0Iltx8FlK3Zu5pBAp7fVnUi3ri3q+Kh1I=; b=FFVZYPWCu/l95m dWAnKH9Qg6kVbvYYGSTiRdFv+gSM3ubi2vdeaQNIQGlEeUGQ6mkGxU+f8fBIDx/gtH4lswtWrAbIr YF4FfoZtnv/oH0hv6xJUwZkPsfTbaYAyij8sSMW0A1fVfpRAuhU9zPgh7QC7j4KXicxFyqtkmu+PI 9FVr17Ij65okRidnCl/d0Bawwn+Kai/9M1lx/GyyVwnIV4rYQiEvoOB2I6ra4SzBBn3foZAlxcYG3 QS1CHoTLSheS7pezRxnMQ+RQ9L0jFICPYpFmnOGp9rlttgocw6Xsfzez7JsN4kBCJOkXcu3qR7SLa WGdHNnY+1eJzc2iCRbqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8V-00000005xWH-49oe; Tue, 28 Jan 2025 22:32:47 +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-00000005xPn-248r for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:45 +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: CvhI42b_60yJC_iTfsDbJn491UaKr3AKm1ir7nKGnZI_1738103468 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143243_603926_0A2F09F2 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953318 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 AD592C02193 for ; Tue, 28 Jan 2025 22:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=cpgrpyRNBh3RSvE1sI0TNTB3uvnGZKwl5fg0j8zh6Uw=; b=Qx/f4RWityvyiD GIFlr5j4upnXwhh1E1GEJ3WSY4/xsv6TX19FcgovfuEZPW2EA83aIUhT1wQWMrPWubdQWFYqPsA+d Eu+dtJIqYEA941PEd+kLi8SsoSboYtdUDTVehB0Ck/1f5z9dNvYCD/BjKUj0+OKASNw4kRgrB/oze VypM7WDoMHu4Vs89yTqG/G1NcH74xKp2cdIL8RueykPVJpRxdS2l1JL0qpMzwIjyEhQ05N2Gjc8LL oV5TjbMCgZqWJlXBY9RSRjazLP3KgfCZCRiYi9L1ntybgQUpbaqA6VMTnMZXFYRWr6FCEIdvAABiH xI6R2COEn0VCkwIvOyfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8h-00000005xlF-10JT; Tue, 28 Jan 2025 22:32:59 +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 1tcu8d-00000005xfU-27MY for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103574; 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=Q9l65tIK19mmnQNPZjJ3Nj1rj3f8xoJLNfcuN2i5kODq/L0n15arsdpP/xWXmtlApoW6f0 hRlI1umEriWCh+Pk+Q0ffGBYPAQ50ZPlRV60v5r/zIx4IPsgFS335FLm17OKl9nHxzNKWi PnFSD3PwHvhI2f8+9DSjxaBABhXTqI8= 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: FYlqun8gW73qOoXM6YlnX05RNqM32w5Brxyw0sUwrX8_1738103480 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143255_694872_9583C87B X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953308 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 D398AC02193 for ; Tue, 28 Jan 2025 22:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=xMeasuDjX82XMrHGGQDEpvaG6N/lQtPdGpTQNAALO/w=; b=A17yHLt9NGf8ZR n8wB7D6Cwtu2L2N9ktMxt7WLa/t1weUyfhTq50s5/qC9CUd++pwQGL2lZGxwopM5jTZKq/6mDfQzS IQD0u250nwk8q6oZy1/989OttYFc94anxhKji/q7Ir61nyHVQVe7eooQKU0pDfsXoNc0SVUX3+/co j1YAUlOQaz4X6tY4MdDqY74IFdCwtw07N1tdL3HHJCjfS79oB0vIVM1rBzizfniXNkhOV8pAbXLuW QNgguc5o8spXesKaFCXBCev3PSEZ/9ojdb08Z0EhfQb798TLVtfOekGVwCvzReAyaHxh/1L2JINFL KcxvXiAxJCtoaYc4FE0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7U-00000005wWw-3WxQ; 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-00000005wTA-3W4j for linux-amlogic@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: o3jDGXbcVpw1IEXojwTe1sDfUjnLRzG38MP0reITTz0_1738103492 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143141_942968_BE0FB376 X-CRM114-Status: GOOD ( 11.09 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953309 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 882A7C0218A for ; Tue, 28 Jan 2025 22:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=+CXO+n/ry1vdC+YffJdnaOrN0928RMPSRNuyV597WGg=; b=40PFFRCLqCBz0q wS34sBCWez9ahlRsg/5ChYI1++SGv1Xrwi/bE6j/a+PEHAIjlHkqd7bmXIgayl/I4Uc7O+cEFJPlH 4lONOZRfJq1ylclLA+7oGmaAt3fLitDz9fI/x+fHYpLmcYOyKYsWTlUjSBwl18XbKlJmaCq9pBtD5 Ox0Vh/V9+ctOVNFBggKwtK6C+pL8hmUioUcIj2lbuwp4p3sqnSiDp/R4H7Nk2h7+/wYIensKQOTPS Zx/XKpRlX94sHFlSPpYwTprvWaJ570/RYmteVIV6+IjMceOYZYN5MrRPabGjEXjT0SRMCQowkZpM4 wqT7Wjkyem4ID5faQbEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7g-00000005wf2-2JCY; Tue, 28 Jan 2025 22:31:56 +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 1tcu7e-00000005wdD-2hND for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:31:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103513; 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=X36tgvUDsOu8ISUjZFqItubiEYngb6WLIjpOAx/iZ3anLNhVMSEZIkNw+gLoGmB9ZsnPd3 OmVUuipIiPMAjZWUaZgyRIhyXh66ktaWuxrPRwRMAoN4sYf2E49/2K+Y9TVrxKRr0RsDgu gKlz81zforDr0BzCMVDCxYTzZCf7h0k= 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: 235o5749fwH1QRsF40JlLPkS_O3iAJLlYpZaLHFlNmo_1738103503 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143154_754300_30361B7D X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953310 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 75EB3C0218A for ; Tue, 28 Jan 2025 22:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=IfcACEuovtGTRvvM+nqoukYTPlVuNp/rFeRafy7bVw0=; b=1WYkM41q+4TIc5 7/WKYsjzU1NXve7enlMUWEyk3b3cq/qJFg2u1NHjYCx0TvHY7HoN3ACC7fk0wlNt5HzsWpg0UMmLI VqEwEioPw7EJyI76ba/O1lb3RJ0ioTvbJwqLTJoeGrvlSdDBnQPxquNMofZKlwAJuxRtEJ5vyZVBw 04/ju3+zWI1FGiVvIScbjXdWT4gzgXNPZ9Mwn6cc5tWgysm1qXoZxkFZ22kwoxWrXgvytMlgCZas9 0+q/n+5zageCsdA3NZ5ufxYbiI2S8AIh8YD9jMChHVtYKS6OdbWj5bQ5mcPOZY2MSaMiAh8m8Yrgf JsfNUk3SqUohSS61UxjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu7q-00000005wn7-0hqr; Tue, 28 Jan 2025 22:32:06 +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 1tcu7n-00000005wkB-3muT for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103523; 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=HnHGO2i5WCYQQwE0bD2iqbJGQ/MOP5blzngdikTIbKVzIUCgi8B5Aja5t1hkhwb3/uouTJ ZsNE9IhM6Ax8ZypZXBDrMRyS1nw3fZDrPKVclwSZyA/f5epIrHefJWnbA2AvdwRlcPhLRj I3xNc5HTU44drrRNcHA4kimtu0tv6uI= 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: K0z3qdxjaxnthTjkNntlL0voMVG5FlM7IbqF2KmYGtA_1738103514 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143204_034468_38C64566 X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953311 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 7F6D2C0218A for ; Tue, 28 Jan 2025 22:32:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=rlQQOPaIHt25nOxBM0E75Qg+oYZSP1JrnWKIjta2nzA=; b=xfhBh08CUShiDg 441Cuthe2JYokqoq3VFfC6O6v9ev7nmu1QvVYvu0s4vmCWWmWcL3Ur+3fzpC/QewMIfGwgQvH11GH hPr+KnnvZoL7JsKmy/9ITRtjyJ4efCME7menAvGaoMI6YQr/0mLAUcRADHB58Jyg24ZTeJgLOZpuF eImfS9Tp2SwmiWLNn3JpIQP6WSPZ/8vKu/o6fJtXq9v2v7/3HLbCjj1GA3tU3mgVcUxJ5JFDKSlJ8 Vt19KK9PBsXBMuca8pkWjr2LfSisRw2GCB84S1Rfx5vWhasd2jyhWgPCN/Wdd17Y/eG1RkYDaC8Ot tVE6/x1SkyLD44Zt8kmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu81-00000005wz2-3Jl2; Tue, 28 Jan 2025 22:32:17 +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-00000005wt8-3rG6 for linux-amlogic@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: 2xBoHZlmMT6dsX2ofc2teNkziZ5n5y5L488vY0cSXH8_1738103525 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143214_051826_DB63ECA2 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953313 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 D914AC0218A for ; Tue, 28 Jan 2025 22:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=MNmy76D7woyURfpPHqh11zeJH4XZusuMVoihcnlJYnU=; b=cm/MJasIFC1Zxq QWfhOVoO2GEEox91hvf1GZJ/uCspbrzaCatdOiQ7tYmkC74t02LZrZvfK5WSvoNwTLrwGlC+5YE7Y nF9SFwgC+bxsdadBISB27FnlbRyN9y7kSBwDoU9EpBGOPGYVbLyJuCHD0+GuEXKrjvzd4MZpszKvd GOL6waa+BOqtDD4UvRcSUO0s2QNSwsYGBRdpSpCKDAQjZ92KXMif9SGmCtdjfOAoExPRRLvp0U+I1 OCTObij3HAwqgU7936iypbwUmuEqjNHf+9OJDiAN+vOGA0DF8HECnY3wQeVkaItZwGekSPnppb4/R D26VzOkBWV7WSI+u5cww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8J-00000005xGf-1tTV; Tue, 28 Jan 2025 22:32:35 +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 1tcu8G-00000005xB8-07kI for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103551; 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=hPWoLT9muewHwYkt4VAeGaEVCtr0RW1PQynElahMOq/Q0oYW3ufjwqsAaLV+hq2blVupFp qMgqX8Qf0yw1w2JClSHUZ2pt77vJ6d6i39+VIqzl9LvgFZ7b6x4WkX3A049jBTTavkgrG1 ge9rNOp14zwNua2kkDnf+8XpWZwBnOY= 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: iP5-cjD33RkpOZrKXoUJgbfw4zh3hkMbGENyOPrD6us_1738103537 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143232_142460_AEA2A1CA X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953315 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 A18EBC0218D for ; Tue, 28 Jan 2025 22:32: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=ncQVO9AF1BykVYhtWWIQOnh7lEBQJRwKTZI46TH/rW4=; b=3xvLTphx4LkB5x IpCWqLiUEXjNT1GKmJ3eCjbA7rF1rOWaKYDjeGrqbv44Bw49d8HGNMViNY9wmcj8q61xNEQf5mutl uJxpn6EzkStmxw2Nc6/q9CksxZRDLMn+F63wNR4BYa+dpvrZwLkXb/vInW28cL6h1NWcJR1kWsxr0 bTZjofrk9IxmxmCBHUsWNMON5xIwVyLvNSD198YI2i7Iz+Bd6v/CpI5EQFOBhCdJsHrYPHAmTzmWD b+38MPVBNqk7ktm+qFiDG+3CkaW4f3RgBZb+eKgvSxEcRpIG4IrfiPyDfvdFu+1PQKk0XK+VslzKa YFoqK8SqSjTYBfyXedtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8S-00000005xS2-24qp; Tue, 28 Jan 2025 22:32:44 +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 1tcu8P-00000005xNv-4217 for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103561; 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=Ifjea2LGBMv4MDgPgQVSJTPvpvtiCaCmXIBVTplcx1dLlpy/GLqVmzwPthIqiVRzUJou6M sqwrpxPb598LyAyqhDT61ynWzCBB9CwbK8nRmTlCKFyg3x/qA3ldrZYduTGj7+wwmPXZyu zB4hJV3nGBG/dyWHJDJNJXAQkcHnjYs= 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: K1pCCfqaG8x2qZql8-0sD6fzdHria-qMpEkaOGaTHK8_1738103548 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143242_119905_1AEC9D5B X-CRM114-Status: GOOD ( 10.17 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953317 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 5A1C2C0218A for ; Tue, 28 Jan 2025 22:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=+7R0k01ZI9F+I6A928oAM2UkOUfA/OMlCF5ZdodNwjk=; b=1Rz0lZto9M82n1 q4vkZoei0qmjUwBE3/Cj0lE6g2W0wyhNxLJwfVopGHlHO3zfhAia65lAamyQAZMovdw4TZRAu2jk4 j5iWfT2hC417QXmY4L/yUPGU5hh/UW6Sow5+Us6RpRCLIpCbUjpxskna/wg7nPRGCySmqkYrbPR7U G0xxL/wuZCJ4BGlX4PNHsbvGMgHyqJxMsQ2DzLljDDkXlL5cMZIPHbspP14elUywuN3vCCs/puaqn ECMuHqPOzXaQFuhBlfeL9vrJhvMeG03UQJT0T5xK7CcU22bSZ8AUP9s3rwwOOj3maLAU7uLRy7fl8 uTUNhJ75I8xkbtgCs5rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8a-00000005xcM-0Ojf; Tue, 28 Jan 2025 22:32:52 +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 1tcu8X-00000005xY7-2dQi for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:32:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103568; 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=c3Iex+1KgZiO2xVfPNmflAG6xRxWWyD0fp1I6Qg7W4PRNJ+lTHwBIXE2eZqKmLZGUP7x+P xVhd9EzvUyVFtRrDWdPbhi2r/Fwqgac4S33kR+QMWnxluawfDN01etgmf6iVaKcatQuwzE uIB1sEIPOg2ZxhePDCh8Y0bjN33zuHI= 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: 69xWTIlqbq7ViA6QoPEgh84ZxQ0yz0bfH9yBYuBIIvk_1738103559 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143249_737206_476230A0 X-CRM114-Status: GOOD ( 10.99 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953319 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 E3B06C02196 for ; Tue, 28 Jan 2025 22:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=CFwrTmzIfwvTdNDCbvqaKyGFx5yr7GVg6DxACm6igqk=; b=k/HmIZf1CLr015 lmUs52gKcjDp40x3f72o9TFu60wJSJYah8tzTMWNw1ptxc6/1MYCQG5sqVdz6bak8T5n8wKito++a frLDiGk+EdWRk1BIXs+eLDvgEcr5YEM98zF/8YRREML1lOu/JQP/SgpYq5T2uGSsfCMuiMhY++7U6 YCinq4d3+B27EV5+3aJub/VLw0UoOvm3NZ41HVB57Ni80GDV65szPJwvLcaPyTnTsxcr0eoSTw3tS Vue/vSgWc6/TNCqxVJjeqQqj9zGhCFAykNc4IlkqGxwbzx1hv1zcVE26xsF39zX2WXazj7ddpJRzP aXiU8JviEbDRgqm7neRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8k-00000005xqJ-1rc9; 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-00000005xk1-40y3 for linux-amlogic@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=1738103578; 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=UjYIC8GAvrHtzHLNHv5bEfNyYQqw0pVb8cKwHoeAClOFmunlh25LoMnQhLDQrQ7IbqlRco qmRB/9Bo08AAWocZDzlhXqyYvspvBs8x32cE5LWWoh/QUc/rP+Y47NK/ErLFPrR9Yr67jf qxfzeMKNzUaLop2HRyJCiN1LTonqHn4= 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: K5kG4j-_ldhUD8PW4-FFv4yYHDaCpfM8ocYYFj_-fzo_1738103570 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143259_075853_F21387B1 X-CRM114-Status: GOOD ( 10.40 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953321 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 B7C0CC02193 for ; Tue, 28 Jan 2025 22:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=DhLXiAyFycyE/FNSYcvDkKKAmX5xvuLM2sQS70sOhGQ=; b=DVqa31oJ60L+BW /yPr0aBWfAZfs5FLVjyiI03abVuCBNzhackmAQF7TRxO6RwP3ysc0DeRG3XM1tMzMcOk2NqjTiWsY Tn5ABnkeDn744sKicgAWGZU/C25mlE45He1HY9kAQmKqeqESMu431zCLMfA15jNPtOF5+0ZTTUULS 7Phk/I0u2tctR8kSAMsqt+tmnn0Pciba/7TwVSAOldYtFh6GcN/1chVH0nmEWFhd86dla3i7qSwTY c6Hqrc9ACvT4IfOGpNSqihpY6hRasR3NHYmmG0evPHtFMEIpSMjSlRb1uSDJAlTcyaWXnKa+V8CBe X6BAipPOq5bkqeJREp0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu8u-00000005y3q-1yKR; Tue, 28 Jan 2025 22:33:12 +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 1tcu8r-00000005xzc-3CHc for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:33:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738103588; 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=KQpF7EdqlOOHOEJPTqjMvHZvBYfYpIDdJdH2QwuJaUSJHKwRBhAPoT6SNPAJdmbwoNaUHe GnFKUHNZCGp+s8SOCPf66UUJAi/ml5GZwo/CLxTghR8q5vcAR/2yzQ8roaN/ZGk8LP95+C BtkvOjXq11pX/tJCzytZb2W2Zfqimc4= 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: 59ZdNKjuc7BeAEHpAqwnhs07FVD9oyIOsyh2jN4sXk0_1738103582 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143309_878418_67ED135E X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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: 13953322 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 CF47AC02193 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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=WWpiYY2QGv+u4SrwAFk29N69X0YpNltoKj+Jsk3GG+U=; b=IyPxsuF7GzGoOo 4jMCK+He/OD79/fTI0kPmfNax8jIrqQzcTa+HQfhs0Y7tlq6Jmdzi02IZGPwb6VkTQjGr9t4MHk6q mWuNd8U+AxEzTyPSBvbxfqlApUmcDL2iSjZVrYRdQPYQqc0DUkIdI7NnUr7Z7eeC+dNowJQBxturn 8yOgmyNF9Y/AvtQUiOE9yK7YR6n/Z/M4xdW/83aGBCHk4p7rHPyvzODyaH3g7/S7QaF7ut1G2/8PX w699j1l8mZjQT+TiZu5dDSiCR6YosTKo/8lDBH+ObZ7IevbBe+pXgAIi9BxgmE42WVdZDFzFh16f1 +5Zb8ypK4IubdJiA02Zg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tcu98-00000005yGQ-2l3I; Tue, 28 Jan 2025 22:33:26 +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-00000005yCJ-2gOL for linux-amlogic@lists.infradead.org; Tue, 28 Jan 2025 22:33:25 +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: Hhc-NTBiHk5oImAhejEbjkRfZNc1nq4BawbfdPxbmGE_1738103593 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_143323_743674_4ADF2FA8 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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 ---------------------------------------