Re: [PATCH 1/8] drm: Add crtc->name and use it in debug messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Nov 2015, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 24c5434..ea00a69 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -677,6 +677,9 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
>  	crtc->dev = dev;
>  	crtc->funcs = funcs;
>  
> +	if (!crtc->name)
> +		crtc->name = "";
> +

This, and the cleanup dance you have to do in patch 5/8, are my only
gripes with the series. I would prefer it if crtc->name and plane->name
were managed dynamically by the init/cleanup functions like
connector->name and encoder->name are. However those are easier because
the caller doesn't decide the name.

Do you think it would be too ugly to have this here:

	crtc->name = kstrdup(crtc->name ? crtc->name : "", GFP_KERNEL);

It would of course be neater if the name was passed in as parameter, but
that would generate quite a bit of unnecessary churn.

If you are all "meh" I guess I can live with your approach too.

BR,
Jani.



-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux