FS: Making aproriate return type
PATCH 1/1 FS: Making aproriate return type
unsigned_offsets function returns fmode_t but function definition returns int. sparse generate warning. Updating proper return type
Signed-off-by Pushkar Jambhlekar <[email protected]>
--- fs/read_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/read_write.c +1 -1
@@ -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 ; }
Signature · 1 line
2.7.4
Al Viro
maintainerQuoted 2 lines · Pushkar Jambhlekar
unsigned_offsetsfunction returnsfmode_tbut 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...