lkml.org 
[lkml]   [2008]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 26 Mar 2008 12:00:51 +0100
FromIngo Molnar <>
SubjectRe: [patch] bkl2mtd: cleanup

* Al Viro <viro@ZenIV.linux.org.uk> 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


\
 
 \ /
  Last update: 2008-03-26 12:03    [from the cache]
©2003-2010