linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: staging: lustre: lustre: llite: file.c - fixed sparse warning about different fmode_t type
@ 2017-04-24  6:53 Andrea della Porta
  2017-04-28  7:30 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea della Porta @ 2017-04-24  6:53 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, James Simmons, Greg Kroah-Hartman,
	lustre-devel, devel, linux-kernel

fixed a couple of sparse warning complaining about type mismatch.

Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
---
 drivers/staging/lustre/lustre/include/lustre_intent.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h
index ed2b6c6..c036633 100644
--- a/drivers/staging/lustre/lustre/include/lustre_intent.h
+++ b/drivers/staging/lustre/lustre/include/lustre_intent.h
@@ -38,7 +38,7 @@
 struct lookup_intent {
 	int		it_op;
 	int		it_create_mode;
-	__u64		it_flags;
+	fmode_t		it_flags;
 	int		it_disposition;
 	int		it_status;
 	__u64		it_lock_handle;
-- 
2.4.10

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

* [PATCH] drivers: staging: lustre: lustre: llite: file.c - fixed sparse warning about different fmode_t type
@ 2017-04-24 10:28 Andrea della Porta
  2017-06-03  8:31 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea della Porta @ 2017-04-24 10:28 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, James Simmons, Greg Kroah-Hartman,
	lustre-devel, devel, linux-kernel

Fixed the following sparse warning:

  CHECK   drivers/staging/lustre/lustre/llite//file.c
  drivers/staging/lustre/lustre/llite//file.c:441:24: warning: incorrect
  type in assignment (different base types)
  drivers/staging/lustre/lustre/llite//file.c:441:24:    expected
  restricted fmode_t [usertype] och_flags
  drivers/staging/lustre/lustre/llite//file.c:441:24:    got unsigned
  long long [unsigned] [usertype] it_flags
  drivers/staging/lustre/lustre/llite//file.c:465:65: warning:
  restricted fmode_t degrades to integer
  drivers/staging/lustre/lustre/llite//file.c:465:22: warning: incorrect
  type in assignment (different base types)
  drivers/staging/lustre/lustre/llite//file.c:465:22:    expected
  restricted fmode_t [usertype] fd_omode
  drivers/staging/lustre/lustre/llite//file.c:465:22:    got unsigned
  long long
  drivers/staging/lustre/lustre/llite//file.c:526:38: warning: invalid
  assignment: |=
  drivers/staging/lustre/lustre/llite//file.c:526:38:    left side has
  type unsigned long long
  drivers/staging/lustre/lustre/llite//file.c:526:38:    right side has
  type restricted fmode_t
  drivers/staging/lustre/lustre/llite//file.c:533:49: warning:
  restricted fmode_t degrades to integer
  drivers/staging/lustre/lustre/llite//file.c:553:28: warning:
  restricted fmode_t degrades to integer
  drivers/staging/lustre/lustre/llite//file.c:556:35: warning:
  restricted fmode_t degrades to integer
  drivers/staging/lustre/lustre/llite//file.c:778:23: warning:
  restricted fmode_t degrades to integer
  drivers/staging/lustre/lustre/llite//file.c:1309:62: warning:
  restricted fmode_t degrades to integer
  drivers/staging/lustre/lustre/llite//file.c:1357:23: warning:
  incorrect type in initializer (different base types)
  drivers/staging/lustre/lustre/llite//file.c:1357:23:    expected
  unsigned long long [unsigned] [usertype] flags
  drivers/staging/lustre/lustre/llite//file.c:1357:23:    got restricted
  fmode_t [usertype] <noident>


Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
---
 drivers/staging/lustre/lustre/include/lustre_intent.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h
index ed2b6c6..c036633 100644
--- a/drivers/staging/lustre/lustre/include/lustre_intent.h
+++ b/drivers/staging/lustre/lustre/include/lustre_intent.h
@@ -38,7 +38,7 @@
 struct lookup_intent {
 	int		it_op;
 	int		it_create_mode;
-	__u64		it_flags;
+	fmode_t		it_flags;
 	int		it_disposition;
 	int		it_status;
 	__u64		it_lock_handle;
-- 
2.4.10

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

* Re: [PATCH] drivers: staging: lustre: lustre: llite: file.c - fixed sparse warning about different fmode_t type
  2017-04-24  6:53 Andrea della Porta
@ 2017-04-28  7:30 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-04-28  7:30 UTC (permalink / raw)
  To: Andrea della Porta
  Cc: Oleg Drokin, Andreas Dilger, James Simmons, lustre-devel, devel,
	linux-kernel

On Mon, Apr 24, 2017 at 07:53:11AM +0100, Andrea della Porta wrote:
> fixed a couple of sparse warning complaining about type mismatch.

That's really vague, please be specific.

> 
> Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
> ---
>  drivers/staging/lustre/lustre/include/lustre_intent.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h
> index ed2b6c6..c036633 100644
> --- a/drivers/staging/lustre/lustre/include/lustre_intent.h
> +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h
> @@ -38,7 +38,7 @@
>  struct lookup_intent {
>  	int		it_op;
>  	int		it_create_mode;
> -	__u64		it_flags;
> +	fmode_t		it_flags;

Are you sure?  Why?  What exact warning did this "fix"?

thanks,

greg k-h

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

* Re: [PATCH] drivers: staging: lustre: lustre: llite: file.c - fixed sparse warning about different fmode_t type
  2017-04-24 10:28 [PATCH] drivers: staging: lustre: lustre: llite: file.c - fixed sparse warning about different fmode_t type Andrea della Porta
@ 2017-06-03  8:31 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-06-03  8:31 UTC (permalink / raw)
  To: Andrea della Porta
  Cc: Oleg Drokin, Andreas Dilger, James Simmons, lustre-devel, devel,
	linux-kernel

On Mon, Apr 24, 2017 at 11:28:58AM +0100, Andrea della Porta wrote:
> Fixed the following sparse warning:
> 
>   CHECK   drivers/staging/lustre/lustre/llite//file.c
>   drivers/staging/lustre/lustre/llite//file.c:441:24: warning: incorrect
>   type in assignment (different base types)
>   drivers/staging/lustre/lustre/llite//file.c:441:24:    expected
>   restricted fmode_t [usertype] och_flags
>   drivers/staging/lustre/lustre/llite//file.c:441:24:    got unsigned
>   long long [unsigned] [usertype] it_flags
>   drivers/staging/lustre/lustre/llite//file.c:465:65: warning:
>   restricted fmode_t degrades to integer
>   drivers/staging/lustre/lustre/llite//file.c:465:22: warning: incorrect
>   type in assignment (different base types)
>   drivers/staging/lustre/lustre/llite//file.c:465:22:    expected
>   restricted fmode_t [usertype] fd_omode
>   drivers/staging/lustre/lustre/llite//file.c:465:22:    got unsigned
>   long long
>   drivers/staging/lustre/lustre/llite//file.c:526:38: warning: invalid
>   assignment: |=
>   drivers/staging/lustre/lustre/llite//file.c:526:38:    left side has
>   type unsigned long long
>   drivers/staging/lustre/lustre/llite//file.c:526:38:    right side has
>   type restricted fmode_t
>   drivers/staging/lustre/lustre/llite//file.c:533:49: warning:
>   restricted fmode_t degrades to integer
>   drivers/staging/lustre/lustre/llite//file.c:553:28: warning:
>   restricted fmode_t degrades to integer
>   drivers/staging/lustre/lustre/llite//file.c:556:35: warning:
>   restricted fmode_t degrades to integer
>   drivers/staging/lustre/lustre/llite//file.c:778:23: warning:
>   restricted fmode_t degrades to integer
>   drivers/staging/lustre/lustre/llite//file.c:1309:62: warning:
>   restricted fmode_t degrades to integer
>   drivers/staging/lustre/lustre/llite//file.c:1357:23: warning:
>   incorrect type in initializer (different base types)
>   drivers/staging/lustre/lustre/llite//file.c:1357:23:    expected
>   unsigned long long [unsigned] [usertype] flags
>   drivers/staging/lustre/lustre/llite//file.c:1357:23:    got restricted
>   fmode_t [usertype] <noident>

Please don't line-wrap messages like this so that we can see them
easier.

> Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
> ---
>  drivers/staging/lustre/lustre/include/lustre_intent.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h
> index ed2b6c6..c036633 100644
> --- a/drivers/staging/lustre/lustre/include/lustre_intent.h
> +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h
> @@ -38,7 +38,7 @@
>  struct lookup_intent {
>  	int		it_op;
>  	int		it_create_mode;
> -	__u64		it_flags;
> +	fmode_t		it_flags;

This adds a bunch of new build warnings when appied, are you sure you
test-built your code?  Always do so, I can't take this patch as-is :(

thanks,

greg k-h

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

end of thread, other threads:[~2017-06-03 14:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-24 10:28 [PATCH] drivers: staging: lustre: lustre: llite: file.c - fixed sparse warning about different fmode_t type Andrea della Porta
2017-06-03  8:31 ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2017-04-24  6:53 Andrea della Porta
2017-04-28  7:30 ` Greg Kroah-Hartman

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