* [PATCH v1 1/1] list: Remove redundant 'extern' for function prototypes
@ 2025-05-02 12:17 Andy Shevchenko
2025-05-04 2:35 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2025-05-02 12:17 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel; +Cc: Andrew Morton
The 'extern' keyword is redundant for function prototypes.
list.h never used them and new code in general is better
without them.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/list.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/list.h b/include/linux/list.h
index 29a375889fb8..e7e28afd28f8 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -50,9 +50,9 @@ static inline void INIT_LIST_HEAD(struct list_head *list)
* Performs the full set of list corruption checks before __list_add().
* On list corruption reports a warning, and returns false.
*/
-extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
- struct list_head *prev,
- struct list_head *next);
+bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
+ struct list_head *prev,
+ struct list_head *next);
/*
* Performs list corruption checks before __list_add(). Returns false if a
@@ -93,7 +93,7 @@ static __always_inline bool __list_add_valid(struct list_head *new,
* Performs the full set of list corruption checks before __list_del_entry().
* On list corruption reports a warning, and returns false.
*/
-extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
+bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
/*
* Performs list corruption checks before __list_del_entry(). Returns false if a
--
2.47.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] list: Remove redundant 'extern' for function prototypes
2025-05-02 12:17 [PATCH v1 1/1] list: Remove redundant 'extern' for function prototypes Andy Shevchenko
@ 2025-05-04 2:35 ` Andrew Morton
2025-05-05 6:55 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2025-05-04 2:35 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-kernel
On Fri, 2 May 2025 15:17:42 +0300 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> The 'extern' keyword is redundant for function prototypes.
> list.h never used them and new code in general is better
> without them.
>
> ...
>
>
> -extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
> +bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
>
I'll apply this because you continue to do significant work on list.h
but I don't want to spend the next 5 years buried in little "remove
externs" patches!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] list: Remove redundant 'extern' for function prototypes
2025-05-04 2:35 ` Andrew Morton
@ 2025-05-05 6:55 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2025-05-05 6:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: Andy Shevchenko, linux-kernel
Sat, May 03, 2025 at 07:35:42PM -0700, Andrew Morton kirjoitti:
> On Fri, 2 May 2025 15:17:42 +0300 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> > The 'extern' keyword is redundant for function prototypes.
> > list.h never used them and new code in general is better
> > without them.
...
> > -extern bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
> > +bool __list_valid_slowpath __list_del_entry_valid_or_report(struct list_head *entry);
>
> I'll apply this because you continue to do significant work on list.h
> but I don't want to spend the next 5 years buried in little "remove
> externs" patches!
Thank you!
FWIW, I made this change because (as stated in the commit message) list.h from
the beginning hasn't used that keyword and a relatively new change brought
this. It's not a part of any huge churn, and just a standalone ad-hoc change.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-05 6:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-02 12:17 [PATCH v1 1/1] list: Remove redundant 'extern' for function prototypes Andy Shevchenko
2025-05-04 2:35 ` Andrew Morton
2025-05-05 6:55 ` Andy Shevchenko
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®