Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639182 > unrolled thread
| Started by | Pushkar Jambhlekar <pushkar.iit@gmail.com> |
|---|---|
| First post | 2017-05-11 06:20 +0200 |
| Last post | 2017-05-11 06:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] FS: Making aproriate return type Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-11 06:20 +0200
Re: [PATCH] FS: Making aproriate return type Al Viro <viro@ZenIV.linux.org.uk> - 2017-05-11 06:30 +0200
| From | Pushkar Jambhlekar <pushkar.iit@gmail.com> |
|---|---|
| Date | 2017-05-11 06:20 +0200 |
| Subject | [PATCH] FS: Making aproriate return type |
| Message-ID | <tFNK1-1q6-1@gated-at.bofh.it> |
unsigned_offsets function returns fmode_t but function definition returns int. sparse generate warning.
Updating proper return type
Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
---
fs/read_write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index 47c1d44..d11eabc 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -33,7 +33,7 @@ const struct file_operations generic_ro_fops = {
EXPORT_SYMBOL(generic_ro_fops);
-static inline int unsigned_offsets(struct file *file)
+static inline fmode_t unsigned_offsets(struct file *file)
{
return file->f_mode & FMODE_UNSIGNED_OFFSET;
}
--
2.7.4
[toc] | [next] | [standalone]
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Date | 2017-05-11 06:30 +0200 |
| Message-ID | <tFNTH-1w1-7@gated-at.bofh.it> |
| In reply to | #1639182 |
On Thu, May 11, 2017 at 09:44:09AM +0530, Pushkar Jambhlekar wrote: > unsigned_offsets function returns fmode_t but function definition returns int. sparse generate warning. > Updating proper return type You do realize that it's a predicate? This is actually one case where bool would be appropriate...
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web