From e2686fb715b719f08473cbd7412f32a166916cf5 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Sep 2024 09:42:49 +0000 Subject: [PATCH] drm/amdgpu: update type of buf size to u32 for eeprom functions From Tao Zhou 0798e4330b5404c547e236c07a5a06309d0a2980 in linux-6.6.y/6.6.50 2aadb520bfacec12527effce3566f8df55e5d08e in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.c | 6 +++--- sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.c index 0d50f6be997..4dedcc0c76c 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.c @@ -179,7 +179,7 @@ static int __amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr, * Returns the number of bytes read/written; -errno on error. */ static int amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr, - u8 *eeprom_buf, u16 buf_size, bool read) + u8 *eeprom_buf, u32 buf_size, bool read) { const struct i2c_adapter_quirks *quirks = i2c_adap->quirks; u16 limit; @@ -225,7 +225,7 @@ static int amdgpu_eeprom_xfer(struct i2c_adapter *i2c_adap, u32 eeprom_addr, int amdgpu_eeprom_read(struct i2c_adapter *i2c_adap, u32 eeprom_addr, u8 *eeprom_buf, - u16 bytes) + u32 bytes) { return amdgpu_eeprom_xfer(i2c_adap, eeprom_addr, eeprom_buf, bytes, true); @@ -233,7 +233,7 @@ int amdgpu_eeprom_read(struct i2c_adapter *i2c_adap, int amdgpu_eeprom_write(struct i2c_adapter *i2c_adap, u32 eeprom_addr, u8 *eeprom_buf, - u16 bytes) + u32 bytes) { return amdgpu_eeprom_xfer(i2c_adap, eeprom_addr, eeprom_buf, bytes, false); diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.h b/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.h index 6935adb2be1..8083b8253ef 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.h +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_eeprom.h @@ -28,10 +28,10 @@ int amdgpu_eeprom_read(struct i2c_adapter *i2c_adap, u32 eeprom_addr, u8 *eeprom_buf, - u16 bytes); + u32 bytes); int amdgpu_eeprom_write(struct i2c_adapter *i2c_adap, u32 eeprom_addr, u8 *eeprom_buf, - u16 bytes); + u32 bytes); #endif -- 2.20.1