mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: kbuild-all@01.org, Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <mmarek@suse.com>,
	linux-kbuild@vger.kernel.org,
	Matthew Wilcox <mawilcox@microsoft.com>
Subject: Re: [PATCH] Check all .c files for bad kernel-doc comments
Date: Mon, 30 Oct 2017 04:37:02 +0800	[thread overview]
Message-ID: <201710300404.iwPDSRVE%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171027194149.14328-1-willy@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 8624 bytes --]

Hi Matthew,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.14-rc6 next-20171018]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Matthew-Wilcox/Check-all-c-files-for-bad-kernel-doc-comments/20171030-033926
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

>> kernel/fork.c:983: warning: No description found for parameter 'mm'
>> kernel/fork.c:983: warning: No description found for parameter 'new_exe_file'
   kernel/fork.c:1007: warning: No description found for parameter 'mm'
>> kernel/fork.c:1027: warning: No description found for parameter 'task'
   kernel/fork.c:1052: warning: No description found for parameter 'task'
--
>> kernel/cpu.c:53: warning: cannot understand function prototype: 'struct cpuhp_cpu_state '
>> kernel/cpu.c:108: warning: cannot understand function prototype: 'struct cpuhp_step '
>> kernel/cpu.c:1608: warning: No description found for parameter 'name'
--
>> kernel/notifier.c:77: warning: Excess function parameter 'returns' description in 'notifier_call_chain'
--
>> kernel/reboot.c:184: warning: No description found for parameter 'cmd'
--
>> mm/oom_kill.c:175: warning: No description found for parameter 'memcg'
>> mm/oom_kill.c:175: warning: No description found for parameter 'nodemask'
--
>> mm/maccess.c:87: warning: No description found for parameter 'unsafe_addr'
>> mm/maccess.c:87: warning: Excess function parameter 'src' description in 'strncpy_from_unsafe'
--
>> mm/swap.c:932: warning: No description found for parameter 'nr_pages'
>> mm/swap.c:932: warning: Excess function parameter 'nr_entries' description in 'pagevec_lookup_entries'
>> mm/swap.c:982: warning: Excess function parameter 'nr_pages' description in 'pagevec_lookup_range'
--
>> mm/compaction.c:568: warning: No description found for parameter 'cc'
>> mm/compaction.c:1724: warning: No description found for parameter 'prio'
>> mm/compaction.c:1724: warning: Excess function parameter 'mode' description in 'try_to_compact_pages'
--
>> mm/mlock.c:176: warning: No description found for parameter 'page'
--
>> mm/pagewalk.c:286: warning: No description found for parameter 'start'
>> mm/pagewalk.c:286: warning: No description found for parameter 'end'
>> mm/pagewalk.c:286: warning: No description found for parameter 'walk'
--
>> mm/rmap.c:1175: warning: No description found for parameter 'compound'
..

vim +/mm +983 kernel/fork.c

a1b2289c Sherry Yang           2017-10-03   970  
90f31d0e Konstantin Khlebnikov 2015-04-16   971  /**
90f31d0e Konstantin Khlebnikov 2015-04-16   972   * set_mm_exe_file - change a reference to the mm's executable file
90f31d0e Konstantin Khlebnikov 2015-04-16   973   *
90f31d0e Konstantin Khlebnikov 2015-04-16   974   * This changes mm's executable file (shown as symlink /proc/[pid]/exe).
90f31d0e Konstantin Khlebnikov 2015-04-16   975   *
6e399cd1 Davidlohr Bueso       2015-04-16   976   * Main users are mmput() and sys_execve(). Callers prevent concurrent
6e399cd1 Davidlohr Bueso       2015-04-16   977   * invocations: in mmput() nobody alive left, in execve task is single
6e399cd1 Davidlohr Bueso       2015-04-16   978   * threaded. sys_prctl(PR_SET_MM_MAP/EXE_FILE) also needs to set the
6e399cd1 Davidlohr Bueso       2015-04-16   979   * mm->exe_file, but does so without using set_mm_exe_file() in order
6e399cd1 Davidlohr Bueso       2015-04-16   980   * to do avoid the need for any locks.
90f31d0e Konstantin Khlebnikov 2015-04-16   981   */
38646013 Jiri Slaby            2011-05-26   982  void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
38646013 Jiri Slaby            2011-05-26  @983  {
6e399cd1 Davidlohr Bueso       2015-04-16   984  	struct file *old_exe_file;
6e399cd1 Davidlohr Bueso       2015-04-16   985  
6e399cd1 Davidlohr Bueso       2015-04-16   986  	/*
6e399cd1 Davidlohr Bueso       2015-04-16   987  	 * It is safe to dereference the exe_file without RCU as
6e399cd1 Davidlohr Bueso       2015-04-16   988  	 * this function is only called if nobody else can access
6e399cd1 Davidlohr Bueso       2015-04-16   989  	 * this mm -- see comment above for justification.
6e399cd1 Davidlohr Bueso       2015-04-16   990  	 */
6e399cd1 Davidlohr Bueso       2015-04-16   991  	old_exe_file = rcu_dereference_raw(mm->exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16   992  
38646013 Jiri Slaby            2011-05-26   993  	if (new_exe_file)
38646013 Jiri Slaby            2011-05-26   994  		get_file(new_exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16   995  	rcu_assign_pointer(mm->exe_file, new_exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16   996  	if (old_exe_file)
90f31d0e Konstantin Khlebnikov 2015-04-16   997  		fput(old_exe_file);
38646013 Jiri Slaby            2011-05-26   998  }
38646013 Jiri Slaby            2011-05-26   999  
90f31d0e Konstantin Khlebnikov 2015-04-16  1000  /**
90f31d0e Konstantin Khlebnikov 2015-04-16  1001   * get_mm_exe_file - acquire a reference to the mm's executable file
90f31d0e Konstantin Khlebnikov 2015-04-16  1002   *
90f31d0e Konstantin Khlebnikov 2015-04-16  1003   * Returns %NULL if mm has no associated executable file.
90f31d0e Konstantin Khlebnikov 2015-04-16  1004   * User must release file via fput().
90f31d0e Konstantin Khlebnikov 2015-04-16  1005   */
38646013 Jiri Slaby            2011-05-26  1006  struct file *get_mm_exe_file(struct mm_struct *mm)
38646013 Jiri Slaby            2011-05-26  1007  {
38646013 Jiri Slaby            2011-05-26  1008  	struct file *exe_file;
38646013 Jiri Slaby            2011-05-26  1009  
90f31d0e Konstantin Khlebnikov 2015-04-16  1010  	rcu_read_lock();
90f31d0e Konstantin Khlebnikov 2015-04-16  1011  	exe_file = rcu_dereference(mm->exe_file);
90f31d0e Konstantin Khlebnikov 2015-04-16  1012  	if (exe_file && !get_file_rcu(exe_file))
90f31d0e Konstantin Khlebnikov 2015-04-16  1013  		exe_file = NULL;
90f31d0e Konstantin Khlebnikov 2015-04-16  1014  	rcu_read_unlock();
38646013 Jiri Slaby            2011-05-26  1015  	return exe_file;
38646013 Jiri Slaby            2011-05-26  1016  }
11163348 Davidlohr Bueso       2015-04-16  1017  EXPORT_SYMBOL(get_mm_exe_file);
38646013 Jiri Slaby            2011-05-26  1018  
^1da177e Linus Torvalds        2005-04-16  1019  /**
cd81a917 Mateusz Guzik         2016-08-23  1020   * get_task_exe_file - acquire a reference to the task's executable file
cd81a917 Mateusz Guzik         2016-08-23  1021   *
cd81a917 Mateusz Guzik         2016-08-23  1022   * Returns %NULL if task's mm (if any) has no associated executable file or
cd81a917 Mateusz Guzik         2016-08-23  1023   * this is a kernel thread with borrowed mm (see the comment above get_task_mm).
cd81a917 Mateusz Guzik         2016-08-23  1024   * User must release file via fput().
cd81a917 Mateusz Guzik         2016-08-23  1025   */
cd81a917 Mateusz Guzik         2016-08-23  1026  struct file *get_task_exe_file(struct task_struct *task)
cd81a917 Mateusz Guzik         2016-08-23 @1027  {
cd81a917 Mateusz Guzik         2016-08-23  1028  	struct file *exe_file = NULL;
cd81a917 Mateusz Guzik         2016-08-23  1029  	struct mm_struct *mm;
cd81a917 Mateusz Guzik         2016-08-23  1030  
cd81a917 Mateusz Guzik         2016-08-23  1031  	task_lock(task);
cd81a917 Mateusz Guzik         2016-08-23  1032  	mm = task->mm;
cd81a917 Mateusz Guzik         2016-08-23  1033  	if (mm) {
cd81a917 Mateusz Guzik         2016-08-23  1034  		if (!(task->flags & PF_KTHREAD))
cd81a917 Mateusz Guzik         2016-08-23  1035  			exe_file = get_mm_exe_file(mm);
cd81a917 Mateusz Guzik         2016-08-23  1036  	}
cd81a917 Mateusz Guzik         2016-08-23  1037  	task_unlock(task);
cd81a917 Mateusz Guzik         2016-08-23  1038  	return exe_file;
cd81a917 Mateusz Guzik         2016-08-23  1039  }
cd81a917 Mateusz Guzik         2016-08-23  1040  EXPORT_SYMBOL(get_task_exe_file);
38646013 Jiri Slaby            2011-05-26  1041  

:::::: The code at line 983 was first introduced by commit
:::::: 3864601387cf4196371e3c1897fdffa5228296f9 mm: extract exe_file handling from procfs

:::::: TO: Jiri Slaby <jslaby@suse.cz>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 6685 bytes --]

  parent reply	other threads:[~2017-10-29 20:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 19:41 Matthew Wilcox
2017-10-29 20:22 ` kbuild test robot
2017-10-29 20:37 ` kbuild test robot [this message]
2017-10-30  3:40 ` Masahiro Yamada
2017-10-30 13:40   ` Matthew Wilcox
2017-10-30 15:12     ` Masahiro Yamada
2017-10-30 15:19     ` Jani Nikula
2017-10-30 20:51       ` Matthew Wilcox
2017-10-31  8:13         ` Jani Nikula
2017-11-20 18:40   ` Matthew Wilcox
2017-11-20 19:14     ` Jonathan Corbet

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=201710300404.iwPDSRVE%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=corbet@lwn.net \
    --cc=kbuild-all@01.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mawilcox@microsoft.com \
    --cc=mmarek@suse.com \
    --cc=willy@infradead.org \
    --cc=yamada.masahiro@socionext.com \
    /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

all inboxes | Powered by JetHome®