[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202207280422.mCMrDg9E-lkp@intel.com>
Date: Thu, 28 Jul 2022 05:02:18 +0800
From: kernel test robot <lkp@...el.com>
To: kah.jing.lee@...el.com, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org, arnd@...db.de
Cc: kbuild-all@...ts.01.org, rafael.j.wysocki@...el.com,
tien.sung.ang@...el.com, dinh.nguyen@...el.com,
Kah Jing Lee <kah.jing.lee@...el.com>, Zhou@...r.kernel.org,
Furong <furong.zhou@...el.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Subject: Re: [PATCH v2 1/3] drivers: misc: intel_sysid: Add sysid from arch
to drivers
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on soc/for-next linus/master v5.19-rc8]
[cannot apply to char-misc/char-misc-testing next-20220727]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/kah-jing-lee-intel-com/drivers-misc-intel_sysid-Add-sysid-from-arch-to-drivers/20220721-213214
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 8af028c2b22bc04f5ab59cd39fa97ccf14aa8f25
config: s390-randconfig-p001-20220727 (https://download.01.org/0day-ci/archive/20220728/202207280422.mCMrDg9E-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
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
# https://github.com/intel-lab-lkp/linux/commit/5e0d691312542fbb751afb99bd7b537b9a975750
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review kah-jing-lee-intel-com/drivers-misc-intel_sysid-Add-sysid-from-arch-to-drivers/20220721-213214
git checkout 5e0d691312542fbb751afb99bd7b537b9a975750
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 5e0d691312542fbb751afb99bd7b537b9a975750
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
s390-linux-ld: drivers/misc/intel_sysid.o: in function `intel_sysid_probe':
>> drivers/misc/intel_sysid.c:85: undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/net/ethernet/altera/altera_tse_main.o: in function `request_and_map':
>> drivers/net/ethernet/altera/altera_tse_main.c:1339: undefined reference to `devm_ioremap'
pahole: .tmp_vmlinux.btf: No such file or directory
.btf.vmlinux.bin.o: file not recognized: file format not recognized
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> arch/s390/kernel/perf_cpum_sf.c:805:8: warning: Using pointer that is a temporary. [danglingTemporaryLifetime]
si = cpuhw->qsi;
^
arch/s390/kernel/perf_cpum_sf.c:804:11: note: Address of variable taken here.
cpuhw = &per_cpu(cpu_hw_sf, event->cpu);
^
arch/s390/kernel/perf_cpum_sf.c:804:19: note: Temporary created here.
cpuhw = &per_cpu(cpu_hw_sf, event->cpu);
^
arch/s390/kernel/perf_cpum_sf.c:805:8: note: Using pointer that is a temporary.
si = cpuhw->qsi;
^
arch/s390/kernel/perf_cpum_sf.c:867:27: warning: Using pointer that is a temporary. [danglingTemporaryLifetime]
err = allocate_buffers(cpuhw, hwc);
^
arch/s390/kernel/perf_cpum_sf.c:866:12: note: Address of variable taken here.
cpuhw = &per_cpu(cpu_hw_sf, cpu);
^
arch/s390/kernel/perf_cpum_sf.c:866:20: note: Temporary created here.
cpuhw = &per_cpu(cpu_hw_sf, cpu);
^
arch/s390/kernel/perf_cpum_sf.c:867:27: note: Using pointer that is a temporary.
err = allocate_buffers(cpuhw, hwc);
^
arch/s390/kernel/perf_cpum_sf.c:1825:8: warning: Using pointer that is a temporary. [danglingTemporaryLifetime]
si = cpuhw->qsi;
^
arch/s390/kernel/perf_cpum_sf.c:1823:29: note: Address of variable taken here.
struct cpu_hw_sf *cpuhw = &per_cpu(cpu_hw_sf, event->cpu);
^
arch/s390/kernel/perf_cpum_sf.c:1823:37: note: Temporary created here.
struct cpu_hw_sf *cpuhw = &per_cpu(cpu_hw_sf, event->cpu);
^
arch/s390/kernel/perf_cpum_sf.c:1825:8: note: Using pointer that is a temporary.
si = cpuhw->qsi;
^
vim +85 drivers/misc/intel_sysid.c
70
71 static int intel_sysid_probe(struct platform_device *pdev)
72 {
73 struct intel_sysid *sysid;
74 struct resource *regs;
75
76 sysid = devm_kzalloc(&pdev->dev, sizeof(struct intel_sysid),
77 GFP_KERNEL);
78 if (!sysid)
79 return -ENOMEM;
80
81 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
82 if (!regs)
83 return -ENXIO;
84
> 85 sysid->regs = devm_ioremap_resource(&pdev->dev, regs);
86 if (IS_ERR(sysid->regs))
87 return PTR_ERR(sysid->regs);
88
89 platform_set_drvdata(pdev, sysid);
90
91 return devm_device_add_group(&pdev->dev, &intel_sysid_attr_group);
92 }
93
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists