linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen Gang <chengang@emindsoft.com.cn>
To: David Howells <dhowells@redhat.com>
Cc: trivial@kernel.org, akpm@linux-foundation.org,
	viro@zeniv.linux.org.uk, nicolas.iooss_linux@m4x.org,
	linux-kernel@vger.kernel.org,
	Chen Gang <gang.chen.5i5j@gmail.com>
Subject: Re: [PATCH v2 trivial] include/linux/dcache.h: Cleanup code and comments
Date: Mon, 11 Jan 2016 22:58:16 +0800	[thread overview]
Message-ID: <5693C308.9030900@emindsoft.com.cn> (raw)
In-Reply-To: <9916.1452506237@warthog.procyon.org.uk>


On 1/11/16 17:57, David Howells wrote:
> chengang@emindsoft.com.cn wrote:
> 
>> -#define DCACHE_MISS_TYPE		0x00000000 /* Negative dentry (maybe fallthru to nowhere) */
>> -#define DCACHE_WHITEOUT_TYPE		0x00100000 /* Whiteout dentry (stop pathwalk) */
>> -#define DCACHE_DIRECTORY_TYPE		0x00200000 /* Normal directory */
>> -#define DCACHE_AUTODIR_TYPE		0x00300000 /* Lookupless directory (presumed automount) */
>> -#define DCACHE_REGULAR_TYPE		0x00400000 /* Regular file type (or fallthru to such) */
>> -#define DCACHE_SPECIAL_TYPE		0x00500000 /* Other file type (or fallthru to such) */
>> -#define DCACHE_SYMLINK_TYPE		0x00600000 /* Symlink (or fallthru to such) */
>> +/* Negative dentry (maybe fallthru to nowhere) */
>> +#define DCACHE_MISS_TYPE		0x00000000
>> +/* Whiteout dentry (stop pathwalk) */
>> +#define DCACHE_WHITEOUT_TYPE		0x00100000
>> +/* Normal directory */
>> +#define DCACHE_DIRECTORY_TYPE		0x00200000
>> +/* Lookupless directory (presumed automount) */
>> +#define DCACHE_AUTODIR_TYPE		0x00300000
>> +/* Regular file type (or fallthru to such) */
>> +#define DCACHE_REGULAR_TYPE		0x00400000
>> +/* Other file type (or fallthru to such) */
>> +#define DCACHE_SPECIAL_TYPE		0x00500000
>> +/* Symlink (or fallthru to such) */
>> +#define DCACHE_SYMLINK_TYPE		0x00600000
> 
> Please leave things like this as they were.
> 

OK, thanks.

>> - * d_really_is_negative - Determine if a dentry is really negative (ignoring fallthroughs)
>> + * d_really_is_negative - Determine if a dentry is really negative (ignoring
>> + * fallthroughs)
> 
> Does that break doc generation?
> 

I guess no, the related contents are below:

  [root@localhost linux-next]# make htmldocs
    GEN     Documentation/DocBook//v4l2.xml
    HTML    Documentation/DocBook/index.html
  [root@localhost linux-next]# touch include/linux/dcache.h 
  [root@localhost linux-next]# make htmldocs
    DOCPROC Documentation/DocBook/filesystems.xml
  .//include/linux/jbd2.h:439: warning: No description found for parameter 'i_transaction'
  .//include/linux/jbd2.h:439: warning: No description found for parameter 'i_next_transaction'
  .//include/linux/jbd2.h:439: warning: No description found for parameter 'i_list'
  .//include/linux/jbd2.h:439: warning: No description found for parameter 'i_vfs_inode'
  .//include/linux/jbd2.h:439: warning: No description found for parameter 'i_flags'
  .//include/linux/jbd2.h:495: warning: No description found for parameter 'h_rsv_handle'
  .//include/linux/jbd2.h:495: warning: No description found for parameter 'h_reserved'
  .//include/linux/jbd2.h:495: warning: No description found for parameter 'h_type'
  .//include/linux/jbd2.h:495: warning: No description found for parameter 'h_line_no'
  .//include/linux/jbd2.h:495: warning: No description found for parameter 'h_start_jiffies'
  .//include/linux/jbd2.h:495: warning: No description found for parameter 'h_requested_credits'
  .//include/linux/jbd2.h:495: warning: No description found for parameter 'h_lockdep_map'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_chkpt_bhs[JBD2_NR_BATCH]'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_devname[BDEVNAME_SIZE+24]'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_average_commit_time'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_min_batch_time'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_max_batch_time'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_commit_callback'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_failed_commit'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_chksum_driver'
  .//include/linux/jbd2.h:1038: warning: No description found for parameter 'j_csum_seed'
  .//include/linux/jbd2.h:1038: warning: Excess struct/union/enum/typedef member 'j_history' description in 'journal_s'
  .//include/linux/jbd2.h:1038: warning: Excess struct/union/enum/typedef member 'j_history_max' description in 'journal_s'
  .//include/linux/jbd2.h:1038: warning: Excess struct/union/enum/typedef member 'j_history_cur' description in 'journal_s'
  .//fs/jbd2/transaction.c:429: warning: No description found for parameter 'rsv_blocks'
  .//fs/jbd2/transaction.c:429: warning: No description found for parameter 'gfp_mask'
  .//fs/jbd2/transaction.c:429: warning: No description found for parameter 'type'
  .//fs/jbd2/transaction.c:429: warning: No description found for parameter 'line_no'
  .//fs/jbd2/transaction.c:505: warning: No description found for parameter 'type'
  .//fs/jbd2/transaction.c:505: warning: No description found for parameter 'line_no'
  .//fs/jbd2/transaction.c:635: warning: No description found for parameter 'gfp_mask'
    XMLREF  Documentation/DocBook/filesystems.aux.xml
    HTML    Documentation/DocBook/filesystems.html
    GEN     Documentation/DocBook//v4l2.xml
    HTML    Documentation/DocBook/index.html
  [root@localhost linux-next]#


> Is fudging the comments actually worth breaking git blame?
> 

Excuse me, I am not quite familiar with git blame, the related result is
below, please help check (after apply this patch):

  git blame include/linux/dcache.h

  ^1da177e4 (Linus Torvalds    2005-04-16 15:20:36 -0700   1) #ifndef __LINUX_DCACHE_H
  ^1da177e4 (Linus Torvalds    2005-04-16 15:20:36 -0700   2) #define __LINUX_DCACHE_H
  ^1da177e4 (Linus Torvalds    2005-04-16 15:20:36 -0700   3)  
  60063497a (Arun Sharma       2011-07-26 16:09:06 -0700   4) #include <linux/atomic.h>
  ...
  
  b18825a7c (David Howells     2013-09-12 19:22:53 +0100 477)
  525d27b23 (David Howells     2015-02-11 13:40:17 +0000 478) /**
  53165fb00 (Chen Gang         2016-01-10 07:03:30 +0800 479)  * d_really_is_negative - Determine if a dentry is really negative (ignoring
  53165fb00 (Chen Gang         2016-01-10 07:03:30 +0800 480)  * fallthroughs)
  525d27b23 (David Howells     2015-02-11 13:40:17 +0000 481)  * @dentry: The dentry in question
  525d27b23 (David Howells     2015-02-11 13:40:17 +0000 482)  *
  ...
  
  155e35d4d (David Howells     2015-01-29 12:02:27 +0000 586) static inline struct dentry *d_backing_dentry(struct dentry *upper)
  155e35d4d (David Howells     2015-01-29 12:02:27 +0000 587) {
  155e35d4d (David Howells     2015-01-29 12:02:27 +0000 588)     return upper;
  155e35d4d (David Howells     2015-01-29 12:02:27 +0000 589) }
  155e35d4d (David Howells     2015-01-29 12:02:27 +0000 590)
  ^1da177e4 (Linus Torvalds    2005-04-16 15:20:36 -0700 591) #endif      /* __LINUX_DCACHE_H */



>> -static inline int simple_positive(struct dentry *dentry)
>> +static inline bool simple_positive(struct dentry *dentry)
> 
> This is worth doing - gcc actually produces better code sometimes with the int
> -> bool switch.  This should be a separate patch.
> 

OK, I shall send a seperate patch for it.

Thanks
-- 
Chen Gang (陈刚)

Open, share, and attitude like air, water, and life which God blessed

      reply	other threads:[~2016-01-11 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 23:11 [PATCH v2 trivial] include/linux/dcache.h: Cleanup code and comments chengang
2016-01-11  9:57 ` David Howells
2016-01-11 14:58   ` Chen Gang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5693C308.9030900@emindsoft.com.cn \
    --to=chengang@emindsoft.com.cn \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=gang.chen.5i5j@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.iooss_linux@m4x.org \
    --cc=trivial@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).