* Compiler error in drivers/video/cirrusfb.c: syntax error before ‘volatile’
@ 2006-01-24 2:51 Martin Michlmayr
2006-01-24 13:58 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Martin Michlmayr @ 2006-01-24 2:51 UTC (permalink / raw)
To: linux-fbdev-devel, jgarzik; +Cc: linux-mips
I get the following compiler error for drivers/video/cirrusfb.c on
mips:
CC drivers/video/cirrusfb.o
In file included from include/video/vga.h:25,
from drivers/video/cirrusfb.c:70:
include/asm/vga.h:29: error: syntax error before ‘volatile’
include/asm/vga.h:34: error: syntax error before ‘volatile’
make[2]: *** [drivers/video/cirrusfb.o] Error 1
These lines define scr_writew() and scr_readw():
29:static inline void scr_writew(u16 val, volatile u16 *addr)
34:static inline u16 scr_readw(volatile const u16 *addr)
Note that some other arches (powerpc, alpha) have the same
definitions in vga.h.
This is with 2.6.15.
--
Martin Michlmayr
http://www.cyrius.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Compiler error in drivers/video/cirrusfb.c: syntax error before ‘volatile’
2006-01-24 2:51 Compiler error in drivers/video/cirrusfb.c: syntax error before ‘volatile’ Martin Michlmayr
@ 2006-01-24 13:58 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2006-01-24 13:58 UTC (permalink / raw)
To: Martin Michlmayr; +Cc: linux-fbdev-devel, jgarzik, linux-mips
On Tue, Jan 24, 2006 at 02:51:30AM +0000, Martin Michlmayr wrote:
> I get the following compiler error for drivers/video/cirrusfb.c on
> mips:
>
> CC drivers/video/cirrusfb.o
> In file included from include/video/vga.h:25,
> from drivers/video/cirrusfb.c:70:
> include/asm/vga.h:29: error: syntax error before ‘volatile’
> include/asm/vga.h:34: error: syntax error before ‘volatile’
> make[2]: *** [drivers/video/cirrusfb.o] Error 1
>
> These lines define scr_writew() and scr_readw():
>
> 29:static inline void scr_writew(u16 val, volatile u16 *addr)
> 34:static inline u16 scr_readw(volatile const u16 *addr)
>
> Note that some other arches (powerpc, alpha) have the same
> definitions in vga.h.
>
> This is with 2.6.15.
Interesting catch. The reason is this code in <linux/vt_buffer.h>:
[...]
#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE)
#include <asm/vga.h>
#endif
#ifndef VT_BUF_HAVE_RW
#define scr_writew(val, addr) (*(addr) = (val))
#define scr_readw(addr) (*(addr))
#define scr_memcpyw(d, s, c) memcpy(d, s, c)
[...]
But VT_BUF_HAVE_RW is defined in <asm/vga.h>, so if neither
CONFIG_VGA_CONSOLE nor CONFIG_MDA_CONSOLE is defined compilation will
blow up when <asm/vga.h> is being imported later.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-24 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-24 2:51 Compiler error in drivers/video/cirrusfb.c: syntax error before ‘volatile’ Martin Michlmayr
2006-01-24 13:58 ` Ralf Baechle
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).