Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424096
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/8] isdn: eicon: fix old-style declarations |
| Date | 2016-06-16 16:00 +0200 |
| Message-ID | <rKFZV-Cr-67@gated-at.bofh.it> (permalink) |
| References | <rKFQd-za-9@gated-at.bofh.it> <rKFZU-Cr-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Modern C standards expect the '__inline__' keyword to come before the return
type in a declaration, and we get many warnings for this with "make W=1"
because the eicon driver has this in a header file:
eicon/divasmain.c:448:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
eicon/divasmain.c:453:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
eicon/divasmain.c:458:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
eicon/divasmain.c:463:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
eicon/divasmain.c:468:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
eicon/divasmain.c:473:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
eicon/platform.h:274:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
eicon/platform.h:280:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
A similar warning gets printed for the diva_os_register_io_port()
declaration, because 'register' is interpreted as a keyword instead
of a variable name:
In file included from eicon/diva_didd.c:21:0:
eicon/platform.h:206:1: error: 'register' is not at beginning of declaration [-Werror=old-style-declaration]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/isdn/hardware/eicon/divasmain.c | 12 ++++++------
drivers/isdn/hardware/eicon/platform.h | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index a2e0ed6c9a4d..32f34511c416 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -445,32 +445,32 @@ void divasa_unmap_pci_bar(void __iomem *bar)
/*********************************************************
** I/O port access
*********************************************************/
-byte __inline__ inpp(void __iomem *addr)
+inline byte inpp(void __iomem *addr)
{
return (inb((unsigned long) addr));
}
-word __inline__ inppw(void __iomem *addr)
+inline word inppw(void __iomem *addr)
{
return (inw((unsigned long) addr));
}
-void __inline__ inppw_buffer(void __iomem *addr, void *P, int length)
+inline void inppw_buffer(void __iomem *addr, void *P, int length)
{
insw((unsigned long) addr, (word *) P, length >> 1);
}
-void __inline__ outppw_buffer(void __iomem *addr, void *P, int length)
+inline void outppw_buffer(void __iomem *addr, void *P, int length)
{
outsw((unsigned long) addr, (word *) P, length >> 1);
}
-void __inline__ outppw(void __iomem *addr, word w)
+inline void outppw(void __iomem *addr, word w)
{
outw(w, (unsigned long) addr);
}
-void __inline__ outpp(void __iomem *addr, word p)
+inline void outpp(void __iomem *addr, word p)
{
outb(p, (unsigned long) addr);
}
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index b2edb7590dda..62e2073c3690 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -203,7 +203,7 @@ void PCIread(byte bus, byte func, int offset, void *data, int length, void *pci_
/*
** I/O Port utilities
*/
-int diva_os_register_io_port(void *adapter, int register, unsigned long port,
+int diva_os_register_io_port(void *adapter, int reg, unsigned long port,
unsigned long length, const char *name, int id);
/*
** I/O port access abstraction
@@ -271,13 +271,13 @@ void diva_os_get_time(dword *sec, dword *usec);
** atomic operation, fake because we use threads
*/
typedef int diva_os_atomic_t;
-static diva_os_atomic_t __inline__
+static inline diva_os_atomic_t
diva_os_atomic_increment(diva_os_atomic_t *pv)
{
*pv += 1;
return (*pv);
}
-static diva_os_atomic_t __inline__
+static inline diva_os_atomic_t
diva_os_atomic_decrement(diva_os_atomic_t *pv)
{
*pv -= 1;
--
2.9.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] net: fix old-style declarations Arnd Bergmann <arnd@arndb.de> - 2016-06-16 15:50 +0200
[PATCH 7/8] net: xfrm: fix old-style declaration Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
Re: [PATCH 7/8] net: xfrm: fix old-style declaration David Miller <davem@davemloft.net> - 2016-06-17 07:10 +0200
[PATCH 3/8] wireless: ipw2200: fix old-style declaration Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
[PATCH 1/8] wireless: airo: rename 'register' variable Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
[PATCH 4/8] hamradio: baycom: fix old-style declaration Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
Re: [PATCH 4/8] hamradio: baycom: fix old-style declaration David Miller <davem@davemloft.net> - 2016-06-17 07:10 +0200
[PATCH 6/8] net: gianfar: fix old-style declaration Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
Re: [PATCH 6/8] net: gianfar: fix old-style declaration Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-06-16 20:10 +0200
Re: [PATCH 6/8] net: gianfar: fix old-style declaration Joe Perches <joe@perches.com> - 2016-06-16 20:20 +0200
Re: [PATCH 6/8] net: gianfar: fix old-style declaration David Miller <davem@davemloft.net> - 2016-06-17 07:10 +0200
[PATCH 2/8] wireless: brcmsmac: fix old-style declaration Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
[PATCH 5/8] isdn: eicon: fix old-style declarations Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
Re: [PATCH 5/8] isdn: eicon: fix old-style declarations David Miller <davem@davemloft.net> - 2016-06-17 07:10 +0200
[PATCH 8/8] sunrpc: fix old-style declaration Arnd Bergmann <arnd@arndb.de> - 2016-06-16 16:00 +0200
csiph-web