linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 00/12] drm: Move to using devm_platform_ioremap_resource
@ 2025-02-25 22:20 Anusha Srivatsa
  2025-02-25 22:20 ` [PATCH RESEND 01/12] drm/aspeed: move to devm_platform_ioremap_resource() usage Anusha Srivatsa
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Anusha Srivatsa @ 2025-02-25 22:20 UTC (permalink / raw)
  To: Joel Stanley, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Andrew Jeffery, Stefan Agner,
	Alison Wang, Xinliang Liu, Tian Tao, Xinwei Kong, Sumit Semwal,
	Yongqin Liu, John Stultz, Chun-Kuang Hu, Philipp Zabel,
	Matthias Brugger, AngeloGioacchino Del Regno, Marek Vasut,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	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,
	Maíra Canal, Raspberry Pi Kernel Maintenance,
	Jonathan Corbet
  Cc: linux-aspeed, dri-devel, linux-arm-kernel, linux-kernel,
	linux-mediatek, imx, linux-stm32, linux-tegra, linux-doc,
	Anusha Srivatsa, CK Hu, Dmitry Baryshkov

Start replacing the below occurences with the newer API:
- (devm_)platform_get_resource + devm_ioremap_resource
- (devm_)platform_get_resource + (devm_)ioremap
- platform_get_resource_byname + devm_ioremap
Move all these occurences to uses devm_platform_ioremap_resource
instead.

This is a resend of v3 of the series. Sending this from drm-misc-next.
Changes from v2 [1]:
- Keep the old snippet of documentation and add further
clarification (Thomas)
- change in vc4 driver for the a resource is not needed.
Add a comment to clarify why that is left behind (Maxime)

[1] - https://patchwork.freedesktop.org/series/144073/

Used Coccinelle to make the code changes.Semantic patch:

//First Case
//rule s/platform_get_resource + devm_ioremap_resource/devm_platform_ioremap_resource
@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);

//Second case
//rule s/(devm_)platform_get_resource + (devm_)ioremap/devm_platform_ioremap_resource.
@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);

//Third case
//rule s/(devm_)platform_get_resource_byname + (devm_)ioremap/devm_platform_ioremap_resource_byname.
@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);
...+>

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
Anusha Srivatsa (12):
      drm/aspeed: move to devm_platform_ioremap_resource() usage
      drm/fsl-dcu: move to devm_platform_ioremap_resource() usage
      drm/hisilicon: move to devm_platform_ioremap_resource() usage
      drm/mediatek: move to devm_platform_ioremap_resource() usage
      drm/mxsfb: move to devm_platform_ioremap_resource() usage
      drm/sprd: move to devm_platform_ioremap_resource() usage
      drm/sti: move to devm_platform_ioremap_resource() usage
      drm/stm: move to devm_platform_ioremap_resource() usage
      drm/tegra: move to devm_platform_ioremap_resource() usage
      drm/tiny: move to devm_platform_ioremap_resource() usage
      drm/vc4: move to devm_platform_ioremap_resource() usage
      Documentation: Update the todo

 Documentation/gpu/todo.rst                      | 13 +++---
 drivers/gpu/drm/aspeed/aspeed_gfx_drv.c         |  4 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c       |  4 +-
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c    |  4 +-
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c |  4 +-
 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 +-
 drivers/gpu/drm/mxsfb/lcdif_drv.c               |  4 +-
 drivers/gpu/drm/mxsfb/mxsfb_drv.c               |  4 +-
 drivers/gpu/drm/sprd/sprd_dpu.c                 |  9 +----
 drivers/gpu/drm/sprd/sprd_dsi.c                 |  9 +----
 drivers/gpu/drm/sti/sti_compositor.c            | 10 +----
 drivers/gpu/drm/sti/sti_dvo.c                   | 10 +----
 drivers/gpu/drm/sti/sti_hda.c                   |  9 +----
 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 +----
 drivers/gpu/drm/stm/ltdc.c                      |  4 +-
 drivers/gpu/drm/tegra/dsi.c                     |  4 +-
 drivers/gpu/drm/tiny/arcpgu.c                   |  4 +-
 drivers/gpu/drm/vc4/vc4_hdmi.c                  | 53 +++++++++----------------
 28 files changed, 51 insertions(+), 171 deletions(-)
---
base-commit: 27d4815149ba0c80ef2db2a82f0512f647e76d62
change-id: 20250225-memory-drm-misc-next-b2444b488db2

Best regards,
-- 
Anusha Srivatsa <asrivats@redhat.com>


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2025-03-05  9:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 22:20 [PATCH RESEND 00/12] drm: Move to using devm_platform_ioremap_resource Anusha Srivatsa
2025-02-25 22:20 ` [PATCH RESEND 01/12] drm/aspeed: move to devm_platform_ioremap_resource() usage Anusha Srivatsa
2025-02-26 14:47   ` (subset) " Maxime Ripard
2025-02-25 22:20 ` [PATCH RESEND 02/12] drm/fsl-dcu: " Anusha Srivatsa
2025-02-25 22:20 ` [PATCH RESEND 03/12] drm/hisilicon: " Anusha Srivatsa
2025-02-25 22:20 ` [PATCH RESEND 04/12] drm/mediatek: " Anusha Srivatsa
2025-02-26 12:39   ` AngeloGioacchino Del Regno
2025-02-26 14:47   ` (subset) " Maxime Ripard
2025-02-25 22:20 ` [PATCH RESEND 05/12] drm/mxsfb: " Anusha Srivatsa
2025-02-25 22:20 ` [PATCH RESEND 06/12] drm/sprd: " Anusha Srivatsa
2025-02-27  1:52   ` Chunyan Zhang
2025-02-25 22:20 ` [PATCH RESEND 07/12] drm/sti: " Anusha Srivatsa
2025-02-26  9:06   ` Raphael Gallais-Pou
     [not found]     ` <CAN9Xe3Q8=_Tz51i6gxNM6445p-rhNiK7B5Ljcga8g_Nn676dCQ@mail.gmail.com>
2025-03-04  8:04       ` Maxime Ripard
2025-03-05  8:47       ` Raphael Gallais-Pou
2025-02-25 22:20 ` [PATCH RESEND 08/12] drm/stm: " Anusha Srivatsa
2025-02-26 14:47   ` (subset) " Maxime Ripard
2025-02-25 22:20 ` [PATCH RESEND 09/12] drm/tegra: " Anusha Srivatsa
2025-02-25 22:20 ` [PATCH RESEND 10/12] drm/tiny: " Anusha Srivatsa
2025-02-26 14:47   ` (subset) " Maxime Ripard
2025-02-25 22:20 ` [PATCH RESEND 11/12] drm/vc4: " Anusha Srivatsa
2025-02-26 14:47   ` (subset) " Maxime Ripard
2025-02-25 22:20 ` [PATCH RESEND 12/12] Documentation: Update the todo Anusha Srivatsa
2025-02-26 10:21   ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).