linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] pch_uart: change type to u8
@ 2011-11-17  5:57 Tomoya MORINAGA
  2011-11-17  5:57 ` [PATCH 2/6] pch_uart: change type to %d to %02x Tomoya MORINAGA
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Tomoya MORINAGA @ 2011-11-17  5:57 UTC (permalink / raw)
  To: Alan Cox
  Cc: linux-kernel, qi.wang, yong.y.wang, joel.clark, kok.howg.ewe,
	Tomoya MORINAGA

Target uart register access size is 8bit.
However, 32bit is used at 2 points.

This patch modifies type "unsigned int" to "unsigned char".

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
---
 drivers/tty/serial/pch_uart.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 284fa48..797fad2 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -460,14 +460,10 @@ static int pch_uart_hal_read(struct eg20t_port *priv, unsigned char *buf,
 	return i;
 }
 
-static unsigned int pch_uart_hal_get_iid(struct eg20t_port *priv)
+static unsigned char pch_uart_hal_get_iid(struct eg20t_port *priv)
 {
-	unsigned int iir;
-	int ret;
-
-	iir = ioread8(priv->membase + UART_IIR);
-	ret = (iir & (PCH_UART_IIR_IID | PCH_UART_IIR_TOI | PCH_UART_IIR_IP));
-	return ret;
+	return ioread8(priv->membase + UART_IIR) &\
+		      (PCH_UART_IIR_IID | PCH_UART_IIR_TOI | PCH_UART_IIR_IP);
 }
 
 static u8 pch_uart_hal_get_line_status(struct eg20t_port *priv)
@@ -955,7 +951,7 @@ static irqreturn_t pch_uart_interrupt(int irq, void *dev_id)
 	unsigned int handled;
 	u8 lsr;
 	int ret = 0;
-	unsigned int iid;
+	unsigned char iid;
 	unsigned long flags;
 
 	spin_lock_irqsave(&priv->port.lock, flags);
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-17  5:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17  5:57 [PATCH 1/6] pch_uart: change type to u8 Tomoya MORINAGA
2011-11-17  5:57 ` [PATCH 2/6] pch_uart: change type to %d to %02x Tomoya MORINAGA
2011-11-17  5:57 ` [PATCH 3/6] pch_uart: Support modem status interrupt Tomoya MORINAGA
2011-11-17  5:57 ` [PATCH 4/6] pch_uart: delete unused data structure Tomoya MORINAGA
2011-11-17  5:57 ` [PATCH 5/6] pch_uart: Fix return value issue Tomoya MORINAGA
2011-11-17  5:57 ` [PATCH 6/6] pch_uart: Add initialize processing Tomoya MORINAGA

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).