power: reset: fix __le32 cast in reset code
PATCH 1/1 power: reset: fix __le32 cast in reset code
The writel() takes standard integers, not __le32 so fix the following sparse warnings by removing the cpu_to_le32() calls.
drivers/power/reset/at91-reset.c:134:9: warning: cast from restricted __le32 drivers/power/reset/at91-reset.c:143:9: warning: cast from restricted __le32
This has made no code changes, the md5sums pre and post applying this patch are the same. The at91 should be natively little endian anyway.
---
Cc: Sebastian Reichel <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Ludovic Desroches <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- drivers/power/reset/at91-reset.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/power/reset/at91-reset.c +2 -4
@@ -131,7 +131,7 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,static int sama5d3_restart (struct notifier_block *this,unsigned long mode,void *cmd) { -writel (cpu_to_le32 (AT91_RSTC_KEY |AT91_RSTC_PERRST |AT91_RSTC_PROCRST ), +writel (AT91_RSTC_KEY |AT91_RSTC_PERRST |AT91_RSTC_PROCRST , at91_rstc_base);return NOTIFY_DONE ;
@@ -140,9 +140,7 @@ static int sama5d3_restart(struct notifier_block *this, unsigned long mode,static int samx7_restart (struct notifier_block *this,unsigned long mode,void *cmd) { -writel (cpu_to_le32 (AT91_RSTC_KEY |AT91_RSTC_PROCRST ), - at91_rstc_base); - +writel (AT91_RSTC_KEY |AT91_RSTC_PROCRST , at91_rstc_base);return NOTIFY_DONE ; }
Signature · 7 lines
2.23.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sebastian Reichel
maintainerHi,
Quoted 7 lines · Ben Dooks (Codethink)
The
writel()takes standard integers, not__le32so fix the following sparse warnings by removing thecpu_to_le32()calls.
drivers/power/reset/at91-reset.c:134:9: warning: cast from restricted__le32drivers/power/reset/at91-reset.c:143:9: warning: cast from restricted__le32
Quoted 6 lines
This has made no code changes, the md5sums pre and post applying this patch are the same. The at91 should be natively little endian anyway.
Signed-off-by Ben Dooks <[email protected]>---
Thanks, queued.
-- Sebastian
Quoted 38 lines
Cc Sebastian Reichel <[email protected]>Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Ludovic Desroches <[email protected]>--- drivers/power/reset/at91-reset.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/power/reset/at91-reset.c +2
-4@@ -131,7 +131,7 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,static int sama5d3_restart (struct notifier_block *this,unsigned long mode,void *cmd) { -writel (cpu_to_le32 (AT91_RSTC_KEY |AT91_RSTC_PERRST |AT91_RSTC_PROCRST ), +writel (AT91_RSTC_KEY |AT91_RSTC_PERRST |AT91_RSTC_PROCRST , at91_rstc_base);return NOTIFY_DONE ;@@ -140,9 +140,7 @@ static int sama5d3_restart(struct notifier_block *this, unsigned long mode,static int samx7_restart (struct notifier_block *this,unsigned long mode,void *cmd) { -writel (cpu_to_le32 (AT91_RSTC_KEY |AT91_RSTC_PROCRST ), - at91_rstc_base); - +writel (AT91_RSTC_KEY |AT91_RSTC_PROCRST , at91_rstc_base);return NOTIFY_DONE ; }Signature · 1 line
2.23.0