Linux cgroups development
 help / color / mirror / Atom feed
* [cgroup:for-next 3/3] include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage'
@ 2021-04-04 21:11 kernel test robot
       [not found] ` <202104050523.t4Om6TmY-lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-04-04 21:11 UTC (permalink / raw)
  To: Vipin Sharma
  Cc: kbuild-all-hn68Rpc1hR1g9hUCZPvPmw,
	clang-built-linux-/JYPxA39Uh5TLH3MbocFFw,
	cgroups-u79uwXL29TY76Z2rM5mHXA, Tejun Heo, David Rientjes

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
head:   7aef27f0b2a8a58c28578d3e0caf3f27e1a1c39c
commit: 7aef27f0b2a8a58c28578d3e0caf3f27e1a1c39c [3/3] svm/sev: Register SEV and SEV-ES ASIDs to the misc controller
config: x86_64-randconfig-a004-20210405 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 30df6d5d6a8537d3ec7d8fe4299289a4c5a74d5c)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git/commit/?id=7aef27f0b2a8a58c28578d3e0caf3f27e1a1c39c
        git remote add cgroup https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
        git fetch --no-tags cgroup for-next
        git checkout 7aef27f0b2a8a58c28578d3e0caf3f27e1a1c39c
        # 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: kernel test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kvm/svm/sev.c:17:
>> include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage' [-Wmissing-prototypes]
   unsigned long misc_cg_res_total_usage(enum misc_res_type type)
                 ^
   include/linux/misc_cgroup.h:98:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned long misc_cg_res_total_usage(enum misc_res_type type)
   ^
   static 
   1 warning generated.


vim +/misc_cg_res_total_usage +98 include/linux/misc_cgroup.h

a72232eabdfcfe Vipin Sharma 2021-03-29   97  
a72232eabdfcfe Vipin Sharma 2021-03-29  @98  unsigned long misc_cg_res_total_usage(enum misc_res_type type)
a72232eabdfcfe Vipin Sharma 2021-03-29   99  {
a72232eabdfcfe Vipin Sharma 2021-03-29  100  	return 0;
a72232eabdfcfe Vipin Sharma 2021-03-29  101  }
a72232eabdfcfe Vipin Sharma 2021-03-29  102  

:::::: The code at line 98 was first introduced by commit
:::::: a72232eabdfcfe365a05a3eb392288b78d25a5ca cgroup: Add misc cgroup controller

:::::: TO: Vipin Sharma <vipinsh-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
:::::: CC: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org

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

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

* Re: [cgroup:for-next 3/3] include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage'
       [not found] ` <202104050523.t4Om6TmY-lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2021-04-04 22:32   ` Tejun Heo
       [not found]     ` <YGo+f3XoA4CtRAPt-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2021-04-04 22:32 UTC (permalink / raw)
  Cc: Vipin Sharma, kbuild-all-hn68Rpc1hR1g9hUCZPvPmw,
	clang-built-linux-/JYPxA39Uh5TLH3MbocFFw,
	cgroups-u79uwXL29TY76Z2rM5mHXA, David Rientjes

Applied the following patch to cgroup/for-5.13.

Thanks.
----- 8< -----
From dd3f4e4972f146a685930ccfed95e4e1d13d952a Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Date: Sun, 4 Apr 2021 18:29:37 -0400
Subject: [PATCH] cgroup: misc: mark dummy misc_cg_res_total_usage() static
 inline

The dummy implementation was missing static inline triggering the following
compile warning on llvm.

   In file included from arch/x86/kvm/svm/sev.c:17:
>> include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage' [-Wmissing-prototypes]
   unsigned long misc_cg_res_total_usage(enum misc_res_type type)
                 ^
   include/linux/misc_cgroup.h:98:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   unsigned long misc_cg_res_total_usage(enum misc_res_type type)
   ^
   static
   1 warning generated.

Add it.

Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Reported-by: kernel test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 include/linux/misc_cgroup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h
index c5af592481c0..da2367e2ac1e 100644
--- a/include/linux/misc_cgroup.h
+++ b/include/linux/misc_cgroup.h
@@ -95,7 +95,7 @@ static inline void put_misc_cg(struct misc_cg *cg)
 
 #else /* !CONFIG_CGROUP_MISC */
 
-unsigned long misc_cg_res_total_usage(enum misc_res_type type)
+static inline unsigned long misc_cg_res_total_usage(enum misc_res_type type)
 {
 	return 0;
 }
-- 
2.31.1


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

* Re: [cgroup:for-next 3/3] include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage'
       [not found]     ` <YGo+f3XoA4CtRAPt-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
@ 2021-04-05  0:27       ` Vipin Sharma
  0 siblings, 0 replies; 3+ messages in thread
From: Vipin Sharma @ 2021-04-05  0:27 UTC (permalink / raw)
  To: Tejun Heo
  Cc: kbuild-all-hn68Rpc1hR1g9hUCZPvPmw,
	clang-built-linux-/JYPxA39Uh5TLH3MbocFFw,
	cgroups-u79uwXL29TY76Z2rM5mHXA, David Rientjes

On Sun, Apr 4, 2021 at 3:32 PM Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>
> Applied the following patch to cgroup/for-5.13.
>
> Thanks.
> ----- 8< -----
> From dd3f4e4972f146a685930ccfed95e4e1d13d952a Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Date: Sun, 4 Apr 2021 18:29:37 -0400
> Subject: [PATCH] cgroup: misc: mark dummy misc_cg_res_total_usage() static
>  inline
>
> The dummy implementation was missing static inline triggering the following
> compile warning on llvm.
>
>    In file included from arch/x86/kvm/svm/sev.c:17:
> >> include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage' [-Wmissing-prototypes]
>    unsigned long misc_cg_res_total_usage(enum misc_res_type type)
>                  ^
>    include/linux/misc_cgroup.h:98:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    unsigned long misc_cg_res_total_usage(enum misc_res_type type)
>    ^
>    static
>    1 warning generated.
>
> Add it.
>
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Reported-by: kernel test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
>  include/linux/misc_cgroup.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/misc_cgroup.h b/include/linux/misc_cgroup.h
> index c5af592481c0..da2367e2ac1e 100644
> --- a/include/linux/misc_cgroup.h
> +++ b/include/linux/misc_cgroup.h
> @@ -95,7 +95,7 @@ static inline void put_misc_cg(struct misc_cg *cg)
>
>  #else /* !CONFIG_CGROUP_MISC */
>
> -unsigned long misc_cg_res_total_usage(enum misc_res_type type)
> +static inline unsigned long misc_cg_res_total_usage(enum misc_res_type type)
>  {
>         return 0;
>  }
> --
> 2.31.1
>

Thanks for the quick patch Tejun. Sorry about the issue.

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

end of thread, other threads:[~2021-04-05  0:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-04 21:11 [cgroup:for-next 3/3] include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage' kernel test robot
     [not found] ` <202104050523.t4Om6TmY-lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2021-04-04 22:32   ` Tejun Heo
     [not found]     ` <YGo+f3XoA4CtRAPt-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2021-04-05  0:27       ` Vipin Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox