lkml.org 
[lkml]   [2002]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [CFT] [JANITORIAL] Unbork fs.h

    On 20020103 Daniel Phillips wrote:
    >>
    >> Maybe CodingStyle should have an entry for this, I'd vote for this style:
    >>
    >> static inline struct inode *new_inode(struct super_block *sb)
    >
    >OK, I'll revise it to that style. Shall we start an official janitor's style
    >guide? ;-)
    >

    Perhaps it is a silly question for kernel hackers, but I found it useful
    for making code more readable...
    Why dont you use things like:

    typedef struct inode inode;
    typedef struct super_block super_block;

    so you can write things like

    static inline inode* new_inode(super_block* cb)
    {
    inode* ni;
    ni = (inode*)malloc(sizeof(inode));
    ...
    }

    (ie, kill 'struct' visual pollution...)

    ??

    Isn't it more readable ?

    Just curious...

    --
    J.A. Magallon # Let the source be with you...
    mailto:jamagallon@able.es
    Mandrake Linux release 8.2 (Cooker) for i586
    Linux werewolf 2.4.18-pre1-beo #3 SMP Thu Dec 27 10:15:27 CET 2001 i686
    -
    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:15    [W:2.436 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site