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]
Message-ID: <1c5768a8-7d19-4101-ab62-dadd1ed8eb60@intel.com>
Date: Mon, 12 Aug 2024 14:23:17 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
CC: <intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>, Jacob Keller
	<jacob.e.keller@...el.com>, Wojciech Drewek <wojciech.drewek@...el.com>, "Sai
 Krishna" <saikrishnag@...vell.com>, Simon Horman <horms@...nel.org>, "Ahmed
 Zaki" <ahmed.zaki@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v8 06/14] iavf: add initial
 framework for registering PTP clock

From: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
Date: Mon, 12 Aug 2024 12:01:34 +0200

> 
> 
> On 8/8/2024 2:24 PM, Alexander Lobakin wrote:
>> From: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
>> Date: Thu, 8 Aug 2024 13:04:29 +0200
>>
>>>
>>>
>>> On 7/30/2024 3:40 PM, Alexander Lobakin wrote:
>>>> From: Mateusz Polchlopek <mateusz.polchlopek@...el.com>
>>>> Date: Tue, 30 Jul 2024 05:15:01 -0400
>>
>> [...]
>>
>>>>> +bool iavf_ptp_cap_supported(struct iavf_adapter *adapter, u32 cap)
>>>>> +{
>>>>> +    if (!PTP_ALLOWED(adapter))
>>>>> +        return false;
>>>>> +
>>>>> +    /* Only return true if every bit in cap is set in hw_caps.caps */
>>>>> +    return (adapter->ptp.hw_caps.caps & cap) == cap;
>>>>
>>>> Aren't these parenthesis redundant?
>>>>
>>>
>>> I think they are not. They wrap bit operation and also I checked it
>>> with checkpatch script and it doesn't complain about reduntant
>>> parenthesis.
>>
>> If the object code doesn't change when compiling without them, there are
>> no compiler complains etc, then they are :D checkpatch doesn't always
>> catch things, but I don't remember whether the compiler won't complain
>> or change the object code / logic. Could you please check?
>>
>> Thanks,
>> Olek
> 
> Okay, good point. I checked that and they are not redundant. If I remove
> them then compiler complains and object code changes so - parenthesis
> stay with us :D

Nice, thanks for checking! It's always better and faster to just check
and make sure.

> 
> thanks

Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ