lkml.org 
[lkml]   [2017]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] FS: Fixing return type of unsigned_offsets
Date
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
\
 
 \ /
  Last update: 2017-05-11 06:28    [W:0.338 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site