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 Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux