drm/amdkfd: Replace zero-length array with flexible-array member
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 15 Feb 2022 23:54:38 +0000 (18:54 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Feb 2022 22:30:03 +0000 (17:30 -0500)
Reference:
https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

CC: Changcheng Deng <deng.changcheng@zte.com.cn>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
include/uapi/linux/kfd_ioctl.h

index 6e4268f..baec5a4 100644 (file)
@@ -673,7 +673,7 @@ struct kfd_ioctl_svm_args {
        __u32 op;
        __u32 nattr;
        /* Variable length array of attributes */
-       struct kfd_ioctl_svm_attribute attrs[0];
+       struct kfd_ioctl_svm_attribute attrs[];
 };
 
 /**