[Intel-xe] [PATCH v2 1/2] drm/xe: Get rid of MAKE_INIT_EXIT_FUNCS

Matt Atwood matthew.s.atwood at intel.com
Thu May 11 20:36:31 UTC 2023


On Thu, May 11, 2023 at 04:48:21PM -0300, Gustavo Sousa wrote:
> There is not much of a benefit from using that macro as of now and it
> hurts grepability or other ways of cross-referencing.
> 
> Cc: Jani Nikula <jani.nikula at intel.com>
Reviewed-by: Matt Atwood <matthew.s.atwood at intel.com>
> Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_module.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
> index 6860586ce7f8..0b4541639bd1 100644
> --- a/drivers/gpu/drm/xe/xe_module.c
> +++ b/drivers/gpu/drm/xe/xe_module.c
> @@ -39,12 +39,16 @@ struct init_funcs {
>  	int (*init)(void);
>  	void (*exit)(void);
>  };
> -#define MAKE_INIT_EXIT_FUNCS(name)		\
> -	{ .init = xe_##name##_module_init,	\
> -	  .exit = xe_##name##_module_exit, }
> +
>  static const struct init_funcs init_funcs[] = {
> -	MAKE_INIT_EXIT_FUNCS(hw_fence),
> -	MAKE_INIT_EXIT_FUNCS(sched_job),
> +	{
> +		.init = xe_hw_fence_module_init,
> +		.exit = xe_hw_fence_module_exit,
> +	},
> +	{
> +		.init = xe_sched_job_module_init,
> +		.exit = xe_sched_job_module_exit,
> +	},
>  };
>  
>  static int __init xe_init(void)
> -- 
> 2.40.1
> 


More information about the Intel-xe mailing list