lkml.org 
[lkml]   [2004]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: seperator error in __mask_snprintf_len
Paul Jackson <pj@sgi.com> wrote:
>
> Andrew wrote:
> > Gad.
>
> Could you elaborate a bit on this critique, Andrew?

The code seems very complex for such a conceptually simple problem.

And doubts remain whether it is correct on particular wordsize/endianness
machines.

It seems that there is a layering violation in which this code is poking
around inside representations which should known only to the particular
architecture. Hence, if we can find a way to provide this function using
existing architecture API's (test_bit) then everything is solved.

If this code needs some arch-provided support function then so be it.
That's better than adding a tangle of ifdefs in generic code.

> Did I provide too many comments?

You can never provide too many comments!

Anyway, please wake me up again when you and Joe have finished. (I agree
that making that function take a number of bits is better than taking a
number of bytes btw).

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.090 / U:1.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site