* [PATCH] fix weird placement of inline and static keywords in sctp.h
@ 2004-11-23 23:55 Jesper Juhl
2004-11-24 0:02 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2004-11-23 23:55 UTC (permalink / raw)
To: lksctp developers; +Cc: linux-kernel
Here's a patch that moves the keywords inline and static to the
beginning of the declaration for a few functions in sctp.h
This has no impact on functionality and is completely safe, the only
bennefit is less cluttered output from the compiler when building with
gcc -W . This is nice for people like me who build with -W to find
potential troublespots to review (the less warnings to sift through the
better). I can find no argument against fixing this.
This patch elliminates a whole bunch of
include/net/sctp/sctp.h:610: warning: `static' is not at beginning of declaration
include/net/sctp/sctp.h:610: warning: `inline' is not at beginning of declaration
include/net/sctp/sctp.h:617: warning: `static' is not at beginning of declaration
include/net/sctp/sctp.h:617: warning: `inline' is not at beginning of declaration
include/net/sctp/sctp.h:625: warning: `static' is not at beginning of declaration
include/net/sctp/sctp.h:625: warning: `inline' is not at beginning of declaration
when building with -W
Please consider applying.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
diff -up linux-2.6.10-rc2-bk6-orig/include/net/sctp/sctp.h linux-2.6.10-rc2-bk6/include/net/sctp/sctp.h
--- linux-2.6.10-rc2-bk6-orig/include/net/sctp/sctp.h 2004-11-17 01:20:27.000000000 +0100
+++ linux-2.6.10-rc2-bk6/include/net/sctp/sctp.h 2004-11-24 00:33:41.000000000 +0100
@@ -607,14 +607,14 @@ struct sctp6_sock {
/* Is a socket of this style? */
#define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style))
-int static inline __sctp_style(const struct sock *sk, sctp_socket_type_t style)
+static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style)
{
return sctp_sk(sk)->type == style;
}
/* Is the association in this state? */
#define sctp_state(asoc, state) __sctp_state((asoc), (SCTP_STATE_##state))
-int static inline __sctp_state(const struct sctp_association *asoc,
+static inline int __sctp_state(const struct sctp_association *asoc,
sctp_state_t state)
{
return asoc->state == state;
@@ -622,7 +622,7 @@ int static inline __sctp_state(const str
/* Is the socket in this state? */
#define sctp_sstate(sk, state) __sctp_sstate((sk), (SCTP_SS_##state))
-int static inline __sctp_sstate(const struct sock *sk, sctp_sock_state_t state)
+static inline int __sctp_sstate(const struct sock *sk, sctp_sock_state_t state)
{
return sk->sk_state == state;
}
Please CC me on replies from the lksctp developers list.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix weird placement of inline and static keywords in sctp.h
2004-11-23 23:55 [PATCH] fix weird placement of inline and static keywords in sctp.h Jesper Juhl
@ 2004-11-24 0:02 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-11-24 0:02 UTC (permalink / raw)
To: Jesper Juhl; +Cc: lksctp-developers, linux-kernel
Applied, thanks Jesper.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-24 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-23 23:55 [PATCH] fix weird placement of inline and static keywords in sctp.h Jesper Juhl
2004-11-24 0:02 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox