linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: unisys: Solve sparse warning
@ 2017-05-03  3:28 Marcos Paulo de Souza
  2017-05-03 15:20 ` Kershner, David A
  0 siblings, 1 reply; 2+ messages in thread
From: Marcos Paulo de Souza @ 2017-05-03  3:28 UTC (permalink / raw)
  Cc: Marcos Paulo de Souza, David Kershner, Greg Kroah-Hartman,
	Tim Sell, David Binder, Erik Arfvidson, Sameer Wadgaonkar,
	Alexander Curtin, sparmaintainer, devel, linux-kernel

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.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
 Just compiled tested on x86_64.

 drivers/staging/unisys/visorhba/visorhba_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging/unisys/visorhba/visorhba_main.c
index 6997b16..46d33e6 100644
--- a/drivers/staging/unisys/visorhba/visorhba_main.c
+++ b/drivers/staging/unisys/visorhba/visorhba_main.c
@@ -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);
-- 
2.9.3

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

* RE: [PATCH] staging: unisys: Solve sparse warning
  2017-05-03  3:28 [PATCH] staging: unisys: Solve sparse warning Marcos Paulo de Souza
@ 2017-05-03 15:20 ` Kershner, David A
  0 siblings, 0 replies; 2+ messages in thread
From: Kershner, David A @ 2017-05-03 15:20 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: Greg Kroah-Hartman, Sell, Timothy C, Binder, David Anthony,
	Erik Arfvidson, Wadgaonkar, Sameer Laxmikant, Curtin,
	Alexander Paul, *S-Par-Maintainer, devel, linux-kernel

> -----Original Message-----
> From: Marcos Paulo de Souza [mailto:marcos.souza.org@gmail.com]
> Sent: Tuesday, May 2, 2017 11:28 PM
> Cc: Marcos Paulo de Souza <marcos.souza.org@gmail.com>; Kershner, David
> A <David.Kershner@unisys.com>; Greg Kroah-Hartman
> <gregkh@linuxfoundation.org>; Sell, Timothy C <Timothy.Sell@unisys.com>;
> Binder, David Anthony <David.Binder@unisys.com>; Erik Arfvidson
> <erik.arfvidson@unisys.com>; Wadgaonkar, Sameer Laxmikant
> <Sameer.Wadgaonkar@unisys.com>; Curtin, Alexander Paul
> <Alexander.Curtin@unisys.com>; *S-Par-Maintainer
> <SParMaintainer@unisys.com>; devel@driverdev.osuosl.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] 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.
> 
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> ---
>  Just compiled tested on x86_64.
> 
>  drivers/staging/unisys/visorhba/visorhba_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c
> b/drivers/staging/unisys/visorhba/visorhba_main.c
> index 6997b16..46d33e6 100644
> --- a/drivers/staging/unisys/visorhba/visorhba_main.c
> +++ b/drivers/staging/unisys/visorhba/visorhba_main.c
> @@ -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));

Acked-by: David Kershner <david.kershner@unisys.com>

>  	}
>  	seq_printf(seq, "acquire_failed_cnt = %llu\n",
>  		   devdata->acquire_failed_cnt);
> --
> 2.9.3

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

end of thread, other threads:[~2017-05-03 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03  3:28 [PATCH] staging: unisys: Solve sparse warning Marcos Paulo de Souza
2017-05-03 15:20 ` Kershner, David A

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