diff mbox series

[V1,2/2] accel/amdxdna: Remove DRM_AMDXDNA_HWCTX_CONFIG_NUM

Message ID 20241217165446.2607585-2-lizhi.hou@amd.com (mailing list archive)
State New
Headers show
Series [V1,1/2] accel/amdxdna: Add zero check for pad in ioctl input structures | expand

Commit Message

Lizhi Hou Dec. 17, 2024, 4:54 p.m. UTC
Defining a number of enum elements in uapi header is meaningless. It will
not be used as expected and can potentially lead to incompatible issue
between user space application and driver.

Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
---
 include/uapi/drm/amdxdna_accel.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Mario Limonciello Dec. 17, 2024, 5:08 p.m. UTC | #1
On 12/17/2024 10:54, Lizhi Hou wrote:
> Defining a number of enum elements in uapi header is meaningless. It will
> not be used as expected and can potentially lead to incompatible issue
> between user space application and driver.
> 
> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>

It's a great point.  Making this change now before the uAPI is stable 
will allow you to add new changes later.

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> ---
>   include/uapi/drm/amdxdna_accel.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/include/uapi/drm/amdxdna_accel.h b/include/uapi/drm/amdxdna_accel.h
> index 92eff83fac1f..a706ead39082 100644
> --- a/include/uapi/drm/amdxdna_accel.h
> +++ b/include/uapi/drm/amdxdna_accel.h
> @@ -122,7 +122,6 @@ enum amdxdna_drm_config_hwctx_param {
>   	DRM_AMDXDNA_HWCTX_CONFIG_CU,
>   	DRM_AMDXDNA_HWCTX_ASSIGN_DBG_BUF,
>   	DRM_AMDXDNA_HWCTX_REMOVE_DBG_BUF,
> -	DRM_AMDXDNA_HWCTX_CONFIG_NUM
>   };
>   
>   /**
Mario Limonciello Dec. 17, 2024, 6:47 p.m. UTC | #2
On 12/17/2024 10:54, Lizhi Hou wrote:
> Defining a number of enum elements in uapi header is meaningless. It will
> not be used as expected and can potentially lead to incompatible issue
> between user space application and driver.
> 
> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
> ---
>   include/uapi/drm/amdxdna_accel.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/include/uapi/drm/amdxdna_accel.h b/include/uapi/drm/amdxdna_accel.h
> index 92eff83fac1f..a706ead39082 100644
> --- a/include/uapi/drm/amdxdna_accel.h
> +++ b/include/uapi/drm/amdxdna_accel.h
> @@ -122,7 +122,6 @@ enum amdxdna_drm_config_hwctx_param {
>   	DRM_AMDXDNA_HWCTX_CONFIG_CU,
>   	DRM_AMDXDNA_HWCTX_ASSIGN_DBG_BUF,
>   	DRM_AMDXDNA_HWCTX_REMOVE_DBG_BUF,
> -	DRM_AMDXDNA_HWCTX_CONFIG_NUM
>   };
>   
>   /**

I've applied both patches to drm-misc-next.  Thanks!

6a8d72b80807a accel/amdxdna: Remove DRM_AMDXDNA_HWCTX_CONFIG_NUM 
  

03c318a0af96f accel/amdxdna: Add zero check for pad in ioctl input 
structures
diff mbox series

Patch

diff --git a/include/uapi/drm/amdxdna_accel.h b/include/uapi/drm/amdxdna_accel.h
index 92eff83fac1f..a706ead39082 100644
--- a/include/uapi/drm/amdxdna_accel.h
+++ b/include/uapi/drm/amdxdna_accel.h
@@ -122,7 +122,6 @@  enum amdxdna_drm_config_hwctx_param {
 	DRM_AMDXDNA_HWCTX_CONFIG_CU,
 	DRM_AMDXDNA_HWCTX_ASSIGN_DBG_BUF,
 	DRM_AMDXDNA_HWCTX_REMOVE_DBG_BUF,
-	DRM_AMDXDNA_HWCTX_CONFIG_NUM
 };
 
 /**