From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/4] init: mark initcalls const
Date: Tue, 16 Jul 2024 13:57:08 +0200 [thread overview]
Message-ID: <20240716115711.1956907-1-a.fatoum@pengutronix.de> (raw)
The initcalls shouldn't be modified at runtime and they are part of the
BAREBOX_RO_SECTION, so mark them const accordingly.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/init.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/init.h b/include/init.h
index 33a76974f23d..7061f911a888 100644
--- a/include/init.h
+++ b/include/init.h
@@ -36,10 +36,10 @@ typedef void (*exitcall_t)(void);
#ifndef __ASSEMBLY__
#define __define_initcall(fn,id) \
- static initcall_t __initcall_##fn##id __ll_elem(.initcall.##id) = fn
+ static const initcall_t __initcall_##fn##id __ll_elem(.initcall.##id) = fn
#define __define_exitcall(fn,id) \
- static exitcall_t __exitcall_##fn##id __ll_elem(.exitcall.##id) = fn
+ static const exitcall_t __exitcall_##fn##id __ll_elem(.exitcall.##id) = fn
/*
--
2.39.2
next reply other threads:[~2024-07-16 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 11:57 Ahmad Fatoum [this message]
2024-07-16 11:57 ` [PATCH 2/4] base: use initcalls instead of linker lists to register classes Ahmad Fatoum
2024-07-16 11:57 ` [PATCH 3/4] watchdog: remove needless error checking for device parameter Ahmad Fatoum
2024-07-16 11:57 ` [PATCH 4/4] watchdog: factor out device registration into common class code Ahmad Fatoum
2024-07-19 6:26 ` [PATCH 1/4] init: mark initcalls const Sascha Hauer
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=20240716115711.1956907-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.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