All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FS: Fixing return type of unsigned_offsets
@ 2017-05-11  4:27 Pushkar Jambhlekar
  2017-05-11  4:39 ` Joe Perches
  0 siblings, 1 reply; 12+ messages in thread
From: Pushkar Jambhlekar @ 2017-05-11  4:27 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-fsdevel, linux-kernel, Pushkar Jambhlekar

Fixing Sparse warning. It should return bool, instead it returns
int. 

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
---
 fs/read_write.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/read_write.c b/fs/read_write.c
index 47c1d44..d672830 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -33,9 +33,9 @@ const struct file_operations generic_ro_fops = {
 
 EXPORT_SYMBOL(generic_ro_fops);
 
-static inline int unsigned_offsets(struct file *file)
+static inline bool unsigned_offsets(struct file *file)
 {
-	return file->f_mode & FMODE_UNSIGNED_OFFSET;
+	return !!(file->f_mode & FMODE_UNSIGNED_OFFSET);
 }
 
 /**
-- 
2.7.4

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

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

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11  4:27 [PATCH] FS: Fixing return type of unsigned_offsets Pushkar Jambhlekar
2017-05-11  4:39 ` Joe Perches
2017-05-11  4:43   ` Pushkar Jambhlekar
2017-05-11  4:55     ` Joe Perches
2017-05-11  4:55       ` Joe Perches
2017-05-11  5:04       ` Pushkar Jambhlekar
2017-05-11  6:07         ` Al Viro
2017-05-11 16:21           ` [PATCH] avoid useless warning for 'bool <- restricted type' conversion Luc Van Oostenryck
2017-05-11 19:41             ` Christopher Li
2017-05-11 19:48               ` Luc Van Oostenryck
2017-05-11 20:20               ` Luc Van Oostenryck
2017-05-11 20:09           ` [PATCH] FS: Fixing return type of unsigned_offsets Luc Van Oostenryck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.