All of lore.kernel.org
 help / color / mirror / Atom feed
* [kees:for-next/pstore 8/35] fs//pstore/inode.c:288:16: warning: no previous prototype for function 'psinfo_lock_root'
@ 2020-05-30  8:38 kbuild test robot
  2020-05-30 17:34 ` Kees Cook
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-05-30  8:38 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
head:   3e01c33ced486b6ba180486f828b2b317c0fda01
commit: 6bcaa233a90ba3be98a6093cf346ac51eb05258f [8/35] pstore: Add locking around superblock changes
config: x86_64-randconfig-a015-20200529 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2d068e534f1671459e1b135852c1b3c10502e929)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout 6bcaa233a90ba3be98a6093cf346ac51eb05258f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> fs//pstore/inode.c:288:16: warning: no previous prototype for function 'psinfo_lock_root' [-Wmissing-prototypes]
struct dentry *psinfo_lock_root(void)
^
fs//pstore/inode.c:288:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct dentry *psinfo_lock_root(void)
^
static
1 warning generated.

vim +/psinfo_lock_root +288 fs//pstore/inode.c

   287	
 > 288	struct dentry *psinfo_lock_root(void)
   289	{
   290		struct dentry *root;
   291	
   292		mutex_lock(&pstore_sb_lock);
   293		/*
   294		 * Having no backend is fine -- no records appear.
   295		 * Not being mounted is fine -- nothing to do.
   296		 */
   297		if (!psinfo || !pstore_sb) {
   298			mutex_unlock(&pstore_sb_lock);
   299			return NULL;
   300		}
   301	
   302		root = pstore_sb->s_root;
   303		inode_lock(d_inode(root));
   304		mutex_unlock(&pstore_sb_lock);
   305	
   306		return root;
   307	}
   308	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [kees:for-next/pstore 8/35] fs//pstore/inode.c:288:16: warning: no previous prototype for function 'psinfo_lock_root'
  2020-05-30  8:38 [kees:for-next/pstore 8/35] fs//pstore/inode.c:288:16: warning: no previous prototype for function 'psinfo_lock_root' kbuild test robot
@ 2020-05-30 17:34 ` Kees Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2020-05-30 17:34 UTC (permalink / raw)
  To: kbuild-all

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

On Sat, May 30, 2020 at 04:38:48PM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
> head:   3e01c33ced486b6ba180486f828b2b317c0fda01
> commit: 6bcaa233a90ba3be98a6093cf346ac51eb05258f [8/35] pstore: Add locking around superblock changes
> config: x86_64-randconfig-a015-20200529 (attached as .config)
> compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2d068e534f1671459e1b135852c1b3c10502e929)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install x86_64 cross compiling tool for clang build
>         # apt-get install binutils-x86-64-linux-gnu
>         git checkout 6bcaa233a90ba3be98a6093cf346ac51eb05258f
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>, old ones prefixed by <<):
> 
> >> fs//pstore/inode.c:288:16: warning: no previous prototype for function 'psinfo_lock_root' [-Wmissing-prototypes]
> struct dentry *psinfo_lock_root(void)
> ^
> fs//pstore/inode.c:288:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> struct dentry *psinfo_lock_root(void)
> ^
> static
> 1 warning generated.
> 
> vim +/psinfo_lock_root +288 fs//pstore/inode.c
> 
>    287	
>  > 288	struct dentry *psinfo_lock_root(void)

Thanks! Yes, this should be static. Fixed now.

-Kees

>    289	{
>    290		struct dentry *root;
>    291	
>    292		mutex_lock(&pstore_sb_lock);
>    293		/*
>    294		 * Having no backend is fine -- no records appear.
>    295		 * Not being mounted is fine -- nothing to do.
>    296		 */
>    297		if (!psinfo || !pstore_sb) {
>    298			mutex_unlock(&pstore_sb_lock);
>    299			return NULL;
>    300		}
>    301	
>    302		root = pstore_sb->s_root;
>    303		inode_lock(d_inode(root));
>    304		mutex_unlock(&pstore_sb_lock);
>    305	
>    306		return root;
>    307	}
>    308	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org



-- 
Kees Cook

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-30 17:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30  8:38 [kees:for-next/pstore 8/35] fs//pstore/inode.c:288:16: warning: no previous prototype for function 'psinfo_lock_root' kbuild test robot
2020-05-30 17:34 ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.