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 6e4268f5e48206d1d6610b58ed0c2093bad301ee..baec5a41de3e1dc5e5c39c445a5b058dbeb477ba 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[];
 };
 
 /**