All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steve French <sfrench@samba.org>,
	Hyunchul Lee <hyc.lee@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-cifs@vger.kernel.org
Subject: Re: [PATCH v2] ksmbd: Remove a redundant zeroing of memory
Date: Thu, 24 Mar 2022 17:46:18 +0300	[thread overview]
Message-ID: <20220324144618.GQ3293@kadam> (raw)
In-Reply-To: <577b4601aa5d62d222fa9387c5036f2504f40318.1648017112.git.christophe.jaillet@wanadoo.fr>

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@wanadoo.fr>
> ---
> 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


      parent reply	other threads:[~2022-03-24 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23  6:32 [PATCH v2] ksmbd: Remove a redundant zeroing of memory Christophe JAILLET
2022-03-23 13:51 ` Namjae Jeon
2022-03-24 14:46 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220324144618.GQ3293@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=hyc.lee@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.