mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joey Pabalinas <joeypabalinas@gmail.com>
To: David CARLIER <devnexen@gmail.com>
Cc: linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com,
	gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
	aryabinin@virtuozzo.com, Joey Pabalinas <joeypabalinas@gmail.com>
Subject: Re: [PATCH] Little memset_explicit optimisation
Date: Mon, 26 Nov 2018 01:37:24 -1000	[thread overview]
Message-ID: <20181126113724.svbv6np25fzxkhrm@gmail.com> (raw)
In-Reply-To: <CA+XhMqyR1wMEnEE2cCnoGj2RatxTbFuNH2jOj1-50iYso67rAw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

On Sat, Nov 24, 2018 at 12:35:43PM +0000, David CARLIER wrote:
> Using the return value of memset for save/load sake.
> 
> 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);

Could you elaborate on the optimization that this patch performs?

-- 
Cheers,
Joey Pabalinas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-24 12:35 David CARLIER
2018-11-26 11:29 ` Andy Shevchenko
2018-11-26 11:37 ` Joey Pabalinas [this message]
2018-11-26 19:36   ` David CARLIER
2018-11-26 21:18     ` Joey Pabalinas
2018-11-24 15:35 David CARLIER
2018-11-26 11:32 ` Andy Shevchenko
2018-11-28  6:32 David CARLIER
2018-11-28  7:02 ` Joey Pabalinas

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=20181126113724.svbv6np25fzxkhrm@gmail.com \
    --to=joeypabalinas@gmail.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andriy.shevchenko@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®