[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+XhMqyP=OZ5=GF1L=1EkNuNWJfk0t=GJWvQd=K46vT-sq9L6A@mail.gmail.com>
Date: Sat, 24 Nov 2018 15:35:05 +0000
From: David CARLIER <devnexen@...il.com>
To: linux-kernel@...r.kernel.org, alexander.shishkin@...ux.intel.com,
aryabinin@...tuozzo.com, gregkh@...uxfoundation.org,
andriy.shevchenko@...ux.intel.com
Subject: [PATCH] Little memset_explicit optimisation
Subject: [PATCH] memzero_explicit, optimisation for size.
Using the return value of memset for save/load sake.
Signed-off-by: David Carlier <devnexen@...il.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
Powered by blists - more mailing lists