driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: wfx: add gcc extension __force cast
@ 2019-11-08 23:38 Jules Irenge
  2019-11-09  8:36 ` Greg KH
  2019-11-09  9:19 ` Al Viro
  0 siblings, 2 replies; 8+ messages in thread
From: Jules Irenge @ 2019-11-08 23:38 UTC (permalink / raw)
  To: gregkh; +Cc: devel, Boqun.Feng, Jules Irenge, linux-kernel

Add gcc extension __force and __le32 cast to fix warning issued by Sparse tool."warning: cast to restricted __le32"

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 drivers/staging/wfx/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c
index 0a9ca109039c..aa7b2dd691b9 100644
--- a/drivers/staging/wfx/debug.c
+++ b/drivers/staging/wfx/debug.c
@@ -72,7 +72,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v)
 		return -EIO;
 
 #define PUT_COUNTER(name) \
-	seq_printf(seq, "%24s %d\n", #name ":", le32_to_cpu(counters.count_##name))
+	seq_printf(seq, "%24s %d\n", #name ":", le32_to_cpu((__force __le32)(counters.count_##name)))
 
 	PUT_COUNTER(tx_packets);
 	PUT_COUNTER(tx_multicast_frames);
-- 
2.23.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2019-11-12 12:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 23:38 [PATCH] staging: wfx: add gcc extension __force cast Jules Irenge
2019-11-09  8:36 ` Greg KH
2019-11-09  9:19 ` Al Viro
2019-11-11 13:51   ` Jules Irenge
2019-11-11 20:28     ` Al Viro
2019-11-11 23:16       ` Al Viro
2019-11-12 12:00         ` Jerome Pouiller
2019-11-12 11:32       ` Jerome Pouiller

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).