Skip to content

Commit

Permalink
[PATCH] fix ia64 compile failure with gcc4.1
Browse files Browse the repository at this point in the history
__get_unaligned creates a typeof the var its passed, and writes to it,
which on gcc4.1, spits out the following error:

drivers/char/vc_screen.c: In function 'vcs_write':
drivers/char/vc_screen.c:422: error: assignment of read-only variable 'val'

Signed-off-by: Dave Jones <davej@redhat.com>
[ The "right" fix would be to try to fix <asm-generic/unaligned.h>
  but that's hard to do with the tools gcc gives us. So this
  simpler patch is preferable -- Linus ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Dave Jones authored and Linus Torvalds committed Dec 29, 2005
1 parent 63b4444 commit ee02594
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/vc_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
while (this_round > 1) {
unsigned short w;

w = get_unaligned(((const unsigned short *)con_buf0));
w = get_unaligned(((unsigned short *)con_buf0));
vcs_scr_writew(vc, w, org++);
con_buf0 += 2;
this_round -= 2;
Expand Down

0 comments on commit ee02594

Please sign in to comment.