lkml.org 
[lkml]   [2000]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] af_rose.c: s/suser/capable/ + micro cleanups
On Thu, Aug 31, 2000 at 12:26:29AM +0200, Rogier Wolff wrote:
> int mr (unsigned int rate, int r)
> {
> int e = 16+9;
> static int round[4]={0, 0, 0xffff, 0x8000};
> if (!rate) return 0;
> for (; rate & 0xfc000000 ;rate >>= 1, e++);
> for (;!(rate & 0xfe000000);rate <<= 1, e--);
> return ((rate & ~0x02000000) | (e << (16+9)) + round[r]) >> 16;
> }
>
> Dense code, right? Floating point in the kernel.... Aaargh.

you've failed Chapter 3 of CodingStyle:

HOWEVER, while mixed-case names are frowned upon, descriptive names for
global variables are a must. To call a global function "foo" is a
shooting offense.

what the hell does a function called `mr' do?

--
Revolutions do not require corporate support.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.149 / U:1.240 seconds]
©2003-2014 Jasper Spaans. Advertise on this site