drm/amdgpu: use string choice helpers
authorR Sundar <prosunofficial@gmail.com>
Sun, 27 Oct 2024 14:05:37 +0000 (19:35 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Nov 2024 16:33:24 +0000 (11:33 -0500)
Use string choice helpers for better readability.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/r/202410161814.I6p2Nnux-lkp@intel.com/
Signed-off-by: R Sundar <prosunofficial@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_eeprom.c

index 35fee3e..8cd6983 100644 (file)
@@ -200,7 +200,7 @@ static int amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr,
                dev_err_ratelimited(&i2c_adap->dev,
                                    "maddr:0x%04X size:0x%02X:quirk max_%s_len must be > %d",
                                    eeprom_addr, buf_size,
-                                   read ? "read" : "write", EEPROM_OFFSET_SIZE);
+                                   str_read_write(read), EEPROM_OFFSET_SIZE);
                return -EINVAL;
        }