Re: [patch] bkl2mtd: cleanup

From: Ingo Molnar
Date: Wed Mar 26 2008 - 07:01:22 EST



* Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> On Wed, Mar 26, 2008 at 11:14:52AM +0100, Ingo Molnar wrote:
> > /* Info for the block device */
> > struct block2mtd_dev {
> > - struct list_head list;
> > - struct block_device *blkdev;
> > - struct mtd_info mtd;
> > - struct mutex write_mutex;
> > + struct list_head list;
> > + struct block_device *blkdev;
> > + struct mtd_info mtd;
> > + /* serializes writes with each other and also with erase: */
> > + struct mutex write_mutex;
> > };
>
> Why the hell?

the vertical alignment? For the same reason some of the key VFS data
structures in include/linux/fs.h are aligned vertically:

struct inode
struct file
struct super_block
struct address_space
struct block_device

there are several advantages of aligning structure fields vertically
(and the same applies to bulk initializers of structures), should i list
them?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/