All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] leds: netxbig: clean up a data type issue
@ 2015-04-09  9:07 ` Dan Carpenter
  0 siblings, 0 replies; 37+ messages in thread
From: Dan Carpenter @ 2015-04-09  9:07 UTC (permalink / raw)
  To: Bryan Wu, Simon Guinot; +Cc: Richard Purdie, linux-leds, kernel-janitors

This driver is pretty hardware specific so it's unlikely that we're
going to be using it on 64 big endian systems.  Still, the current code
causes a static checker warning so we may as well change the type from
"unsigned long" to "u32" and remove the casting.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/include/linux/platform_data/leds-kirkwood-netxbig.h b/include/linux/platform_data/leds-kirkwood-netxbig.h
index d2be19a..bbd1d99 100644
--- a/include/linux/platform_data/leds-kirkwood-netxbig.h
+++ b/include/linux/platform_data/leds-kirkwood-netxbig.h
@@ -29,9 +29,9 @@ enum netxbig_led_mode {
 #define NETXBIG_LED_INVALID_MODE NETXBIG_LED_MODE_NUM
 
 struct netxbig_led_timer {
-	unsigned long		delay_on;
-	unsigned long		delay_off;
-	enum netxbig_led_mode	mode;
+	u32 delay_on;
+	u32 delay_off;
+	enum netxbig_led_mode mode;
 };
 
 struct netxbig_led {
diff --git a/drivers/leds/leds-netxbig.c b/drivers/leds/leds-netxbig.c
index d0b743c..3da87be 100644
--- a/drivers/leds/leds-netxbig.c
+++ b/drivers/leds/leds-netxbig.c
@@ -447,9 +447,9 @@ static int netxbig_leds_get_of_pdata(struct device *dev,
 			of_property_read_u32_index(np, "timers", 3 * i,
 						&timers[i].mode);
 			of_property_read_u32_index(np, "timers", 3 * i + 1,
-						(u32 *) &timers[i].delay_on);
+						   &timers[i].delay_on);
 			of_property_read_u32_index(np, "timers", 3 * i + 2,
-						(u32 *) &timers[i].delay_off);
+						   &timers[i].delay_off);
 		}
 		pdata->timer = timers;
 		pdata->num_timer = num_timers;

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

end of thread, other threads:[~2015-04-13 10:54 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09  9:07 [patch 2/2] leds: netxbig: clean up a data type issue Dan Carpenter
2015-04-09  9:07 ` Dan Carpenter
2015-04-09 19:25 ` Simon Guinot
2015-04-09 19:25   ` Simon Guinot
2015-04-09 19:25   ` Simon Guinot
2015-04-09 19:54   ` Dan Carpenter
2015-04-09 19:54     ` Dan Carpenter
2015-04-09 19:54     ` Dan Carpenter
2015-04-10  0:25     ` Simon Guinot
2015-04-10  0:25       ` Simon Guinot
2015-04-10  0:25       ` Simon Guinot
2015-04-10  8:30       ` [patch 2/2 v2] leds: netxbig: silence a static checker warning Dan Carpenter
2015-04-10  8:30         ` Dan Carpenter
2015-04-10 14:18         ` Jacek Anaszewski
2015-04-10 14:18           ` Jacek Anaszewski
2015-04-10 14:30           ` Dan Carpenter
2015-04-10 14:30             ` Dan Carpenter
2015-04-10 14:41             ` Simon Guinot
2015-04-10 14:41               ` Simon Guinot
2015-04-10 15:50               ` Dan Carpenter
2015-04-10 15:50                 ` Dan Carpenter
2015-04-10 19:52                 ` Simon Guinot
2015-04-10 19:52                   ` Simon Guinot
2015-04-13  7:35                   ` Jacek Anaszewski
2015-04-13  7:35                     ` Jacek Anaszewski
2015-04-13 10:16                     ` Simon Guinot
2015-04-13 10:16                       ` Simon Guinot
2015-04-13 10:54                       ` Jacek Anaszewski
2015-04-13 10:54                         ` Jacek Anaszewski
2015-04-13 10:16                   ` Dan Carpenter
2015-04-13 10:16                     ` Dan Carpenter
2015-04-10 14:30         ` Simon Guinot
2015-04-10 14:30           ` Simon Guinot
2015-04-13  8:25           ` Gregory CLEMENT
2015-04-13  8:25             ` Gregory CLEMENT
2015-04-13  9:20             ` Simon Guinot
2015-04-13  9:20               ` Simon Guinot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.