* [PATCH 0/8] net: fix old-style declarations
@ 2016-06-16 13:50 Arnd Bergmann
2016-06-16 13:52 ` [PATCH 1/8] wireless: airo: rename 'register' variable Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2016-06-16 13:50 UTC (permalink / raw)
To: netdev
Cc: Arnd Bergmann, Armin Schindler, Karsten Keil, Claudiu Manoil,
Thomas Sailer, Stanislav Yakovlev, Steffen Klassert, Herbert Xu,
David S. Miller, Trond Myklebust, Anna Schumaker, J. Bruce Fields,
linux-kernel, linux-hams, linux-wireless, brcm80211-dev-list,
linux-nfs
"make W=1" enables -Wold-style-declaration, which is generally useful
to warn about pre-C89 code in the kernel, but it also warns about
some harmless variations (sometimes many of them from a single
file).
This fixes up the 8 instances I found in the networking code, there
is another series of 12 patches for the rest of the kernel.
Arnd Bergmann (8):
wireless: airo: rename 'register' variable
wireless: brcmsmac: fix old-style declaration
wireless: ipw2200: fix old-style declaration
hamradio: baycom: fix old-style declaration
isdn: eicon: fix old-style declarations
net: gianfar: fix old-style declaration
net: xfrm: fix old-style declaration
sunrpc: fix old-style declaration
drivers/isdn/hardware/eicon/divasmain.c | 12 ++++++------
drivers/isdn/hardware/eicon/platform.h | 6 +++---
drivers/net/ethernet/freescale/gianfar.c | 2 +-
drivers/net/hamradio/baycom_par.c | 6 +++---
drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 4 ++--
drivers/net/wireless/cisco/airo.c | 4 ++--
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +-
net/ipv4/xfrm4_policy.c | 8 ++++----
net/ipv6/xfrm6_policy.c | 4 ++--
net/sunrpc/clnt.c | 2 +-
10 files changed, 25 insertions(+), 25 deletions(-)
--
2.9.0
Cc: Armin Schindler <mac@melware.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: Thomas Sailer <t.sailer@alumni.ethz.ch>
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-hams@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list@broadcom.com
Cc: linux-nfs@vger.kernel.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/8] wireless: airo: rename 'register' variable
2016-06-16 13:50 [PATCH 0/8] net: fix old-style declarations Arnd Bergmann
@ 2016-06-16 13:52 ` Arnd Bergmann
2016-06-16 13:52 ` [PATCH 2/8] wireless: brcmsmac: fix old-style declaration Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-06-16 13:52 UTC (permalink / raw)
To: netdev
Cc: Arnd Bergmann, Kalle Valo, Ondrej Zary, Johannes Berg,
linux-wireless, linux-kernel
'register' is a keyword in C and cannot be used in place of a
variable name, as shown by this -Wextra warning:
drivers/net/wireless/cisco/airo.c:1105:29: error: 'register' is not at beginning of declaration [-Werror=old-style-declaration]
This replaces the 'register' keyword with a 'reg' identifier in
the declaration, which matches the definition and has the intended
meaning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/cisco/airo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
index b6c9d5feef1f..6bdb6f6bdfe8 100644
--- a/drivers/net/wireless/cisco/airo.c
+++ b/drivers/net/wireless/cisco/airo.c
@@ -1102,8 +1102,8 @@ static const char version[] = "airo.c 0.6 (Ben Reed & Javier Achirica)";
struct airo_info;
static int get_dec_u16( char *buffer, int *start, int limit );
-static void OUT4500( struct airo_info *, u16 register, u16 value );
-static unsigned short IN4500( struct airo_info *, u16 register );
+static void OUT4500( struct airo_info *, u16 reg, u16 value );
+static unsigned short IN4500( struct airo_info *, u16 reg );
static u16 setup_card(struct airo_info*, u8 *mac, int lock);
static int enable_MAC(struct airo_info *ai, int lock);
static void disable_MAC(struct airo_info *ai, int lock);
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/8] wireless: brcmsmac: fix old-style declaration
2016-06-16 13:52 ` [PATCH 1/8] wireless: airo: rename 'register' variable Arnd Bergmann
@ 2016-06-16 13:52 ` Arnd Bergmann
2016-06-16 13:52 ` [PATCH 3/8] wireless: ipw2200: " Arnd Bergmann
2016-06-29 15:56 ` [1/8] wireless: airo: rename 'register' variable Kalle Valo
2 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-06-16 13:52 UTC (permalink / raw)
To: netdev
Cc: Arnd Bergmann, Brett Rudley, Arend van Spriel,
Franky (Zhenhui) Lin, Hante Meuleman, Kalle Valo, Johannes Berg,
David S. Miller, linux-wireless, brcm80211-dev-list, linux-kernel
Modern C standards expect the 'static' keyword to come first in a
declaration, and we get a warning for this with "make W=1":
drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:3353:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
index e16ee60639f5..c2a938b59044 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
@@ -3349,8 +3349,8 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc)
dma_rxfill(wlc_hw->di[RX_FIFO]);
}
-void
-static brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec) {
+static void brcms_b_init(struct brcms_hardware *wlc_hw, u16 chanspec)
+{
u32 macintmask;
bool fastclk;
struct brcms_c_info *wlc = wlc_hw->wlc;
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/8] wireless: ipw2200: fix old-style declaration
2016-06-16 13:52 ` [PATCH 1/8] wireless: airo: rename 'register' variable Arnd Bergmann
2016-06-16 13:52 ` [PATCH 2/8] wireless: brcmsmac: fix old-style declaration Arnd Bergmann
@ 2016-06-16 13:52 ` Arnd Bergmann
2016-06-24 17:46 ` Stanislav Yakovlev
2016-06-29 15:56 ` [1/8] wireless: airo: rename 'register' variable Kalle Valo
2 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2016-06-16 13:52 UTC (permalink / raw)
To: netdev
Cc: Arnd Bergmann, Stanislav Yakovlev, Kalle Valo, David S. Miller,
Johannes Berg, linux-wireless, linux-kernel
Modern C standards expect the 'inline' keyword to come before the return
type in a declaration, and we get a warning for this with "make W=1":
drivers/net/wireless/intel/ipw2x00/ipw2200.c:4096:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index 5adb7cefb2fe..bfd68612a535 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -4093,7 +4093,7 @@ static const char *ipw_get_status_code(u16 status)
return "Unknown status value.";
}
-static void inline average_init(struct average *avg)
+static inline void average_init(struct average *avg)
{
memset(avg, 0, sizeof(*avg));
}
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/8] wireless: ipw2200: fix old-style declaration
2016-06-16 13:52 ` [PATCH 3/8] wireless: ipw2200: " Arnd Bergmann
@ 2016-06-24 17:46 ` Stanislav Yakovlev
0 siblings, 0 replies; 6+ messages in thread
From: Stanislav Yakovlev @ 2016-06-24 17:46 UTC (permalink / raw)
To: Arnd Bergmann
Cc: netdev, Kalle Valo, David S. Miller, Johannes Berg, wireless,
linux-kernel
On 16 June 2016 at 17:52, Arnd Bergmann <arnd@arndb.de> wrote:
> Modern C standards expect the 'inline' keyword to come before the return
> type in a declaration, and we get a warning for this with "make W=1":
>
> drivers/net/wireless/intel/ipw2x00/ipw2200.c:4096:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Stanislav.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [1/8] wireless: airo: rename 'register' variable
2016-06-16 13:52 ` [PATCH 1/8] wireless: airo: rename 'register' variable Arnd Bergmann
2016-06-16 13:52 ` [PATCH 2/8] wireless: brcmsmac: fix old-style declaration Arnd Bergmann
2016-06-16 13:52 ` [PATCH 3/8] wireless: ipw2200: " Arnd Bergmann
@ 2016-06-29 15:56 ` Kalle Valo
2 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2016-06-29 15:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: netdev, Arnd Bergmann, Ondrej Zary, Johannes Berg, linux-wireless,
linux-kernel
Arnd Bergmann <arnd@arndb.de> wrote:
> 'register' is a keyword in C and cannot be used in place of a
> variable name, as shown by this -Wextra warning:
>
> drivers/net/wireless/cisco/airo.c:1105:29: error: 'register' is not at beginning of declaration [-Werror=old-style-declaration]
>
> This replaces the 'register' keyword with a 'reg' identifier in
> the declaration, which matches the definition and has the intended
> meaning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, 3 patches applied to wireless-drivers-next.git:
88e97c32068f wireless: airo: rename 'register' variable
2a063835ce7c wireless: brcmsmac: fix old-style declaration
6f07e0f12a57 wireless: ipw2200: fix old-style declaration
--
Sent by pwcli
https://patchwork.kernel.org/patch/9180951/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-29 15:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 13:50 [PATCH 0/8] net: fix old-style declarations Arnd Bergmann
2016-06-16 13:52 ` [PATCH 1/8] wireless: airo: rename 'register' variable Arnd Bergmann
2016-06-16 13:52 ` [PATCH 2/8] wireless: brcmsmac: fix old-style declaration Arnd Bergmann
2016-06-16 13:52 ` [PATCH 3/8] wireless: ipw2200: " Arnd Bergmann
2016-06-24 17:46 ` Stanislav Yakovlev
2016-06-29 15:56 ` [1/8] wireless: airo: rename 'register' variable Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).