projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04badfd
)
powerpc: Unsigned speed cannot be negative in udbg_16559.c
author
roel kluin
<roel.kluin@gmail.com>
Tue, 14 Oct 2008 14:36:31 +0000
(14:36 +0000)
committer
Benjamin Herrenschmidt
<benh@kernel.crashing.org>
Tue, 21 Oct 2008 04:17:47 +0000
(15:17 +1100)
"unsigned int" speed cannot be negative, it's thus pointless
to test if it is.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/udbg_16550.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/udbg_16550.c
b/arch/powerpc/kernel/udbg_16550.c
index cb01ebc593876b5736cc96640904a8117a5da3c6..7b7da8cfd5e862364feb391e4a3cc68447cfdec2 100644
(file)
--- a/
arch/powerpc/kernel/udbg_16550.c
+++ b/
arch/powerpc/kernel/udbg_16550.c
@@
-142,7
+142,7
@@
unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
speed = (clock / prescaler) / (divisor * 16);
/* sanity check */
- if (speed
< 0 || speed
> (clock / 16))
+ if (speed > (clock / 16))
speed = 9600;
return speed;