From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 2/2] kallsyms: change overflow variable to bool type
Date: Sat, 7 Sep 2024 17:53:23 +0900 [thread overview]
Message-ID: <20240907085328.1374086-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20240907085328.1374086-1-masahiroy@kernel.org>
Change the 'overflow' variable to bool. Also, remove unnecessary
parentheses.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/kallsyms.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index f6bb7fb2536b..03852da3d249 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -455,17 +455,17 @@ static void write_src(void)
*/
long long offset;
- int overflow;
+ bool overflow;
if (!absolute_percpu) {
offset = table[i]->addr - relative_base;
- overflow = (offset < 0 || offset > UINT_MAX);
+ overflow = offset < 0 || offset > UINT_MAX;
} else if (symbol_absolute(table[i])) {
offset = table[i]->addr;
- overflow = (offset < 0 || offset > INT_MAX);
+ overflow = offset < 0 || offset > INT_MAX;
} else {
offset = relative_base - table[i]->addr - 1;
- overflow = (offset < INT_MIN || offset >= 0);
+ overflow = offset < INT_MIN || offset >= 0;
}
if (overflow) {
fprintf(stderr, "kallsyms failure: "
--
2.43.0
prev parent reply other threads:[~2024-09-07 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 8:53 [PATCH 1/2] kallsyms: squash output_address() Masahiro Yamada
2024-09-07 8:53 ` Masahiro Yamada [this message]
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=20240907085328.1374086-2-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.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®