Re: [PATCH] FS: Fixing return type of unsigned_offsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I remove '!!', sparse flags warning:

fs/read_write.c:38:29: warning: incorrect type in return expression
(different base types)
fs/read_write.c:38:29:    expected bool
fs/read_write.c:38:29:    got restricted fmode_t

It means explicit conversion is needed.

On Thu, May 11, 2017 at 10:25 AM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> On Thu, 2017-05-11 at 10:13 +0530, Pushkar Jambhlekar wrote:
>> Should I change my implementation, i.e. remove '!!'?
>
> That'd be up to Al.
>
> At least one implementation using similar bit comparisons
> in fs/*.c does not use !!
>
> fs/locks.c:static bool lease_breaking(struct file_lock *fl)
> fs/locks.c-{
> fs/locks.c-     return fl->fl_flags & (FL_UNLOCK_PENDING | FL_DOWNGRADE_PENDING)
> fs/locks.c-}
>
> I didn't look very hard.



-- 
Jambhlekar Pushkar Arun



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux