[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190405045711.30339-1-bp@alien8.de>
Date: Fri, 5 Apr 2019 06:57:11 +0200
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Kees Cook <keescook@...omium.org>,
Matthew Wilcox <willy@...radead.org>
Subject: [PATCH] overflow.h: Rename __ab_c_size() to __calc_size()
From: Borislav Petkov <bp@...e.de>
... to make its name readable to humans so that it can denote what that
helper does.
No functional changes.
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Kees Cook <keescook@...omium.org>
Cc: Matthew Wilcox <willy@...radead.org>
---
include/linux/overflow.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/overflow.h b/include/linux/overflow.h
index 40b48e2133cb..a9cb77d54df0 100644
--- a/include/linux/overflow.h
+++ b/include/linux/overflow.h
@@ -278,7 +278,7 @@ static inline __must_check size_t array3_size(size_t a, size_t b, size_t c)
return bytes;
}
-static inline __must_check size_t __ab_c_size(size_t n, size_t size, size_t c)
+static inline __must_check size_t __calc_size(size_t n, size_t size, size_t c)
{
size_t bytes;
@@ -302,7 +302,7 @@ static inline __must_check size_t __ab_c_size(size_t n, size_t size, size_t c)
* Return: number of bytes needed or SIZE_MAX on overflow.
*/
#define struct_size(p, member, n) \
- __ab_c_size(n, \
+ __calc_size(n, \
sizeof(*(p)->member) + __must_be_array((p)->member),\
sizeof(*(p)))
--
2.21.0
Powered by blists - more mailing lists