mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: David CARLIER <devnexen@gmail.com>
Cc: linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com,
	aryabinin@virtuozzo.com, gregkh@linuxfoundation.org
Subject: Re: [PATCH] Little memset_explicit optimisation
Date: Mon, 26 Nov 2018 13:32:47 +0200	[thread overview]
Message-ID: <20181126113247.GD10650@smile.fi.intel.com> (raw)
In-Reply-To: <CA+XhMqyP=OZ5=GF1L=1EkNuNWJfk0t=GJWvQd=K46vT-sq9L6A@mail.gmail.com>

On Sat, Nov 24, 2018 at 03:35:05PM +0000, David CARLIER wrote:
> Subject: [PATCH] memzero_explicit, optimisation for size.
> 
> 
> Using the return value of memset for save/load sake.


It's mangled, you, perhaps, need to use

  `git format-patch ...; git send-email ...`

for sake of correctness.

On top of that, same comment as per previous attempt.
Btw, you need to use versioning (hint: `git format-patch -v ` IIRC).

> 
> 
> Signed-off-by: David Carlier <devnexen@gmail.com>
> 
> ---
> 
>  lib/string.c | 2 +-
> 
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/lib/string.c b/lib/string.c
> 
> index 38e4ca08e757..92da04a0213b 100644
> 
> --- a/lib/string.c
> 
> +++ b/lib/string.c
> 
> @@ -720,7 +720,7 @@ EXPORT_SYMBOL(memset);
> 
>   */
> 
>  void memzero_explicit(void *s, size_t count)
> 
>  {
> 
> - memset(s, 0, count);
> 
> + s = memset(s, 0, count);
> 
>   barrier_data(s);
> 
>  }
> 
>  EXPORT_SYMBOL(memzero_explicit);
> 
> -- 
> 
> 2.19.1

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2018-11-26 11:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-24 15:35 David CARLIER
2018-11-26 11:32 ` Andy Shevchenko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-28  6:32 David CARLIER
2018-11-28  7:02 ` Joey Pabalinas
2018-11-24 12:35 David CARLIER
2018-11-26 11:29 ` Andy Shevchenko
2018-11-26 11:37 ` Joey Pabalinas
2018-11-26 19:36   ` David CARLIER

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=20181126113247.GD10650@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=devnexen@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®