From 0779bf2d2ecc4d9b1e9437ae659f50e6776a7666 Mon Sep 17 00:00:00 2001 From: Matt LaPlante Date: Thu, 30 Nov 2006 05:24:39 +0100 Subject: Fix misc .c/.h comment typos Fix various .c/.h typos in comments (no code changes). Signed-off-by: Matt LaPlante Signed-off-by: Adrian Bunk --- drivers/atm/iphase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/atm') diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 9ed1c60048f..bb7ef570514 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c @@ -305,7 +305,7 @@ static void clear_lockup (struct atm_vcc *vcc, IADEV *dev) { ** | R | NZ | 5-bit exponent | 9-bit mantissa | ** +----+----+------------------+-------------------------------+ ** -** R = reserverd (written as 0) +** R = reserved (written as 0) ** NZ = 0 if 0 cells/sec; 1 otherwise ** ** if NZ = 1, rate = 1.mmmmmmmmm x 2^(eeeee) cells/sec -- cgit v1.2.3-70-g09d2 From 5f3f24faf322e54752d1df00cdb768a013de5d1f Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Mon, 13 Nov 2006 16:12:08 -0800 Subject: [ATM] ambassador,firestream: "-1 >>" is implementation defined 6.5.7(5): The result of E1 >> E2 is E1 right-shifted E2 bit positions. ... If E1 has a signed type and a negative value, the resulting value is implementation defined. So, cast -1 to unsigned type to make result well-defined. [ Modified to use ~0U based upon recommendation from Al Viro. -DaveM ] Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller --- drivers/atm/ambassador.c | 2 +- drivers/atm/firestream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/atm') diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 9fffa7af6db..afa7d750a59 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c @@ -972,7 +972,7 @@ static int make_rate (unsigned int rate, rounding r, } case round_up: { // check all bits that we are discarding - if (man & (-1>>9)) { + if (man & (~0U>>9)) { man = (man>>(32-9)) + 1; if (man == (1<<9)) { // no need to check for round up outside of range diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 697ad82f663..9c67df5ccfa 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -512,7 +512,7 @@ static unsigned int make_rate (unsigned int rate, int r, } case ROUND_UP: { /* check all bits that we are discarding */ - if (man & (-1>>9)) { + if (man & (~0U>>9)) { man = (man>>(32-9)) + 1; if (man == (1<<9)) { /* no need to check for round up outside of range */ -- cgit v1.2.3-70-g09d2