linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Kees Cook <keescook@chromium.org>, Matthew Wilcox <willy@infradead.org>
Subject: [PATCH] overflow.h: Rename __ab_c_size() to __calc_size()
Date: Fri,  5 Apr 2019 06:57:11 +0200	[thread overview]
Message-ID: <20190405045711.30339-1-bp@alien8.de> (raw)

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


             reply	other threads:[~2019-04-05  4:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  4:57 Borislav Petkov [this message]
2019-04-05  6:26 ` [PATCH] overflow.h: Rename __ab_c_size() to __calc_size() 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

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=20190405045711.30339-1-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).