lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9bf0798a-7dd5-4328-68f5-8bc2cd2ffa99@huawei.com>
Date:   Wed, 22 Apr 2020 15:59:49 +0800
From:   Wu Bo <wubo40@...wei.com>
To:     Joseph Qi <joseph.qi@...ux.alibaba.com>, <mark@...heh.com>,
        <jlbec@...lplan.org>
CC:     <linux-kernel@...r.kernel.org>, <ocfs2-devel@....oracle.com>,
        <liuzhiqiang26@...wei.com>, <linfeilong@...wei.com>
Subject: Re: [PATCH] fs:ocfs2:remove unneeded variable 'o2dlm_flags'

On 2020/4/22 15:52, Joseph Qi wrote:
> 
> 
> On 2020/4/22 15:12, Wu Bo wrote:
>> Fix the following coccicheck warning:
>> fs/ocfs2/stack_o2cb.c:69:5-16: Unneeded variable: "o2dlm_flags".
>> Return "0" on line 84
>>
> Umm... This is not right, NAK.
> Something tricky is in map_flag() so that coccicheck doesn't recognize.
> 
> Thanks,
> Joseph

You are right. Did not notice that map_flag is a macro, Please ignore 
this patch.

Thanks,
Wu Bo

> 
>> Signed-off-by: Wu Bo <wubo40@...wei.com>
>> ---
>>   fs/ocfs2/stack_o2cb.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
>> index dbf8b57..2da9633 100644
>> --- a/fs/ocfs2/stack_o2cb.c
>> +++ b/fs/ocfs2/stack_o2cb.c
>> @@ -66,8 +66,6 @@ static inline int mode_to_o2dlm(int mode)
>>   	}
>>   static int flags_to_o2dlm(u32 flags)
>>   {
>> -	int o2dlm_flags = 0;
>> -
>>   	map_flag(DLM_LKF_NOQUEUE, LKM_NOQUEUE);
>>   	map_flag(DLM_LKF_CANCEL, LKM_CANCEL);
>>   	map_flag(DLM_LKF_CONVERT, LKM_CONVERT);
>> @@ -81,7 +79,7 @@ static int flags_to_o2dlm(u32 flags)
>>   	/* map_flag() should have cleared every flag passed in */
>>   	BUG_ON(flags != 0);
>>   
>> -	return o2dlm_flags;
>> +	return 0;
>>   }
>>   #undef map_flag
>>   
>>
> 
> .
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ