> Dick,
>
> --snip/snip
>
>
> > > btw, is err should (according to alans explaination be):
> > >
> > > return (unsigned long)ptr > (unsigned long)-1024UL;
> > >
> > > tm
> > >
> >
> > At the user-mode API, we get to (void *) -1, defined in sys/mman.h
> > (actually (__ptr_t) -1); so whatever you do, the 'C' runtime library
> > has to 'know' about your return values if this propagates to
> > sys-calls.
>
> the code right now, will pass all the errors through to the user
> space in any case (beside a handful internal kernel-functions).
>
> by changing unsigned long to void * everything should stay the same
> (at least for todays architectures) - well if i'm wrong, please
> enlighten me :)
>
> also using IS_ERR is essentially the same as the other approaches
> to check for errors (beside the check for == 0).
>
> this means by "cleaning up" the internal functions, _nothing_ should
> me impacted, even if the changes are step by step, function by function,
> beside some gcc warnings (the well known: "assignment makes pointer from
> integer without a cast").
>
> cheers,
>
> tm
>
Good. It was just a 'sanity-check' as these things caught my
eye. Because I have to fix a lot of junk code that others have
written (here at work), as they become Peter-principled to
higher-level positions, I get sensitized to these things.
No complaint -- I like fixing junk code!
The previously line was written for Network Security Administrators
(Hello Thor).
Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Windows-2000/Professional isn't.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/