Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • openanolis
  • cloud-kernelcloud-kernel
  • Issue
  • #15

cloud-kernel
cloud-kernel
  • 项目概览

openanolis / cloud-kernel
接近 2 年 前同步成功

通知 169
Star 36
Fork 7
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 10
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 2
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
cloud-kernel
cloud-kernel
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 10
    • Issue 10
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 2
    • 合并请求 2
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 9月 28, 2020 by casparant@casparantMaintainer

[alibaba-cloud:linux-next 11093/12249] fs/proc/stat.c:48:5: warning: no previous prototype for function 'get_idle_time'

https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/ZX4BMSCH27O277YIEHCK457LFSRTK5LF/

Hi Xunlei,

FYI, the error/warning still remains.

tree:   https://github.com/alibaba/cloud-kernel.git linux-next
head:   c3ac3c331d6cc495be9603404799c061d71af44c
commit: 9be0ac2bcbaa1831196a88f5e81ea162811f3418 [11093/12249] alinux: cpuacct: export cpuacct.proc_stat interface
config: x86_64-randconfig-a005-20200927 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 6d374cf78c8a80a0bbfc7ce9bc80b3f183f44c80)
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://github.com/alibaba/cloud-kernel/commit/9be0ac2bcbaa1831196a88f5e81ea162811f3418
        git remote add alibaba-cloud https://github.com/alibaba/cloud-kernel.git
        git fetch --no-tags alibaba-cloud linux-next
        git checkout 9be0ac2bcbaa1831196a88f5e81ea162811f3418
        # 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@intel.com>

All warnings (new ones prefixed by >>):

>> fs/proc/stat.c:48:5: warning: no previous prototype for function 'get_idle_time' [-Wmissing-prototypes]
   u64 get_idle_time(int cpu)
       ^
   fs/proc/stat.c:48:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u64 get_idle_time(int cpu)
   ^
   static 
>> fs/proc/stat.c:64:5: warning: no previous prototype for function 'get_iowait_time' [-Wmissing-prototypes]
   u64 get_iowait_time(int cpu)
       ^
   fs/proc/stat.c:64:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   u64 get_iowait_time(int cpu)
   ^
   static 
   2 warnings generated.

vim +/get_idle_time +48 fs/proc/stat.c

    47	
  > 48	u64 get_idle_time(int cpu)
    49	{
    50		u64 idle, idle_usecs = -1ULL;
    51	
    52		if (cpu_online(cpu))
    53			idle_usecs = get_cpu_idle_time_us(cpu, NULL);
    54	
    55		if (idle_usecs == -1ULL)
    56			/* !NO_HZ or cpu offline so we can rely on cpustat.idle */
    57			idle = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE];
    58		else
    59			idle = idle_usecs * NSEC_PER_USEC;
    60	
    61		return idle;
    62	}
    63	
  > 64	u64 get_iowait_time(int cpu)
    65	{
    66		u64 iowait, iowait_usecs = -1ULL;
    67	
    68		if (cpu_online(cpu))
    69			iowait_usecs = get_cpu_iowait_time_us(cpu, NULL);
    70	
    71		if (iowait_usecs == -1ULL)
    72			/* !NO_HZ or cpu offline so we can rely on cpustat.iowait */
    73			iowait = kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT];
    74		else
    75			iowait = iowait_usecs * NSEC_PER_USEC;
    76	
    77		return iowait;
    78	}
    79	

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

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: openanolis/cloud-kernel#15
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7