staging: unisys: Solve sparse warning
PATCH 1/1 staging: unisys: Solve sparse warning
The following commit fixes the following sparse report:
drivers/staging//unisys/visorhba/visorhba_main.c:660:29: warning: cast to restricted __le64
by casting readq (which is unsigned long on x86) to u64, as expected by the seq_printf call.
---
Just compiled tested on x86_64.
drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/unisys/visorhba/visorhba_main.c +1 -1
@@ -657,7 +657,7 @@ static int info_debugfs_show(struct seq_file *seq, void *v)seq_printf (seq,"phys_flags_addr = 0x%016llx\n" , phys_flags_addr);seq_printf (seq,"FeatureFlags = %llu\n" , - (__le64 )readq (devdata->flags_addr)); + (u64 )readq (devdata->flags_addr)); }seq_printf (seq,"acquire_failed_cnt = %llu\n" , devdata->acquire_failed_cnt);
Signature · 1 line
2.9.3
Quoted 35 lines
-----Original Message-----
From: Marcos Paulo de Souza [mailto:[email protected]]
Sent: Tuesday, May 2, 2017 11:28 PM
Cc: Marcos Paulo de Souza <[email protected]>; Kershner, David A <[email protected]>; Greg Kroah-Hartman <[email protected]>; Sell, Timothy C <[email protected]>; Binder, David Anthony <[email protected]>; Erik Arfvidson <[email protected]>; Wadgaonkar, Sameer Laxmikant <[email protected]>; Curtin, Alexander Paul <[email protected]>; *S-Par-Maintainer <[email protected]>; [email protected]; linux- [email protected]
Subject: [PATCH] staging: unisys: Solve sparse warningThe following commit fixes the following sparse report:
drivers/staging//unisys/visorhba/visorhba_main.c:660:29: warning: cast to restricted
__le64by casting readq (which is unsigned long on x86) to u64, as expected by the
seq_printfcall.Signed-off-by Marcos Paulo de Souza <[email protected]>---
Just compiled tested onx86_64.drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/unisys/visorhba/visorhba_main.c +0
-0
drivers/staging/unisys/visorhba/visorhba_main.c static int info_debugfs_show(struct seq_file *seq, · line 661
Quoted 6 lines
drivers/staging/unisys/visorhba/visorhba_main.c +1
-1@@ -657,7 +657,7 @@ static int info_debugfs_show(struct seq_file *seq, void *v) seq_printf(seq, "phys_flags_addr = 0x%016llx\n", phys_flags_addr);seq_printf (seq,"FeatureFlags = %llu\n" , - (__le64 )readq (devdata->flags_addr)); + (u64 )readq (devdata->flags_addr));
Quoted 5 lines
drivers/staging/unisys/visorhba/visorhba_main.c +0
-0} seq_printf(seq, "acquire_failed_cnt = %llu\n",
devdata->acquire_failed_cnt);
--
2.9.3