diff mbox series

[1/1] drm/amdkfd: Replace zero-length array with flexible-array member

Message ID 20220216003841.1419615-1-Felix.Kuehling@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/1] drm/amdkfd: Replace zero-length array with flexible-array member | expand

Commit Message

Felix Kuehling Feb. 16, 2022, 12:38 a.m. UTC
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>
---
 include/uapi/linux/kfd_ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian König Feb. 16, 2022, 10 a.m. UTC | #1
Am 16.02.22 um 01:38 schrieb Felix Kuehling:
> 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: Christian König <christian.koenig@amd.com>

> ---
>   include/uapi/linux/kfd_ioctl.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
> index 6e4268f5e482..baec5a41de3e 100644
> --- a/include/uapi/linux/kfd_ioctl.h
> +++ b/include/uapi/linux/kfd_ioctl.h
> @@ -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[];
>   };
>   
>   /**
diff mbox series

Patch

diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index 6e4268f5e482..baec5a41de3e 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -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[];
 };
 
 /**