Re: [PATCH v2] ksmbd: Remove a redundant zeroing of memory

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

 



On Wed, Mar 23, 2022 at 07:32:05AM +0100, Christophe JAILLET wrote:
> fill_transform_hdr() has only one caller that already clears tr_buf (it is
> kzalloc'ed).
> 
> So there is no need to clear it another time here.
> 
> Remove the superfluous memset() and add a comment to remind that the caller
> must clear the buffer.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> v2: keep kzalloc in the caller and remove the memset here

I kind of prefered v1.  I misread the code and was looking at the wrong
fill_transform_hdr() function from the other driver.

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux