lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5693C308.9030900@emindsoft.com.cn>
Date:	Mon, 11 Jan 2016 22:58:16 +0800
From:	Chen Gang <chengang@...ndsoft.com.cn>
To:	David Howells <dhowells@...hat.com>
CC:	trivial@...nel.org, akpm@...ux-foundation.org,
	viro@...iv.linux.org.uk, nicolas.iooss_linux@....org,
	linux-kernel@...r.kernel.org, Chen Gang <gang.chen.5i5j@...il.com>
Subject: Re: [PATCH v2 trivial] include/linux/dcache.h: Cleanup code and comments


On 1/11/16 17:57, David Howells wrote:
> chengang@...ndsoft.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@...alhost linux-next]# make htmldocs
    GEN     Documentation/DocBook//v4l2.xml
    HTML    Documentation/DocBook/index.html
  [root@...alhost linux-next]# touch include/linux/dcache.h 
  [root@...alhost 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@...alhost 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ