lkml.org 
[lkml]   [2000]   [Aug]   [29]   [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
    Em Tue, Aug 29, 2000 at 10:31:22PM +0100, Philipp Rumpf escreveu:
    > On Sun, Aug 27, 2000 at 10:28:14PM +0200, Kenneth Johansson wrote:
    > > Arnaldo Carvalho de Melo wrote:
    > >
    > > > #include <linux/config.h>
    > > > @@ -510,10 +511,7 @@
    > > > if (put_user(len, optlen))
    > > > return -EFAULT;
    > > >
    > > > - if (copy_to_user(optval, &val, len))
    > > > - return -EFAULT;
    > > > -
    > > > - return 0;
    > > > + return copy_to_user(optval, &val, len) ? -EFAULT : 0;
    > > > }
    > >
    > > What is this are you trying to compress the source code ?
    > > I like the old way better. I think it is faster to read and understand.
    >
    > Same here. Linus, I didn't actually interpret your mail on the subject as
    > proposing changes like the one above. Care to enlighten this a bit ?

    I understood it as: don't use copy.*user_ret, use it as:

    return copy_to_user(...) ? -EFAULT : 0;

    which doesn't mean that we should send patches _just_ to make it use ?:, but in
    the process of doing other needed cleanups (s/suser/capable/, checking put_user
    return, getting rid of check_region to avoid races, and other things that I've
    posted as being my current TODO list) we could do this as well to make the
    source code smaller and more easier to read (yes, this is debatable, I think it
    becomes more clean, other think otherwise, I'm just following what Linus said
    he prefer).

    Again, I apreciate a lot receiving feedbacks like this, it helps me in deciding
    what to do next to help clean and fix parts of the kernel that I can with the
    knowledge I have, which will be enhanced (I'm learning a lot doing these
    things, thank you for allowing me to do this) when I receive feedback 8)

    - Arnaldo
    -
    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.031 / U:1.784 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site