mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] u64_stats_sync.h: move "inline" before the return type
@ 2010-10-29 15:08 Max Kellermann
  2010-10-29 17:59 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: Max Kellermann @ 2010-10-29 15:08 UTC (permalink / raw)
  To: linux-kernel

With the option -Wextra, gcc emits warnings like this one:

 include/linux/u64_stats_sync.h:70: warning: 'inline' is not at beginning of declaration

While this is legal according to the C standard, it would be more
readable to have all modifiers before the return type.
---
 include/linux/u64_stats_sync.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/u64_stats_sync.h b/include/linux/u64_stats_sync.h
index fa261a0..8da8c4e 100644
--- a/include/linux/u64_stats_sync.h
+++ b/include/linux/u64_stats_sync.h
@@ -67,21 +67,21 @@ struct u64_stats_sync {
 #endif
 };
 
-static void inline u64_stats_update_begin(struct u64_stats_sync *syncp)
+static inline void u64_stats_update_begin(struct u64_stats_sync *syncp)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
 	write_seqcount_begin(&syncp->seq);
 #endif
 }
 
-static void inline u64_stats_update_end(struct u64_stats_sync *syncp)
+static inline void u64_stats_update_end(struct u64_stats_sync *syncp)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
 	write_seqcount_end(&syncp->seq);
 #endif
 }
 
-static unsigned int inline u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
+static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
 	return read_seqcount_begin(&syncp->seq);
@@ -93,7 +93,7 @@ static unsigned int inline u64_stats_fetch_begin(const struct u64_stats_sync *sy
 #endif
 }
 
-static bool inline u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
+static inline bool u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
 					 unsigned int start)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
@@ -112,7 +112,7 @@ static bool inline u64_stats_fetch_retry(const struct u64_stats_sync *syncp,
  * - UP 32bit must disable BH.
  * - 64bit have no problem atomically reading u64 values, irq safe.
  */
-static unsigned int inline u64_stats_fetch_begin_bh(const struct u64_stats_sync *syncp)
+static inline unsigned int u64_stats_fetch_begin_bh(const struct u64_stats_sync *syncp)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)
 	return read_seqcount_begin(&syncp->seq);
@@ -124,7 +124,7 @@ static unsigned int inline u64_stats_fetch_begin_bh(const struct u64_stats_sync
 #endif
 }
 
-static bool inline u64_stats_fetch_retry_bh(const struct u64_stats_sync *syncp,
+static inline bool u64_stats_fetch_retry_bh(const struct u64_stats_sync *syncp,
 					 unsigned int start)
 {
 #if BITS_PER_LONG==32 && defined(CONFIG_SMP)


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

* Re: [PATCH] u64_stats_sync.h: move "inline" before the return type
  2010-10-29 15:08 [PATCH] u64_stats_sync.h: move "inline" before the return type Max Kellermann
@ 2010-10-29 17:59 ` Eric Dumazet
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2010-10-29 17:59 UTC (permalink / raw)
  To: Max Kellermann; +Cc: linux-kernel

Le vendredi 29 octobre 2010 à 17:08 +0200, Max Kellermann a écrit :
> With the option -Wextra, gcc emits warnings like this one:
> 
>  include/linux/u64_stats_sync.h:70: warning: 'inline' is not at beginning of declaration
> 
> While this is legal according to the C standard, it would be more
> readable to have all modifiers before the return type.
> ---

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>




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

end of thread, other threads:[~2010-10-29 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-29 15:08 [PATCH] u64_stats_sync.h: move "inline" before the return type Max Kellermann
2010-10-29 17:59 ` Eric Dumazet

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®