Patch "drm/amdgpu: Return from switch early for EEPROM I2C address" has been added to the 6.1-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

    drm/amdgpu: Return from switch early for EEPROM I2C address

to the 6.1-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:
     drm-amdgpu-return-from-switch-early-for-eeprom-i2c-a.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 0c1216fd2740a619c7712e26c6d0ed716dcb79ea
Author: Luben Tuikov <luben.tuikov@xxxxxxx>
Date:   Thu Mar 23 01:46:41 2023 -0400

    drm/amdgpu: Return from switch early for EEPROM I2C address
    
    [ Upstream commit 8782007b5f5795f118c5167f46d8c8142abcc92f ]
    
    As soon as control->i2c_address is set, return; remove the "break;" from the
    switch--it is unnecessary. This mimics what happens when for some cases in the
    switch, we call helper functions with "return <helper function>".
    
    Remove final function "return true;" to indicate that the switch is final and
    terminal, and that there should be no code after the switch.
    
    Cc: Candice Li <candice.li@xxxxxxx>
    Cc: Kent Russell <kent.russell@xxxxxxx>
    Cc: Alex Deucher <Alexander.Deucher@xxxxxxx>
    Signed-off-by: Luben Tuikov <luben.tuikov@xxxxxxx>
    Reviewed-by: Alex Deucher <Alexander.Deucher@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Stable-dep-of: e0409021e34a ("drm/amdgpu: Update EEPROM I2C address for smu v13_0_0")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
index b908d575b5a98..40cd9d8c4e870 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
@@ -181,14 +181,14 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
 	switch (adev->asic_type) {
 	case CHIP_VEGA20:
 		control->i2c_address = EEPROM_I2C_MADDR_0;
-		break;
+		return true;
 
 	case CHIP_ARCTURUS:
 		return __get_eeprom_i2c_addr_arct(adev, control);
 
 	case CHIP_SIENNA_CICHLID:
 		control->i2c_address = EEPROM_I2C_MADDR_0;
-		break;
+		return true;
 
 	case CHIP_ALDEBARAN:
 		if (strnstr(atom_ctx->vbios_version, "D673",
@@ -196,7 +196,7 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
 			control->i2c_address = EEPROM_I2C_MADDR_4;
 		else
 			control->i2c_address = EEPROM_I2C_MADDR_0;
-		break;
+		return true;
 
 	case CHIP_IP_DISCOVERY:
 		return __get_eeprom_i2c_addr_ip_discovery(adev, control);
@@ -204,8 +204,6 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
 	default:
 		return false;
 	}
-
-	return true;
 }
 
 static void




[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