Re: [CFT] [JANITORIAL] Unbork fs.h

From: J.A. Magallon (jamagallon@able.es)
Date: Thu Jan 03 2002 - 18:25:53 EST


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/



This archive was generated by hypermail 2b29 : Mon Jan 07 2002 - 21:00:23 EST