Re: [PATCH 05/37] dvb: add alternate stv0297-driver

Andrew Morton
2005-11-03T03:40:58Z

Michael Krufky <mkrufky@m1k.net> wrote:
>
> +#define abs64(x) (x) < 0 ? -(x) : (x);

Needs parentheses around the whole thing.

This should go into include/linus/kernel.h, after labs(), methinks.

> +static s64 div64(s64 dividend,s64 divisor)

hm. If we really need a 64-by-64 divide then it shouldn't be hidden in a dvb
driver, please. I bet we have a few in the tree already, actually.

So it'd be appreciated if someone could take a shot at generating a generic
version of this. It'll need to be inlined for 64-bit arches, out-of-line
for 32-bit.

It'll also need to be permanently wired into the kernel, alas. We cannot
tell at compile time whether it'll be needed :( EXPORT_SYMBOL() it.