Re: [PATCH] mmc: renesas_sdhi_internal_dmac: set scatter/gather max segment size

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

 



Hi Wolfram,

Thanks for your feedback.

On 2018-08-30 11:49:12 +0200, Wolfram Sang wrote:
> Hi Niklas,
> 
> > +	if (!dev->dma_parms) {
> > +		dev->dma_parms = kzalloc(sizeof(*dev->dma_parms), GFP_KERNEL);
> 
> Can't we use devm_kzalloc and skip the custom remove function?

We could do that but then we can't reset the struct device dma_parms 
member to NULL.

    kfree(dev->dma_parms);
    dev->dma_parms = NULL;

This might not be a problem but I chose to opt for the more safer 
approach at first. If you or someone else thinks this is not an issue 
I'm more then happy to switch to devm_kcalloc().

-- 
Regards,
Niklas Söderlund



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux