From: Mateusz Polchlopek <mateusz.polchlo...@intel.com> Date: Thu, 8 Aug 2024 13:04:29 +0200
> > > On 7/30/2024 3:40 PM, Alexander Lobakin wrote: >> From: Mateusz Polchlopek <mateusz.polchlo...@intel.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