mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
drm/amdgpu: Use ARRAY_SIZE to get array length
Use ARRAY_SIZE to get array length. Signed-off-by: yipechai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
ab3b9de65b
commit
954ea6aa15
|
|
@ -89,7 +89,8 @@ const char *get_ras_block_str(struct ras_common_if *ras_block)
|
|||
return ras_block_string[ras_block->block];
|
||||
}
|
||||
|
||||
#define ras_block_str(_BLOCK_) (((_BLOCK_) < (sizeof(*ras_block_string)/sizeof(const char*))) ? ras_block_string[_BLOCK_] : "Out Of Range")
|
||||
#define ras_block_str(_BLOCK_) \
|
||||
(((_BLOCK_) < ARRAY_SIZE(ras_block_string)) ? ras_block_string[_BLOCK_] : "Out Of Range")
|
||||
|
||||
#define ras_err_str(i) (ras_error_string[ffs(i)])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user