All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: serial: bfin_sport_uart: fix signedness error
@ 2011-01-17 10:08 ` Vasiliy Kulikov
  0 siblings, 0 replies; 2+ messages in thread
From: Vasiliy Kulikov @ 2011-01-17 10:08 UTC (permalink / raw)
  To: kernel-janitors; +Cc: Greg Kroah-Hartman, linux-kernel

sport->port.irq is unsigned, check for <0 doesn't make sense.
Explicitly cast it to int to check for error.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
 Cannot compile this driver, so it is not tested at all.

 drivers/tty/serial/bfin_sport_uart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/bfin_sport_uart.c b/drivers/tty/serial/bfin_sport_uart.c
index e95c524..c3ec0a6 100644
--- a/drivers/tty/serial/bfin_sport_uart.c
+++ b/drivers/tty/serial/bfin_sport_uart.c
@@ -788,7 +788,7 @@ static int __devinit sport_uart_probe(struct platform_device *pdev)
 		sport->port.mapbase = res->start;
 
 		sport->port.irq = platform_get_irq(pdev, 0);
-		if (sport->port.irq < 0) {
+		if ((int)sport->port.irq < 0) {
 			dev_err(&pdev->dev, "No sport RX/TX IRQ specified\n");
 			ret = -ENOENT;
 			goto out_error_unmap;
-- 
1.7.0.4


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

* [PATCH] tty: serial: bfin_sport_uart: fix signedness error
@ 2011-01-17 10:08 ` Vasiliy Kulikov
  0 siblings, 0 replies; 2+ messages in thread
From: Vasiliy Kulikov @ 2011-01-17 10:08 UTC (permalink / raw)
  To: kernel-janitors; +Cc: Greg Kroah-Hartman, linux-kernel

sport->port.irq is unsigned, check for <0 doesn't make sense.
Explicitly cast it to int to check for error.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
---
 Cannot compile this driver, so it is not tested at all.

 drivers/tty/serial/bfin_sport_uart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/bfin_sport_uart.c b/drivers/tty/serial/bfin_sport_uart.c
index e95c524..c3ec0a6 100644
--- a/drivers/tty/serial/bfin_sport_uart.c
+++ b/drivers/tty/serial/bfin_sport_uart.c
@@ -788,7 +788,7 @@ static int __devinit sport_uart_probe(struct platform_device *pdev)
 		sport->port.mapbase = res->start;
 
 		sport->port.irq = platform_get_irq(pdev, 0);
-		if (sport->port.irq < 0) {
+		if ((int)sport->port.irq < 0) {
 			dev_err(&pdev->dev, "No sport RX/TX IRQ specified\n");
 			ret = -ENOENT;
 			goto out_error_unmap;
-- 
1.7.0.4


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

end of thread, other threads:[~2011-01-17 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-17 10:08 [PATCH] tty: serial: bfin_sport_uart: fix signedness error Vasiliy Kulikov
2011-01-17 10:08 ` Vasiliy Kulikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.