Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639183

[PATCH] FS: Fixing return type of unsigned_offsets

From Pushkar Jambhlekar <pushkar.iit@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] FS: Fixing return type of unsigned_offsets
Date 2017-05-11 06:30 +0200
Message-ID <tFNTH-1w1-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] FS: Fixing return type of unsigned_offsets Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-11 06:30 +0200
  Re: [PATCH] FS: Fixing return type of unsigned_offsets Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-11 06:50 +0200
    Re: [PATCH] FS: Fixing return type of unsigned_offsets Joe Perches <joe@perches.com> - 2017-05-11 07:00 +0200
      Re: [PATCH] FS: Fixing return type of unsigned_offsets Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-11 07:10 +0200
        Re: [PATCH] FS: Fixing return type of unsigned_offsets Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-11 08:10 +0200
          Re: [PATCH] FS: Fixing return type of unsigned_offsets Luc Van Oostenryck <luc.vanoostenryck@gmail.com> - 2017-05-11 22:10 +0200
  Re: [PATCH] FS: Fixing return type of unsigned_offsets Joe Perches <joe@perches.com> - 2017-05-11 06:50 +0200

csiph-web