1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel
Petr Oros 7829ee7849 ice: use proper macro for testing bit
Do not use _test_bit() macro for testing bit. The proper macro for this
is one without underline.

_test_bit() is what test_bit() was prior to const-optimization. It
directly calls arch_test_bit(), i.e. the arch-specific implementation
(or the generic one). It's strictly _internal_ and shouldn't be used
anywhere outside the actual test_bit() macro.

test_bit() is a wrapper which checks whether the bitmap and the bit
number are compile-time constants and if so, it calls the optimized
function which evaluates this call to a compile-time constant as well.
If either of them is not a compile-time constant, it just calls _test_bit().
test_bit() is the actual function to use anywhere in the kernel.

IOW, calling _test_bit() avoids potential compile-time optimizations.

The sensors is not a compile-time constant, thus most probably there
are no object code changes before and after the patch.
But anyway, we shouldn't call internal wrappers instead of
the actual API.

Fixes: 4da71a77fc ("ice: read internal temperature sensor")
Acked-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Petr Oros <poros@redhat.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20240702171459.2606611-5-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-07-03 19:36:52 -07:00
..
e1000 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
e1000e e1000e: Fix S0ix residency on corporate systems 2024-07-01 20:05:26 -07:00
fm10k net: intel: implement modern PM ops declarations 2024-03-29 08:58:43 -07:00
i40e i40e: Fully suspend and resume IO operations in EEH case 2024-05-29 18:56:30 -07:00
iavf tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ice ice: use proper macro for testing bit 2024-07-03 19:36:52 -07:00
idpf idpf: don't enable NAPI and interrupts prior to allocating Rx buffers 2024-05-27 17:11:43 -07:00
igb igb: flower: validate control flags 2024-05-08 09:22:33 -07:00
igbvf net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
igc Revert "igc: fix a log entry using uninitialized netdev" 2024-06-13 07:24:52 -07:00
ixgbe Quite smaller than usual. Notably it includes the fix for the unix 2024-05-23 12:49:37 -07:00
ixgbevf net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
libeth libeth: add Rx buffer management 2024-04-24 11:06:25 -07:00
libie net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00
e100.c net: intel: implement modern PM ops declarations 2024-03-29 08:58:43 -07:00
Kconfig net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00
Makefile net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00