Commit de84aa96 authored by Francois Dugast's avatar Francois Dugast Committed by Rodrigo Vivi
Browse files

drm/xe/uapi: Remove useless XE_QUERY_CONFIG_NUM_PARAM



num_params can be used to retrieve the size of the info array
for the specific version of the kernel being used.

v2: Also remove XE_QUERY_CONFIG_NUM_PARAM (José Roberto de Souza)

Signed-off-by: default avatarFrancois Dugast <francois.dugast@intel.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 3d78923b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -305,7 +305,7 @@ static int query_memory_usage(struct xe_device *xe,

static int query_config(struct xe_device *xe, struct drm_xe_device_query *query)
{
	u32 num_params = XE_QUERY_CONFIG_NUM_PARAM;
	const u32 num_params = XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY + 1;
	size_t size =
		sizeof(struct drm_xe_query_config) + num_params * sizeof(u64);
	struct drm_xe_query_config __user *query_ptr =
+0 −1
Original line number Diff line number Diff line
@@ -329,7 +329,6 @@ struct drm_xe_query_config {
#define XE_QUERY_CONFIG_GT_COUNT		4
#define XE_QUERY_CONFIG_MEM_REGION_COUNT	5
#define XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY	6
#define XE_QUERY_CONFIG_NUM_PARAM		(XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY + 1)
	/** @info: array of elements containing the config info */
	__u64 info[];
};