[ragnatech:media-tree 50/142] aarch64-linux-ld: cec-notifier.c:undefined reference to `of_find_i2c_device_by_node'
by kernel test robot
tree: git://git.ragnatech.se/linux media-tree
head: 1cb3ff130f4d97dec2d1bee968a87f5d6e24dd60
commit: 71bb1b99a24f9653bdccaad2c25d007ba524074a [50/142] media: cec-notifier: also search for HDMI devices on I2C
config: arm64-randconfig-r022-20210312 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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
git remote add ragnatech git://git.ragnatech.se/linux
git fetch --no-tags ragnatech media-tree
git checkout 71bb1b99a24f9653bdccaad2c25d007ba524074a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
aarch64-linux-ld: Unexpected GOT/PLT entries detected!
aarch64-linux-ld: Unexpected run-time procedure linkages detected!
aarch64-linux-ld: drivers/media/cec/core/cec-notifier.o: in function `cec_notifier_parse_hdmi_phandle':
cec-notifier.c:(.text+0x194): undefined reference to `of_find_i2c_device_by_node'
>> aarch64-linux-ld: cec-notifier.c:(.text+0x1ac): undefined reference to `of_find_i2c_device_by_node'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v28 4/4] scsi: ufs: Add HPB 2.0 support
by kernel test robot
Hi Daejun,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on scsi/for-next]
[also build test WARNING on linus/master v5.12-rc2 next-20210312]
[cannot apply to mkp-scsi/for-next]
[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]
url: https://github.com/0day-ci/linux/commits/Daejun-Park/scsi-ufs-Introduce-H...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: h8300-randconfig-s032-20210312 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/a13bf626769280445ff1c6c5b0ab8dffb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daejun-Park/scsi-ufs-Introduce-HPB-feature/20210312-162129
git checkout a13bf626769280445ff1c6c5b0ab8dffb9439aa8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/scsi/ufs/ufshpb.c: In function 'ufshpb_execute_umap_req':
>> drivers/scsi/ufs/ufshpb.c:854:24: warning: variable 'q' set but not used [-Wunused-but-set-variable]
854 | struct request_queue *q;
| ^
vim +/q +854 drivers/scsi/ufs/ufshpb.c
849
850 static int ufshpb_execute_umap_req(struct ufshpb_lu *hpb,
851 struct ufshpb_req *umap_req,
852 struct ufshpb_region *rgn)
853 {
> 854 struct request_queue *q;
855 struct request *req;
856 struct scsi_request *rq;
857
858 q = hpb->sdev_ufs_lu->request_queue;
859 req = umap_req->req;
860 req->timeout = 0;
861 req->end_io_data = (void *)umap_req;
862 rq = scsi_req(req);
863 ufshpb_set_unmap_cmd(rq->cmd, rgn);
864 rq->cmd_len = HPB_WRITE_BUFFER_CMD_LENGTH;
865
866 blk_execute_rq_nowait(NULL, req, 1, ufshpb_umap_req_compl_fn);
867
868 return 0;
869 }
870
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] ARM: Fix incorrect use of smp_processor_id() by syzbot report
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master hnaz-linux-mm/master v5.12-rc2 next-20210311]
[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]
url: https://github.com/0day-ci/linux/commits/qiang-zhang-windriver-com/ARM-Fi...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: arm-pxa168_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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/0day-ci/linux/commit/b31b47976c6f81426cc00c99cc1452a60...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review qiang-zhang-windriver-com/ARM-Fix-incorrect-use-of-smp_processor_id-by-syzbot-report/20210312-121529
git checkout b31b47976c6f81426cc00c99cc1452a60e89d972
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm/mm/fault.c:21:
arch/arm/include/asm/system_misc.h: In function 'harden_branch_predictor':
>> arch/arm/include/asm/system_misc.h:25:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
25 | harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mm/fault.c: At top level:
arch/arm/mm/fault.c:518:1: warning: no previous prototype for 'do_DataAbort' [-Wmissing-prototypes]
518 | do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
| ^~~~~~~~~~~~
arch/arm/mm/fault.c:548:1: warning: no previous prototype for 'do_PrefetchAbort' [-Wmissing-prototypes]
548 | do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~
--
In file included from arch/arm/mm/proc-v7-bugs.c:9:
arch/arm/include/asm/system_misc.h: In function 'harden_branch_predictor':
>> arch/arm/include/asm/system_misc.h:25:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
25 | harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mm/proc-v7-bugs.c: At top level:
arch/arm/mm/proc-v7-bugs.c:142:6: warning: no previous prototype for 'cpu_v7_ca8_ibe' [-Wmissing-prototypes]
142 | void cpu_v7_ca8_ibe(void)
| ^~~~~~~~~~~~~~
arch/arm/mm/proc-v7-bugs.c:148:6: warning: no previous prototype for 'cpu_v7_ca15_ibe' [-Wmissing-prototypes]
148 | void cpu_v7_ca15_ibe(void)
| ^~~~~~~~~~~~~~~
arch/arm/mm/proc-v7-bugs.c:154:6: warning: no previous prototype for 'cpu_v7_bugs_init' [-Wmissing-prototypes]
154 | void cpu_v7_bugs_init(void)
| ^~~~~~~~~~~~~~~~
vim +25 arch/arm/include/asm/system_misc.h
9f97da78bf0182 David Howells 2012-03-28 18
f5fe12b1eaee22 Russell King 2018-05-14 19 #ifdef CONFIG_HARDEN_BRANCH_PREDICTOR
f5fe12b1eaee22 Russell King 2018-05-14 20 typedef void (*harden_branch_predictor_fn_t)(void);
f5fe12b1eaee22 Russell King 2018-05-14 21 DECLARE_PER_CPU(harden_branch_predictor_fn_t, harden_branch_predictor_fn);
f5fe12b1eaee22 Russell King 2018-05-14 22 static inline void harden_branch_predictor(void)
f5fe12b1eaee22 Russell King 2018-05-14 23 {
b31b47976c6f81 Zqiang 2021-03-12 24 preempt_disable();
f5fe12b1eaee22 Russell King 2018-05-14 @25 harden_branch_predictor_fn_t fn = per_cpu(harden_branch_predictor_fn,
f5fe12b1eaee22 Russell King 2018-05-14 26 smp_processor_id());
b31b47976c6f81 Zqiang 2021-03-12 27 preempt_enable();
f5fe12b1eaee22 Russell King 2018-05-14 28 if (fn)
f5fe12b1eaee22 Russell King 2018-05-14 29 fn();
f5fe12b1eaee22 Russell King 2018-05-14 30 }
f5fe12b1eaee22 Russell King 2018-05-14 31 #else
f5fe12b1eaee22 Russell King 2018-05-14 32 #define harden_branch_predictor() do { } while (0)
f5fe12b1eaee22 Russell King 2018-05-14 33 #endif
f5fe12b1eaee22 Russell King 2018-05-14 34
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v3 1/6] soc/tegra: Add devm_tegra_core_dev_init_opp_table()
by kernel test robot
Hi Dmitry,
I love your patch! Yet something to improve:
[auto build test ERROR on tegra/for-next]
[also build test ERROR on v5.12-rc2 next-20210311]
[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]
url: https://github.com/0day-ci/linux/commits/Dmitry-Osipenko/soc-tegra-Add-de...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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/0day-ci/linux/commit/8d5ea5b946a1399d7490fa992733a737c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/soc-tegra-Add-devm_tegra_core_dev_init_opp_table/20210312-081244
git checkout 8d5ea5b946a1399d7490fa992733a737c4bbd594
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/soc/tegra/common.c: In function 'devm_tegra_core_dev_init_opp_table':
>> drivers/soc/tegra/common.c:123:14: error: implicit declaration of function 'devm_pm_opp_set_clkname'; did you mean 'dev_pm_opp_set_clkname'? [-Werror=implicit-function-declaration]
123 | opp_table = devm_pm_opp_set_clkname(dev, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_set_clkname
drivers/soc/tegra/common.c:123:12: warning: assignment to 'struct opp_table *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
123 | opp_table = devm_pm_opp_set_clkname(dev, NULL);
| ^
>> drivers/soc/tegra/common.c:139:14: error: implicit declaration of function 'devm_pm_opp_set_supported_hw'; did you mean 'dev_pm_opp_set_supported_hw'? [-Werror=implicit-function-declaration]
139 | opp_table = devm_pm_opp_set_supported_hw(dev, &hw_version, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_set_supported_hw
drivers/soc/tegra/common.c:139:12: warning: assignment to 'struct opp_table *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
139 | opp_table = devm_pm_opp_set_supported_hw(dev, &hw_version, 1);
| ^
>> drivers/soc/tegra/common.c:153:8: error: implicit declaration of function 'devm_pm_opp_of_add_table'; did you mean 'dev_pm_opp_of_add_table'? [-Werror=implicit-function-declaration]
153 | err = devm_pm_opp_of_add_table(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| dev_pm_opp_of_add_table
cc1: some warnings being treated as errors
vim +123 drivers/soc/tegra/common.c
105
106 /**
107 * devm_tegra_core_dev_init_opp_table() - initialize OPP table
108 * @dev: device for which OPP table is initialized
109 * @params: pointer to the OPP table configuration
110 *
111 * This function will initialize OPP table and sync OPP state of a Tegra SoC
112 * core device.
113 *
114 * Return: 0 on success or errorno.
115 */
116 int devm_tegra_core_dev_init_opp_table(struct device *dev,
117 struct tegra_core_opp_params *params)
118 {
119 struct opp_table *opp_table;
120 u32 hw_version;
121 int err;
122
> 123 opp_table = devm_pm_opp_set_clkname(dev, NULL);
124 if (IS_ERR(opp_table)) {
125 dev_err(dev, "failed to set OPP clk %pe\n", opp_table);
126 return PTR_ERR(opp_table);
127 }
128
129 /* Tegra114+ doesn't support OPP yet */
130 if (!of_machine_is_compatible("nvidia,tegra20") &&
131 !of_machine_is_compatible("nvidia,tegra30"))
132 return -ENODEV;
133
134 if (of_machine_is_compatible("nvidia,tegra20"))
135 hw_version = BIT(tegra_sku_info.soc_process_id);
136 else
137 hw_version = BIT(tegra_sku_info.soc_speedo_id);
138
> 139 opp_table = devm_pm_opp_set_supported_hw(dev, &hw_version, 1);
140 if (IS_ERR(opp_table)) {
141 dev_err(dev, "failed to set OPP supported HW: %pe\n", opp_table);
142 return PTR_ERR(opp_table);
143 }
144
145 /*
146 * Older device-trees have an empty OPP table, hence we will get
147 * -ENODEV from devm_pm_opp_of_add_table() for the older DTBs.
148 *
149 * The OPP table presence also varies per-device and depending
150 * on a SoC generation, hence -ENODEV is expected to happen for
151 * the newer DTs as well.
152 */
> 153 err = devm_pm_opp_of_add_table(dev);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-iv:review/v5-viresh-cppc-counters 1/2] drivers/base/arch_topology.c:133:17: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.gitlab.arm.com/linux-arm/linux-iv.git review/v5-viresh-cppc-counters
head: 7e9e155411e1181c6b4eb5615568693fbed7b264
commit: a7d9b7cc83c6f04b1e33b4b1b6dc76fc6c36c1ab [1/2] topology: Allow multiple entities to provide sched_freq_tick() callback
config: arm64-randconfig-s032-20210309 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
git remote add linux-iv https://git.gitlab.arm.com/linux-arm/linux-iv.git
git fetch --no-tags linux-iv review/v5-viresh-cppc-counters
git checkout a7d9b7cc83c6f04b1e33b4b1b6dc76fc6c36c1ab
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/base/arch_topology.c:133:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
drivers/base/arch_topology.c:133:17: sparse: expected void const [noderef] __percpu *__vpp_verify
drivers/base/arch_topology.c:133:17: sparse: got unsigned long *
vim +133 drivers/base/arch_topology.c
2ef7a2953c81ee Juri Lelli 2017-05-31 112
a20b7053b5c47c Ionela Voinescu 2020-09-24 113 void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,
0e27c567d16731 Dietmar Eggemann 2017-09-26 114 unsigned long max_freq)
2ef7a2953c81ee Juri Lelli 2017-05-31 115 {
0e27c567d16731 Dietmar Eggemann 2017-09-26 116 unsigned long scale;
0e27c567d16731 Dietmar Eggemann 2017-09-26 117 int i;
0e27c567d16731 Dietmar Eggemann 2017-09-26 118
0a10d3fe3e5c60 Ionela Voinescu 2020-09-01 119 if (WARN_ON_ONCE(!cur_freq || !max_freq))
0a10d3fe3e5c60 Ionela Voinescu 2020-09-01 120 return;
0a10d3fe3e5c60 Ionela Voinescu 2020-09-01 121
cd0ed03a8903a0 Ionela Voinescu 2020-03-05 122 /*
cd0ed03a8903a0 Ionela Voinescu 2020-03-05 123 * If the use of counters for FIE is enabled, just return as we don't
cd0ed03a8903a0 Ionela Voinescu 2020-03-05 124 * want to update the scale factor with information from CPUFREQ.
cd0ed03a8903a0 Ionela Voinescu 2020-03-05 125 * Instead the scale factor will be updated from arch_scale_freq_tick.
cd0ed03a8903a0 Ionela Voinescu 2020-03-05 126 */
a7d9b7cc83c6f0 Viresh Kumar 2021-03-01 127 if (supports_scale_freq_counters(cpus))
cd0ed03a8903a0 Ionela Voinescu 2020-03-05 128 return;
cd0ed03a8903a0 Ionela Voinescu 2020-03-05 129
0e27c567d16731 Dietmar Eggemann 2017-09-26 130 scale = (cur_freq << SCHED_CAPACITY_SHIFT) / max_freq;
0e27c567d16731 Dietmar Eggemann 2017-09-26 131
0e27c567d16731 Dietmar Eggemann 2017-09-26 132 for_each_cpu(i, cpus)
0e27c567d16731 Dietmar Eggemann 2017-09-26 @133 per_cpu(freq_scale, i) = scale;
2ef7a2953c81ee Juri Lelli 2017-05-31 134 }
2ef7a2953c81ee Juri Lelli 2017-05-31 135
:::::: The code at line 133 was first introduced by commit
:::::: 0e27c567d1673137b06aa96bb7aef635fb657dee drivers base/arch_topology: provide frequency-invariant accounting support
:::::: TO: Dietmar Eggemann <dietmar.eggemann(a)arm.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
include/linux/mmzone.h:1244:29: sparse: sparse: invalid access past the end of 'mem_section' (512 512)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f78d76e72a4671ea52d12752d92077788b4f5d50
commit: 0697e5e06ea0d96e2d1508104ff3b13e4dddc4bb ARM: 8974/1: use SPARSMEM_STATIC when SPARSEMEM is enabled
date: 10 months ago
config: arm-randconfig-s032-20210312 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0697e5e06ea0d96e2d1508104ff3b13e4dddc4bb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
lib/crypto/chacha20poly1305.c: note: in included file (through include/linux/gfp.h, include/linux/slab.h, include/linux/crypto.h, ...):
>> include/linux/mmzone.h:1244:29: sparse: sparse: invalid access past the end of 'mem_section' (512 512)
>> include/linux/mmzone.h:1244:29: sparse: sparse: invalid access past the end of 'mem_section' (512 512)
>> include/linux/mmzone.h:1244:29: sparse: sparse: invalid access past the end of 'mem_section' (512 512)
--
lib/crypto/chacha20poly1305-selftest.c: note: in included file (through include/linux/gfp.h, include/linux/mm.h, include/linux/scatterlist.h, ...):
>> include/linux/mmzone.h:1244:29: sparse: sparse: invalid access past the end of 'mem_section' (512 512)
vim +/mem_section +1244 include/linux/mmzone.h
29751f6991e845 Andy Whitcroft 2005-06-23 1241
29751f6991e845 Andy Whitcroft 2005-06-23 1242 static inline struct page *__section_mem_map_addr(struct mem_section *section)
29751f6991e845 Andy Whitcroft 2005-06-23 1243 {
29751f6991e845 Andy Whitcroft 2005-06-23 @1244 unsigned long map = section->section_mem_map;
29751f6991e845 Andy Whitcroft 2005-06-23 1245 map &= SECTION_MAP_MASK;
29751f6991e845 Andy Whitcroft 2005-06-23 1246 return (struct page *)map;
29751f6991e845 Andy Whitcroft 2005-06-23 1247 }
29751f6991e845 Andy Whitcroft 2005-06-23 1248
:::::: The code at line 1244 was first introduced by commit
:::::: 29751f6991e845f7d002a6ae520bf996b38c8dcd [PATCH] sparsemem hotplug base
:::::: TO: Andy Whitcroft <apw(a)shadowen.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:141:37: warning: Undefined behavior: Variable 'i2c_output' is used as parameter and destination in
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 28806e4d9b97865b450d72156e9ad229f2067f0b
commit: ecaafb7b5ab6406587341d8727f237b3ee00dedf drm/amdgpu: Add secure display TA interface
date: 8 weeks ago
compiler: alpha-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:141:37: warning: Undefined behavior: Variable 'i2c_output' is used as parameter and destination in s[n]printf(). [sprintfOverlappingData]
sprintf(i2c_output, "%s 0x%X", i2c_output,
^
vim +/i2c_output +141 drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
85
86 static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __user *buf,
87 size_t size, loff_t *pos)
88 {
89 struct amdgpu_device *adev = (struct amdgpu_device *)file_inode(f)->i_private;
90 struct psp_context *psp = &adev->psp;
91 struct securedisplay_cmd *securedisplay_cmd;
92 struct drm_device *dev = adev_to_drm(adev);
93 uint32_t phy_id;
94 uint32_t op;
95 int i;
96 char str[64];
97 char i2c_output[256];
98 int ret;
99
100 if (*pos || size > sizeof(str) - 1)
101 return -EINVAL;
102
103 memset(str, 0, sizeof(str));
104 ret = copy_from_user(str, buf, size);
105 if (ret)
106 return -EFAULT;
107
108 ret = pm_runtime_get_sync(dev->dev);
109 if (ret < 0) {
110 pm_runtime_put_autosuspend(dev->dev);
111 return ret;
112 }
113
114 if (size < 3)
115 sscanf(str, "%u ", &op);
116 else
117 sscanf(str, "%u %u", &op, &phy_id);
118
119 switch (op) {
120 case 1:
121 psp_prep_securedisplay_cmd_buf(psp, &securedisplay_cmd,
122 TA_SECUREDISPLAY_COMMAND__QUERY_TA);
123 ret = psp_securedisplay_invoke(psp, TA_SECUREDISPLAY_COMMAND__QUERY_TA);
124 if (!ret) {
125 if (securedisplay_cmd->status == TA_SECUREDISPLAY_STATUS__SUCCESS)
126 dev_info(adev->dev, "SECUREDISPLAY: query securedisplay TA ret is 0x%X\n",
127 securedisplay_cmd->securedisplay_out_message.query_ta.query_cmd_ret);
128 else
129 psp_securedisplay_parse_resp_status(psp, securedisplay_cmd->status);
130 }
131 break;
132 case 2:
133 psp_prep_securedisplay_cmd_buf(psp, &securedisplay_cmd,
134 TA_SECUREDISPLAY_COMMAND__SEND_ROI_CRC);
135 securedisplay_cmd->securedisplay_in_message.send_roi_crc.phy_id = phy_id;
136 ret = psp_securedisplay_invoke(psp, TA_SECUREDISPLAY_COMMAND__SEND_ROI_CRC);
137 if (!ret) {
138 if (securedisplay_cmd->status == TA_SECUREDISPLAY_STATUS__SUCCESS) {
139 memset(i2c_output, 0, sizeof(i2c_output));
140 for (i = 0; i < TA_SECUREDISPLAY_I2C_BUFFER_SIZE; i++)
> 141 sprintf(i2c_output, "%s 0x%X", i2c_output,
142 securedisplay_cmd->securedisplay_out_message.send_roi_crc.i2c_buf[i]);
143 dev_info(adev->dev, "SECUREDISPLAY: I2C buffer out put is :%s\n", i2c_output);
144 } else {
145 psp_securedisplay_parse_resp_status(psp, securedisplay_cmd->status);
146 }
147 }
148 break;
149 default:
150 dev_err(adev->dev, "Invalid input: %s\n", str);
151 }
152
153 pm_runtime_mark_last_busy(dev->dev);
154 pm_runtime_put_autosuspend(dev->dev);
155
156 return size;
157 }
158
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-next:master 1430/3917] drivers/platform/surface/surface_aggregator_registry.c:398:25: warning: implicit conversion from 'int' to '__u8' (aka 'unsigned char') changes value from 65535 to 255
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 98546348153dee5f8ced572fd6c4690461d20f51
commit: 797e78564634275ed4fe6b3f586c4b96eb1d86bc [1430/3917] platform/surface: aggregator_registry: Add base device hub
config: arm64-randconfig-r026-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 797e78564634275ed4fe6b3f586c4b96eb1d86bc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/platform/surface/surface_aggregator_registry.c:12:
In file included from include/linux/acpi.h:35:
In file included from include/acpi/acpi_io.h:7:
In file included from arch/arm64/include/asm/acpi.h:12:
include/linux/efi.h:1093:34: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
status = get_var(L"SecureBoot", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size,
^
include/linux/efi.h:1101:24: warning: passing 1-byte aligned argument to 4-byte aligned parameter 2 of 'get_var' may result in an unaligned pointer access [-Walign-mismatch]
get_var(L"SetupMode", &EFI_GLOBAL_VARIABLE_GUID, NULL, &size, &setupmode);
^
>> drivers/platform/surface/surface_aggregator_registry.c:398:25: warning: implicit conversion from 'int' to '__u8' (aka 'unsigned char') changes value from 65535 to 255 [-Wconstant-conversion]
{ SSAM_VDEV(HUB, 0x02, SSAM_ANY_IID, 0x00) },
~ ^~~~~~~~~~~~
include/linux/surface_aggregator/device.h:71:23: note: expanded from macro 'SSAM_ANY_IID'
#define SSAM_ANY_IID 0xffff
^~~~~~
include/linux/surface_aggregator/device.h:126:63: note: expanded from macro 'SSAM_VDEV'
SSAM_DEVICE(SSAM_DOMAIN_VIRTUAL, SSAM_VIRTUAL_TC_##cat, tid, iid, fun)
^~~
include/linux/surface_aggregator/device.h:102:41: note: expanded from macro 'SSAM_DEVICE'
.instance = ((iid) != SSAM_ANY_IID) ? (iid) : 0, \
^~~
3 warnings generated.
vim +398 drivers/platform/surface/surface_aggregator_registry.c
396
397 static const struct ssam_device_id ssam_base_hub_match[] = {
> 398 { SSAM_VDEV(HUB, 0x02, SSAM_ANY_IID, 0x00) },
399 { },
400 };
401
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months