[PATCH] drm: amdkfd: Replace (un)register_chrdev() by (unregister/alloc)_chrdev_region()

Salah Triki salah.triki at gmail.com
Mon Mar 10 15:19:09 UTC 2025


> > register_chrdev() registers 256 minor numbers, calling it will result in
> > calling kmalloc_array(256, sizeof(struct probe), GFP_KERNEL) whereas
> > calling alloc_chrdev_region() with count parameter equals to 1, which is
> > the number of minor numbers requested, will result in calling
> > kmalloc_array(1, sizeof(stuct probe), GFP_KERNEL). 
> >

Is it worth replacing register_chrdev() by alloc_chrdev_region() for
this ? If so I will change the patch description.

Best Regards,
Salah Triki


More information about the dri-devel mailing list