Patch "ice: use proper macro for testing bit" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ice: use proper macro for testing bit

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ice-use-proper-macro-for-testing-bit.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit da853c1216990c492313ed4ce109982e372b576b
Author: Petr Oros <poros@xxxxxxxxxx>
Date:   Tue Jul 2 10:14:57 2024 -0700

    ice: use proper macro for testing bit
    
    [ Upstream commit 7829ee78490ddb29993cc7893384a04b8cc7436c ]
    
    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: 4da71a77fc3b ("ice: read internal temperature sensor")
    Acked-by: Ivan Vecera <ivecera@xxxxxxxxxx>
    Reviewed-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
    Signed-off-by: Petr Oros <poros@xxxxxxxxxx>
    Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>
    Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@xxxxxxxxx> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Link: https://patch.msgid.link/20240702171459.2606611-5-anthony.l.nguyen@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/ice/ice_hwmon.c b/drivers/net/ethernet/intel/ice/ice_hwmon.c
index e4c2c1bff6c08..b7aa6812510a4 100644
--- a/drivers/net/ethernet/intel/ice/ice_hwmon.c
+++ b/drivers/net/ethernet/intel/ice/ice_hwmon.c
@@ -96,7 +96,7 @@ static bool ice_is_internal_reading_supported(struct ice_pf *pf)
 
 	unsigned long sensors = pf->hw.dev_caps.supported_sensors;
 
-	return _test_bit(ICE_SENSOR_SUPPORT_E810_INT_TEMP_BIT, &sensors);
+	return test_bit(ICE_SENSOR_SUPPORT_E810_INT_TEMP_BIT, &sensors);
 };
 
 void ice_hwmon_init(struct ice_pf *pf)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux