drm/amdgpu: Fix ENOSYS means 'invalid syscall nr' in amdgpu_device.c
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Sun, 23 Jul 2023 06:00:47 +0000 (11:30 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jul 2023 18:59:29 +0000 (14:59 -0400)
commitb8920e1e0dae10ebe34959bdfc6150383bf8d08c
tree5f79a5fb59aa9c6cf01728d64f51216d09fc3fd8
parent8a92e8676cfbe4de018a60a2870de37188fc75c6
drm/amdgpu: Fix ENOSYS means 'invalid syscall nr' in amdgpu_device.c

ENOSYS should be used for nonexistent syscalls only, replace ENOSYS with
EOPNOTSUPP for reset handlers that are not implemented for respective ASIC.

WARNING: ENOSYS means 'invalid syscall nr' and nothing else
+       if (r == -ENOSYS)

WARNING: ENOSYS means 'invalid syscall nr' and nothing else
+       if (r == -ENOSYS)

And other following style fixes in amdgpu_device.c:

WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
WARNING: Block comments should align the * on each line
WARNING: Missing a blank line after declarations
WARNING: braces {} are not necessary for single statement blocks

Cc: Lijo Lazar <lijo.lazar@amd.com>
Cc: Kent Russell <kent.russell@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c