From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933510AbcAKO4I (ORCPT ); Mon, 11 Jan 2016 09:56:08 -0500 Received: from mail113-250.mail.alibaba.com ([205.204.113.250]:54330 "EHLO us-alimail-mta1.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932860AbcAKO4G (ORCPT ); Mon, 11 Jan 2016 09:56:06 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07444471|-1;FP=0|0|0|0|0|-1|-1|-1;HT=e01l04446;MF=chengang@emindsoft.com.cn;NM=1;PH=DS;RN=7;RT=7;SR=0;TI=SMTPD_----4RJNZgC_1452524099; Message-ID: <5693C308.9030900@emindsoft.com.cn> Date: Mon, 11 Jan 2016 22:58:16 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Howells 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 Subject: Re: [PATCH v2 trivial] include/linux/dcache.h: Cleanup code and comments References: <1452381100-3187-1-git-send-email-chengang@emindsoft.com.cn> <9916.1452506237@warthog.procyon.org.uk> In-Reply-To: <9916.1452506237@warthog.procyon.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ... 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