lkml.org 
[lkml]   [2001]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] reformat mtrr.c to conform to CodingStyle
    On Nov 12, 2001  23:25 -0500, Benjamin LaHaise wrote:
    > Please incorporate this patch to make mtrr.c conform to the standards set
    > forth in Documentation/CodingStyle which make it much more appealing to
    > the eyes.
    >
    > /* Put the processor into a state where MTRRs can be safely set */
    > -static void set_mtrr_prepare (struct set_mtrr_context *ctxt)
    > +static void
    > +set_mtrr_prepare(struct set_mtrr_context *ctxt)
    > {

    Is that actually CodingStyle? Don't see it much in the kernel code...
    The much more common (AFAICS) style to split long function definitions is

    static void foo_long_function(struct long_struct name *foo, struct bar *bar,
    int val, long *err)

    The only reason (AFAICS) for putting the return type on a separate line
    is the (ancient) ansi2knr script, which just throws the return types away
    for pre-ANSI compilers. Given that the kernel code doesn't even conform
    to ANSI-C, there is no hope in hell of it compiling with a pre-ANSI compiler.

    Cheers, Andreas
    --
    Andreas Dilger
    http://sourceforge.net/projects/ext2resize/
    http://www-mddsp.enel.ucalgary.ca/People/adilger/

    -
    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 13:13    [W:0.055 / U:0.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site