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] [day] [month] [year] [list]
Date:   Tue, 20 Apr 2021 14:04:10 +0200
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Ashish Kalra <eashishkalra@...il.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: atomisp: silence "dubious: !x | !y" warning

Hi Ashish,

On 18/04/2021 03:26, Ashish Kalra wrote:
> On Sat, Apr 17, 2021 at 08:56:13PM +0200, Mauro Carvalho Chehab wrote:
>> Em Sat, 17 Apr 2021 21:06:27 +0530
>> Ashish Kalra <eashishkalra@...il.com> escreveu:
>>
>>> Upon running sparse, "warning: dubious: !x | !y" is brought to notice
>>> for this file.  Logical and bitwise OR are basically the same in this
>>> context so it doesn't cause a runtime bug.  But let's change it to
>>> logical OR to make it cleaner and silence the Sparse warning.
>>>
>>> Signed-off-by: Ashish Kalra <eashishkalra@...il.com>
>>> ---
>>>  .../media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c    | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c
>>> index 358cb7d2cd4c..3b850bb2d39d 100644
>>> --- a/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c
>>> +++ b/drivers/staging/media/atomisp/pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.c
>>> @@ -58,7 +58,7 @@ sh_css_vf_downscale_log2(
>>>  	unsigned int ds_log2 = 0;
>>>  	unsigned int out_width;
>>>  
>>> -	if ((!out_info) | (!vf_info))
>>> +	if ((!out_info) || (!vf_info))
>>
>>
>> While here, please get rid of the unneeded parenthesis:
>>
>> 	if (!out_info || !vf_info)
>>
>>
>>>  		return -EINVAL;
>>>  
>>>  	out_width = out_info->res.width;
>>
>>
>>
>> Thanks,
>> Mauro
> Updated Patch as per your feedback

Please don't post patches as an attachment. Just post it inline as you did the
first time, but with Subject prefix [PATCHv2].

Thanks!

	Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ