mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iio: health: max30100: drop unnecessary cast
@ 2026-03-14 22:33 David Lechner
  2026-03-16 11:25 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: David Lechner @ 2026-03-14 22:33 UTC (permalink / raw)
  To: Jonathan Cameron, Nuno Sá, Andy Shevchenko
  Cc: linux-iio, linux-kernel, David Lechner

Drop an unnecessary cast in max30100_led_init().

val is defined as unsigned int val[2]; so the cast is not needed, nor
is the address-of operator &.

Also fix alignment with ( while we are touching this.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
 drivers/iio/health/max30100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
index 7dfdb5eb305e..00dca1c9425c 100644
--- a/drivers/iio/health/max30100.c
+++ b/drivers/iio/health/max30100.c
@@ -274,7 +274,7 @@ static int max30100_led_init(struct max30100_data *data)
 	int reg, ret;
 
 	ret = device_property_read_u32_array(dev, "maxim,led-current-microamp",
-					(unsigned int *) &val, 2);
+					     val, 2);
 	if (ret) {
 		/* Default to 24 mA RED LED, 50 mA IR LED */
 		reg = (MAX30100_REG_LED_CONFIG_24MA <<

---
base-commit: ff0843ceb1fb11a6b73e0e77b932ef7967aecd4b
change-id: 20260314-iio-health-max301000-drop-int-cast-f34f3493e0f7

Best regards,
--  
David Lechner <dlechner@baylibre.com>


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

end of thread, other threads:[~2026-04-12 14:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-14 22:33 [PATCH] iio: health: max30100: drop unnecessary cast David Lechner
2026-03-16 11:25 ` Andy Shevchenko
2026-03-21 20:56   ` Jonathan Cameron
2026-04-12 14:32     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®