Re: [PATCH v4 1/5] fsnotify: use typedef fsnotify_connp_t for brevity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat 23-06-18 22:13:41, Al Viro wrote:
> On Sat, Jun 23, 2018 at 05:54:47PM +0300, Amir Goldstein wrote:
> > The object marks manipulation functions fsnotify_destroy_marks()
> > fsnotify_find_mark() and their helpers take an argument of type
> > struct fsnotify_mark_connector __rcu ** to dereference the connector
> > pointer. use a typedef to describe this type for brevity.
> 
> That kind of typedefs is generally considered a bad style kernel-side...

I know that such typedefs are discouraged as they often reduce readability
(you have to look up the typedef to know what the type is about). However
in this case the type name is long enough and we also often pass 'pointer
to pointer' so that I think the readability of the result is actually
better. And Amir has chosen reasonably clear name fsnotify_connp_t to show
this is about a pointer to fsnotify_connector so that you should not need
to look up the typedef more than once ;)
								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux