[PATCH] drm/nouveau/bl: Use kasprintf for interface name

Jacob Keller jacob.e.keller at intel.com
Wed Jun 4 22:46:01 UTC 2025



On 6/4/2025 3:40 PM, Timur Tabi wrote:
> On Wed, 2025-06-04 at 15:16 -0700, Jacob Keller wrote:
>> Fair enough. Another alternative which saves the stack and macro would
>> be to add a new version of backlight_register_device which can pass the
>> integer number itself into dev_set_name, but thats probably not worth
>> the churn either. (Currently we snprintf into a buffer and then again
>> copy that again into the device name...)
> 
> If you really wanted to avoid stack space, you could add backlist_name[24] to 'struct
> nouveau_backlight'.  
> 

I'm not too worried about it. I'll wait a bit for anyone else to comment
and then send a v2 with blacklist_name set to 24 bytes.

Thanks,
Jake


More information about the dri-devel mailing list