Skip to content

Commit 114518f

Browse files
Michel Dänzeralexdeucher
authored andcommitted
drm/amdgpu: Drop inline from amdgpu_ras_eeprom_max_record_count
This was unusual; normally, inline functions are declared static as well, and defined in a header file if used by multiple compilation units. The latter would be more involved in this case, so just drop the inline declaration for now. Fixes compile failure building for ppc64le on RHEL 8: In file included from ../drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h:32, from ../drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:33: ../drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c: In function ‘amdgpu_ras_recovery_init’: ../drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h:90:17: error: inlining failed in call to ‘always_inline’ ‘amdgpu_ras_eeprom_max_record_count’: function body not available 90 | inline uint32_t amdgpu_ras_eeprom_max_record_count(void); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1985:34: note: called from here 1985 | max_eeprom_records_len = amdgpu_ras_eeprom_max_record_count(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: c84d467 "drm/amdgpu: validate bad page threshold in ras(v3)" Reviewed-by: Lyude Paul <[email protected]> Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8b514e8 commit 114518f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ int amdgpu_ras_eeprom_read(struct amdgpu_ras_eeprom_control *control,
757757
return res;
758758
}
759759

760-
inline uint32_t amdgpu_ras_eeprom_max_record_count(void)
760+
uint32_t amdgpu_ras_eeprom_max_record_count(void)
761761
{
762762
return RAS_MAX_RECORD_COUNT;
763763
}

drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int amdgpu_ras_eeprom_read(struct amdgpu_ras_eeprom_control *control,
120120
int amdgpu_ras_eeprom_append(struct amdgpu_ras_eeprom_control *control,
121121
struct eeprom_table_record *records, const u32 num);
122122

123-
inline uint32_t amdgpu_ras_eeprom_max_record_count(void);
123+
uint32_t amdgpu_ras_eeprom_max_record_count(void);
124124

125125
void amdgpu_ras_debugfs_set_ret_size(struct amdgpu_ras_eeprom_control *control);
126126

0 commit comments

Comments
 (0)