Skip to contentSkip to conversation

SAMSUNG: serial: remove compiler warnings

U-Boot Minkyu Kang 2 participants 2 messages Jul 6, 2010 – Jul 9, 2010

lore
Share & tools
lore
#0 lore raw

remove below warnings
serial_s5p.c: In function 'serial_getc_dev':
serial_s5p.c:136: warning: dereferencing type-punned pointer will break strict-aliasing rules serial_s5p.c: In function 'serial_putc_dev':
serial_s5p.c:152: warning: dereferencing type-punned pointer will break strict-aliasing rules

---
 drivers/serial/serial_s5p.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/serial_s5p.c +2 -2
index 9747db3..e0d4e80 100644
@@ -133,7 +133,7 @@ int serial_getc_dev(const int dev_index)
 			return 0;
 	}
 
-	return (int)(readl(&uart->urxh) & 0xff);
+	return (int)(readb(&uart->urxh) & 0xff);
 }
 
 /*
@@ -149,7 +149,7 @@ void serial_putc_dev(const char c, const int dev_index)
 			return;
 	}
 
-	writel(c, &uart->utxh);
+	writeb(c, &uart->utxh);
 
 	/* If \n, also do \r */
 	if (c == '\n')
Signature · 1 line
1.6.3.3
#1 lore raw
Quoted 6 lines · Minkyu Kang

remove below warnings
serial_s5p.c: In function 'serial_getc_dev':
serial_s5p.c:136: warning: dereferencing type-punned pointer will break strict-aliasing rules serial_s5p.c: In function 'serial_putc_dev':
serial_s5p.c:152: warning: dereferencing type-punned pointer will break strict-aliasing rules

Quoted 6 lines

---
?drivers/serial/serial_s5p.c | ? ?4 ++--
?1 files changed, 2 insertions(+), 2 deletions(-)

applied to u-boot-samsung

Signature · 2 lines
from. prom.
www.promsoft.net