mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] treewide: drop useless casting to void * in of_device_id
Date: Tue,  9 Sep 2025 10:59:33 +0200	[thread overview]
Message-ID: <20250909085933.926161-1-s.hauer@pengutronix.de> (raw)

struct of_device_id::data already is a const void *, so drop explicit
casting to void * when initialized with something that already is a
pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/hw_random/rockchip-rng.c   |  6 +++---
 drivers/pinctrl/pinctrl-rockchip.c |  2 +-
 drivers/spi/dspi_spi.c             |  2 +-
 drivers/spi/spi-nxp-fspi.c         | 10 +++++-----
 drivers/video/ssd1307fb.c          |  8 ++++----
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/hw_random/rockchip-rng.c b/drivers/hw_random/rockchip-rng.c
index 62a21db0e2..8856a3883e 100644
--- a/drivers/hw_random/rockchip-rng.c
+++ b/drivers/hw_random/rockchip-rng.c
@@ -187,15 +187,15 @@ static const struct rk_rng_soc_data rk_rng_v2_soc_data = {
 static const struct of_device_id rk_rng_dt_match[] = {
 	{
 		.compatible = "rockchip,rk3399-crypto",
-		.data = (void *)&rk_rng_rk3399_soc_data,
+		.data = &rk_rng_rk3399_soc_data,
 	},
 	{
 		.compatible = "rockchip,cryptov1-rng",
-		.data = (void *)&rk_rng_v1_soc_data,
+		.data = &rk_rng_v1_soc_data,
 	},
 	{
 		.compatible = "rockchip,rk3568-rng",
-		.data = (void *)&rk_rng_v2_soc_data,
+		.data = &rk_rng_v2_soc_data,
 	},
 	{ },
 };
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 9c11104513..58e9153bd6 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -3236,7 +3236,7 @@ static const struct of_device_id rockchip_pinctrl_dt_match[] = {
 #endif
 #ifdef CONFIG_ARCH_RK3128
 	{ .compatible = "rockchip,rk3128-pinctrl",
-		.data = (void *)&rk3128_pin_ctrl },
+		.data = &rk3128_pin_ctrl },
 #endif
 #ifdef CONFIG_ARCH_RK3188
 	{ .compatible = "rockchip,rk3188-pinctrl",
diff --git a/drivers/spi/dspi_spi.c b/drivers/spi/dspi_spi.c
index 75addfd12c..356259a814 100644
--- a/drivers/spi/dspi_spi.c
+++ b/drivers/spi/dspi_spi.c
@@ -397,7 +397,7 @@ static const struct fsl_dspi_devtype_data vf610_data = {
 };
 
 static const struct of_device_id dspi_dt_ids[] = {
-	{ .compatible = "fsl,vf610-dspi", .data = (void *)&vf610_data, },
+	{ .compatible = "fsl,vf610-dspi", .data = &vf610_data, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, dspi_dt_ids);
diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
index 6f91e75d5e..4937932a36 100644
--- a/drivers/spi/spi-nxp-fspi.c
+++ b/drivers/spi/spi-nxp-fspi.c
@@ -1039,11 +1039,11 @@ static int nxp_fspi_probe(struct device *dev)
 }
 
 static const struct of_device_id nxp_fspi_dt_ids[] = {
-	{ .compatible = "nxp,imx8mm-fspi", .data = (void *)&imx8mm_data, },
-	{ .compatible = "nxp,imx8mn-fspi", .data = (void *)&imx8mm_data, },
-	{ .compatible = "nxp,imx8mp-fspi", .data = (void *)&imx8mm_data, },
-	{ .compatible = "nxp,imx8qxp-fspi", .data = (void *)&imx8qxp_data, },
-	{ .compatible = "nxp,imx8dxl-fspi", .data = (void *)&imx8dxl_data, },
+	{ .compatible = "nxp,imx8mm-fspi", .data = &imx8mm_data, },
+	{ .compatible = "nxp,imx8mn-fspi", .data = &imx8mm_data, },
+	{ .compatible = "nxp,imx8mp-fspi", .data = &imx8mm_data, },
+	{ .compatible = "nxp,imx8qxp-fspi", .data = &imx8qxp_data, },
+	{ .compatible = "nxp,imx8dxl-fspi", .data = &imx8dxl_data, },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, nxp_fspi_dt_ids);
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
index 5880f2b4a5..abb8031636 100644
--- a/drivers/video/ssd1307fb.c
+++ b/drivers/video/ssd1307fb.c
@@ -404,11 +404,11 @@ static struct ssd1307fb_deviceinfo ssd1307fb_ssd1309_deviceinfo = {
 static const struct of_device_id ssd1307fb_of_match[] = {
 	{
 		.compatible = "solomon,ssd1305fb-i2c",
-		.data = (void *)&ssd1307fb_ssd1305_deviceinfo,
+		.data = &ssd1307fb_ssd1305_deviceinfo,
 	},
 	{
 		.compatible = "solomon,ssd1306fb-i2c",
-		.data = (void *)&ssd1307fb_ssd1306_deviceinfo,
+		.data = &ssd1307fb_ssd1306_deviceinfo,
 	},
 	{
 		/*
@@ -416,11 +416,11 @@ static const struct of_device_id ssd1307fb_of_match[] = {
 		 * documented as device tree binding.
 		 */
 		.compatible = "solomon,ssd1306",
-		.data = (void *)&ssd1307fb_ssd1306_deviceinfo,
+		.data = &ssd1307fb_ssd1306_deviceinfo,
 	},
 	{
 		.compatible = "solomon,ssd1309fb-i2c",
-		.data = (void *)&ssd1307fb_ssd1309_deviceinfo,
+		.data = &ssd1307fb_ssd1309_deviceinfo,
 	},
 	{},
 };
-- 
2.47.3




                 reply	other threads:[~2025-09-09 10:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250909085933.926161-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox