From: Pushkar Jambhlekar <pushkar.iit@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Pushkar Jambhlekar <pushkar.iit@gmail.com>
Subject: [PATCH] FS: Fixing return type of unsigned_offsets
Date: Thu, 11 May 2017 09:57:51 +0530 [thread overview]
Message-ID: <1494476871-26474-1-git-send-email-pushkar.iit@gmail.com> (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
next reply other threads:[~2017-05-11 4:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 4:27 Pushkar Jambhlekar [this message]
2017-05-11 4:39 ` [PATCH] FS: Fixing return type of unsigned_offsets 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1494476871-26474-1-git-send-email-pushkar.iit@gmail.com \
--to=pushkar.iit@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.