Re: [PATCH v3 22/22] drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private data

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

 



On 23/02/16 17:03, Jyri Sarha wrote:
> Use devm_kzalloc() and devm_kcalloc() for private data allocation at
> driver load time.
> 
> Signed-off-by: Jyri Sarha <jsarha@xxxxxx>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_crtc.c   |  4 +---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c    | 19 +++++++------------
>  drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 20 ++++++--------------
>  drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 24 +++++++-----------------
>  4 files changed, 21 insertions(+), 46 deletions(-)

I see you took one step further and used devm_alloc for the crtcs and
encoders etc too =). I don't see why that wouldn't work, though, as they
are all created at init time and freed when the driver exits.

However, at least omapdrm does handle freeing in the specific _destroy
callbacks, so I do wonder if there's some reason for that...

Did you test with tilcdc as module, with all the kernel debug options
enabled, and a few load/unload module cycles?

 Tomi

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux