All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] overflow.h: Rename __ab_c_size() to __calc_size()
@ 2019-04-05  4:57 Borislav Petkov
  2019-04-05  6:26 ` Rasmus Villemoes
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Borislav Petkov @ 2019-04-05  4:57 UTC (permalink / raw)
  To: LKML; +Cc: Kees Cook, Matthew Wilcox

From: Borislav Petkov <bp@suse.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@suse.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: Matthew Wilcox <willy@infradead.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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-04-12 11:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-05  4:57 [PATCH] overflow.h: Rename __ab_c_size() to __calc_size() Borislav Petkov
2019-04-05  6:26 ` Rasmus Villemoes
2019-04-05  7:52   ` Borislav Petkov
2019-04-05  8:09     ` Rasmus Villemoes
2019-04-05  8:24       ` Borislav Petkov
2019-04-05 16:13         ` Kees Cook
2019-04-05 16:25           ` Matthew Wilcox
2019-04-06  9:32             ` Borislav Petkov
2019-04-06 11:32               ` Rasmus Villemoes
2019-04-10 20:40 ` [tip:core/core] overflow.h: Add comment documenting __ab_c_size() tip-bot for Rasmus Villemoes
2019-04-12 11:49 ` tip-bot for Rasmus Villemoes

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.