Re: [PATCH v5 1/1] iio: adc: ad7124: allow more than 8 channels
by kernel test robot
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on iio/togreg]
[also build test WARNING on linux/master linus/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/alexandru-tachici-analog-com/iio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: arc-randconfig-r015-20210311 (attached as .config)
compiler: arc-elf-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/4634217a2ad675ef3f84048e7abaf355e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review alexandru-tachici-analog-com/iio-adc-ad7124-allow-more-than-8-channels/20210311-170758
git checkout 4634217a2ad675ef3f84048e7abaf355e05ca781
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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/iio/adc/ad7124.c: In function 'ad7124_setup':
>> drivers/iio/adc/ad7124.c:810:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
810 | unsigned int val, fclk, power_mode;
| ^~~
vim +/val +810 drivers/iio/adc/ad7124.c
b3af341bbd9662 Stefan Popa 2018-11-13 807
b3af341bbd9662 Stefan Popa 2018-11-13 808 static int ad7124_setup(struct ad7124_state *st)
b3af341bbd9662 Stefan Popa 2018-11-13 809 {
b3af341bbd9662 Stefan Popa 2018-11-13 @810 unsigned int val, fclk, power_mode;
4634217a2ad675 Alexandru Tachici 2021-03-11 811 int i, ret;
b3af341bbd9662 Stefan Popa 2018-11-13 812
b3af341bbd9662 Stefan Popa 2018-11-13 813 fclk = clk_get_rate(st->mclk);
b3af341bbd9662 Stefan Popa 2018-11-13 814 if (!fclk)
b3af341bbd9662 Stefan Popa 2018-11-13 815 return -EINVAL;
b3af341bbd9662 Stefan Popa 2018-11-13 816
b3af341bbd9662 Stefan Popa 2018-11-13 817 /* The power mode changes the master clock frequency */
b3af341bbd9662 Stefan Popa 2018-11-13 818 power_mode = ad7124_find_closest_match(ad7124_master_clk_freq_hz,
b3af341bbd9662 Stefan Popa 2018-11-13 819 ARRAY_SIZE(ad7124_master_clk_freq_hz),
b3af341bbd9662 Stefan Popa 2018-11-13 820 fclk);
b3af341bbd9662 Stefan Popa 2018-11-13 821 if (fclk != ad7124_master_clk_freq_hz[power_mode]) {
b3af341bbd9662 Stefan Popa 2018-11-13 822 ret = clk_set_rate(st->mclk, fclk);
b3af341bbd9662 Stefan Popa 2018-11-13 823 if (ret)
b3af341bbd9662 Stefan Popa 2018-11-13 824 return ret;
b3af341bbd9662 Stefan Popa 2018-11-13 825 }
b3af341bbd9662 Stefan Popa 2018-11-13 826
b3af341bbd9662 Stefan Popa 2018-11-13 827 /* Set the power mode */
b3af341bbd9662 Stefan Popa 2018-11-13 828 st->adc_control &= ~AD7124_ADC_CTRL_PWR_MSK;
b3af341bbd9662 Stefan Popa 2018-11-13 829 st->adc_control |= AD7124_ADC_CTRL_PWR(power_mode);
b3af341bbd9662 Stefan Popa 2018-11-13 830 ret = ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control);
b3af341bbd9662 Stefan Popa 2018-11-13 831 if (ret < 0)
b3af341bbd9662 Stefan Popa 2018-11-13 832 return ret;
b3af341bbd9662 Stefan Popa 2018-11-13 833
4634217a2ad675 Alexandru Tachici 2021-03-11 834 mutex_init(&st->cfgs_lock);
4634217a2ad675 Alexandru Tachici 2021-03-11 835 INIT_KFIFO(st->live_cfgs_fifo);
b3af341bbd9662 Stefan Popa 2018-11-13 836 for (i = 0; i < st->num_channels; i++) {
4634217a2ad675 Alexandru Tachici 2021-03-11 837 val = st->channels[i].ain;
b3af341bbd9662 Stefan Popa 2018-11-13 838
4634217a2ad675 Alexandru Tachici 2021-03-11 839 ret = ad7124_init_config_vref(st, &st->channels[i].cfg);
b3af341bbd9662 Stefan Popa 2018-11-13 840 if (ret < 0)
b3af341bbd9662 Stefan Popa 2018-11-13 841 return ret;
b3af341bbd9662 Stefan Popa 2018-11-13 842
b3af341bbd9662 Stefan Popa 2018-11-13 843 /*
b3af341bbd9662 Stefan Popa 2018-11-13 844 * 9.38 SPS is the minimum output data rate supported
b3af341bbd9662 Stefan Popa 2018-11-13 845 * regardless of the selected power mode. Round it up to 10 and
4634217a2ad675 Alexandru Tachici 2021-03-11 846 * set all channels to this default value.
b3af341bbd9662 Stefan Popa 2018-11-13 847 */
4634217a2ad675 Alexandru Tachici 2021-03-11 848 ad7124_set_channel_odr(st, i, 10);
b3af341bbd9662 Stefan Popa 2018-11-13 849 }
b3af341bbd9662 Stefan Popa 2018-11-13 850
b3af341bbd9662 Stefan Popa 2018-11-13 851 return ret;
b3af341bbd9662 Stefan Popa 2018-11-13 852 }
b3af341bbd9662 Stefan Popa 2018-11-13 853
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
arch/s390/kernel/perf_cpum_cf_diag.c:787 cf_diag_all_copy() warn: ignoring unreachable code.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: cf6acb8bdb1d829b85a4daa2944bf9e71c93f4b9 s390/cpumf: Add support for complete counter set extraction
date: 2 weeks ago
config: s390-randconfig-m031-20210311 (attached as .config)
compiler: s390-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>
smatch warnings:
arch/s390/kernel/perf_cpum_cf_diag.c:787 cf_diag_all_copy() warn: ignoring unreachable code.
vim +787 arch/s390/kernel/perf_cpum_cf_diag.c
770
771 static int cf_diag_all_copy(unsigned long arg, cpumask_t *mask)
772 {
773 struct s390_ctrset_read __user *ctrset_read;
774 unsigned int cpu, cpus, rc;
775 void __user *uptr;
776
777 ctrset_read = (struct s390_ctrset_read __user *)arg;
778 uptr = ctrset_read->data;
779 for_each_cpu(cpu, mask) {
780 struct cf_diag_csd *csd = per_cpu_ptr(&cf_diag_csd, cpu);
781 struct s390_ctrset_cpudata __user *ctrset_cpudata;
782
783 ctrset_cpudata = uptr;
784 debug_sprintf_event(cf_diag_dbg, 5, "%s cpu %d used %zd\n",
785 __func__, cpu, csd->used);
786 rc = put_user(cpu, &ctrset_cpudata->cpu_nr);
> 787 rc |= put_user(csd->sets, &ctrset_cpudata->no_sets);
788 rc |= copy_to_user(ctrset_cpudata->data, csd->data, csd->used);
789 if (rc)
790 return -EFAULT;
791 uptr += sizeof(struct s390_ctrset_cpudata) + csd->used;
792 cond_resched();
793 }
794 cpus = cpumask_weight(mask);
795 if (put_user(cpus, &ctrset_read->no_cpus))
796 return -EFAULT;
797 debug_sprintf_event(cf_diag_dbg, 5, "%s copied %ld\n",
798 __func__, uptr - (void __user *)ctrset_read->data);
799 return 0;
800 }
801
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[ast:syscall 11/12] kernel/bpf/syscall.c:4581:15: warning: initialized field overwritten
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git syscall
head: 213043c26fc999a2c53b6beaf87202ef3d1c3192
commit: b8d7e8566ed962ddc77ed9150c0b44361dd35f48 [11/12] bpf: Add bpf_btf_find_by_name_kind() helper.
config: xtensa-randconfig-p002-20210310 (attached as .config)
compiler: xtensa-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
# https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/commit/?id=b8...
git remote add ast https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
git fetch --no-tags ast syscall
git checkout b8d7e8566ed962ddc77ed9150c0b44361dd35f48
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
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 >>):
>> kernel/bpf/syscall.c:4581:15: warning: initialized field overwritten [-Woverride-init]
4581 | .arg1_type = ARG_ANYTHING,
| ^~~~~~~~~~~~
kernel/bpf/syscall.c:4581:15: note: (near initialization for 'bpf_btf_find_by_name_kind_proto.<anonymous>.<anonymous>.arg1_type')
kernel/bpf/syscall.c:4582:15: warning: initialized field overwritten [-Woverride-init]
4582 | .arg1_type = ARG_ANYTHING,
| ^~~~~~~~~~~~
kernel/bpf/syscall.c:4582:15: note: (near initialization for 'bpf_btf_find_by_name_kind_proto.<anonymous>.<anonymous>.arg1_type')
vim +4581 kernel/bpf/syscall.c
4575
4576 const struct bpf_func_proto bpf_btf_find_by_name_kind_proto = {
4577 .func = bpf_btf_find_by_name_kind,
4578 .gpl_only = false,
4579 .ret_type = RET_INTEGER,
4580 .arg1_type = ARG_ANYTHING,
> 4581 .arg1_type = ARG_ANYTHING,
4582 .arg1_type = ARG_ANYTHING,
4583 };
4584
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
drivers/firmware/arm_scmi/smc.c:113:2: error: write to reserved register 'R7'
by kernel test robot
Hi Sudeep,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: 66d90f6ecee755e9c19a119c9255e80091165498 firmware: arm_scmi: Enable building as a single module
date: 6 months ago
config: arm-randconfig-r005-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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 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 66d90f6ecee755e9c19a119c9255e80091165498
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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/firmware/arm_scmi/smc.c:113:2: error: write to reserved register 'R7'
arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res);
^
include/linux/arm-smccc.h:396:4: note: expanded from macro 'arm_smccc_1_1_invoke'
arm_smccc_1_1_smc(__VA_ARGS__); \
^
include/linux/arm-smccc.h:343:48: note: expanded from macro 'arm_smccc_1_1_smc'
#define arm_smccc_1_1_smc(...) __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
^
include/linux/arm-smccc.h:220:24: note: expanded from macro 'SMCCC_SMC_INST'
#define SMCCC_SMC_INST __SMC(0)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:210:2: note: expanded from macro '__inst_arm_thumb32'
__inst_thumb32(thumb_opcode)
^
arch/arm/include/asm/opcodes.h:200:27: note: expanded from macro '__inst_thumb32'
#define __inst_thumb32(x) ___inst_thumb32( \
^
arch/arm/include/asm/opcodes.h:225:2: note: expanded from macro '___inst_thumb32'
".short " __stringify(first) ", " __stringify(second) "\n\t"
^
>> drivers/firmware/arm_scmi/smc.c:113:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:393:4: note: expanded from macro 'arm_smccc_1_1_invoke'
arm_smccc_1_1_hvc(__VA_ARGS__); \
^
include/linux/arm-smccc.h:359:48: note: expanded from macro 'arm_smccc_1_1_hvc'
#define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
^
include/linux/arm-smccc.h:221:24: note: expanded from macro 'SMCCC_HVC_INST'
#define SMCCC_HVC_INST __HVC(0)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
arch/arm/include/asm/opcodes.h:210:2: note: expanded from macro '__inst_arm_thumb32'
__inst_thumb32(thumb_opcode)
^
arch/arm/include/asm/opcodes.h:200:27: note: expanded from macro '__inst_thumb32'
#define __inst_thumb32(x) ___inst_thumb32( \
^
arch/arm/include/asm/opcodes.h:225:2: note: expanded from macro '___inst_thumb32'
".short " __stringify(first) ", " __stringify(second) "\n\t"
^
>> drivers/firmware/arm_scmi/smc.c:113:2: error: write to reserved register 'R7'
include/linux/arm-smccc.h:399:4: note: expanded from macro 'arm_smccc_1_1_invoke'
__fail_smccc_1_1(__VA_ARGS__); \
^
include/linux/arm-smccc.h:369:8: note: expanded from macro '__fail_smccc_1_1'
asm ("" __constraints(__count_args(__VA_ARGS__))); \
^
3 errors generated.
vim +/R7 +113 drivers/firmware/arm_scmi/smc.c
1dc6558062dadf Peng Fan 2020-03-08 102
1dc6558062dadf Peng Fan 2020-03-08 103 static int smc_send_message(struct scmi_chan_info *cinfo,
1dc6558062dadf Peng Fan 2020-03-08 104 struct scmi_xfer *xfer)
1dc6558062dadf Peng Fan 2020-03-08 105 {
1dc6558062dadf Peng Fan 2020-03-08 106 struct scmi_smc *scmi_info = cinfo->transport_info;
1dc6558062dadf Peng Fan 2020-03-08 107 struct arm_smccc_res res;
1dc6558062dadf Peng Fan 2020-03-08 108
18988265b87615 Sudeep Holla 2020-03-27 109 mutex_lock(&scmi_info->shmem_lock);
1dc6558062dadf Peng Fan 2020-03-08 110
1dc6558062dadf Peng Fan 2020-03-08 111 shmem_tx_prepare(scmi_info->shmem, xfer);
1dc6558062dadf Peng Fan 2020-03-08 112
1dc6558062dadf Peng Fan 2020-03-08 @113 arm_smccc_1_1_invoke(scmi_info->func_id, 0, 0, 0, 0, 0, 0, 0, &res);
1dc6558062dadf Peng Fan 2020-03-08 114 scmi_rx_callback(scmi_info->cinfo, shmem_read_header(scmi_info->shmem));
1dc6558062dadf Peng Fan 2020-03-08 115
18988265b87615 Sudeep Holla 2020-03-27 116 mutex_unlock(&scmi_info->shmem_lock);
1dc6558062dadf Peng Fan 2020-03-08 117
f7199cf489027a Sudeep Holla 2020-04-17 118 /* Only SMCCC_RET_NOT_SUPPORTED is valid error code */
f7199cf489027a Sudeep Holla 2020-04-17 119 if (res.a0)
f7199cf489027a Sudeep Holla 2020-04-17 120 return -EOPNOTSUPP;
f7199cf489027a Sudeep Holla 2020-04-17 121 return 0;
1dc6558062dadf Peng Fan 2020-03-08 122 }
1dc6558062dadf Peng Fan 2020-03-08 123
:::::: The code at line 113 was first introduced by commit
:::::: 1dc6558062dadfabd2fb3bd885fa6e92ec7196f2 firmware: arm_scmi: Add smc/hvc transport
:::::: TO: Peng Fan <peng.fan(a)nxp.com>
:::::: CC: Sudeep Holla <sudeep.holla(a)arm.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/fortify-string.h:187:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: a28a6e860c6cf231cf3c5171c75c342adcd00406 string.h: move fortified functions definitions in a dedicated header.
date: 13 days ago
config: mips-randconfig-r021-20210311 (attached as .config)
compiler: mipsel-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
# 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 a28a6e860c6cf231cf3c5171c75c342adcd00406
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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 >>):
arch/mips/dec/prom/memory.c: In function 'pmax_setup_memory_region':
arch/mips/dec/prom/memory.c:32:39: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
32 | volatile unsigned char *memory_page, dummy;
| ^~~~~
In file included from include/linux/string.h:269,
from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from arch/mips/include/asm/processor.h:15,
from arch/mips/include/asm/thread_info.h:16,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/mips/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from arch/mips/dec/prom/memory.c:10:
In function 'memcpy',
inlined from 'prom_meminit' at arch/mips/dec/prom/memory.c:38:2:
>> include/linux/fortify-string.h:187:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
187 | __read_overflow2();
| ^~~~~~~~~~~~~~~~~~
vim +/__read_overflow2 +187 include/linux/fortify-string.h
177
178 __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
179 {
180 size_t p_size = __builtin_object_size(p, 0);
181 size_t q_size = __builtin_object_size(q, 0);
182
183 if (__builtin_constant_p(size)) {
184 if (p_size < size)
185 __write_overflow();
186 if (q_size < size)
> 187 __read_overflow2();
188 }
189 if (p_size < size || q_size < size)
190 fortify_panic(__func__);
191 return __underlying_memcpy(p, q, size);
192 }
193
---
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 3851/3917] drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c:99: warning: expecting prototype for smuio_v13_0_supports_host_gpu_xgmi(). Prototype was for smuio_v13_0_is_host_gpu_xgmi_supported() instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 98546348153dee5f8ced572fd6c4690461d20f51
commit: 35fa30bfdfc6bb5f78c35df740baa70f9b7178ab [3851/3917] Merge remote-tracking branch 'amdgpu/drm-next'
config: x86_64-randconfig-r012-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 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/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 35fa30bfdfc6bb5f78c35df740baa70f9b7178ab
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c:99: warning: expecting prototype for smuio_v13_0_supports_host_gpu_xgmi(). Prototype was for smuio_v13_0_is_host_gpu_xgmi_supported() instead
vim +99 drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c
62f6a0a7d844be Hawking Zhang 2020-10-23 90
62f6a0a7d844be Hawking Zhang 2020-10-23 91 /**
62f6a0a7d844be Hawking Zhang 2020-10-23 92 * smuio_v13_0_supports_host_gpu_xgmi - detect xgmi interface between cpu and gpu/s.
62f6a0a7d844be Hawking Zhang 2020-10-23 93 *
62f6a0a7d844be Hawking Zhang 2020-10-23 94 * @adev: amdgpu device pointer
62f6a0a7d844be Hawking Zhang 2020-10-23 95 *
62f6a0a7d844be Hawking Zhang 2020-10-23 96 * Returns true on success or false otherwise.
62f6a0a7d844be Hawking Zhang 2020-10-23 97 */
62f6a0a7d844be Hawking Zhang 2020-10-23 98 static bool smuio_v13_0_is_host_gpu_xgmi_supported(struct amdgpu_device *adev)
62f6a0a7d844be Hawking Zhang 2020-10-23 @99 {
62f6a0a7d844be Hawking Zhang 2020-10-23 100 u32 data;
62f6a0a7d844be Hawking Zhang 2020-10-23 101
62f6a0a7d844be Hawking Zhang 2020-10-23 102 data = RREG32_SOC15(SMUIO, 0, regSMUIO_MCM_CONFIG);
62f6a0a7d844be Hawking Zhang 2020-10-23 103 data = REG_GET_FIELD(data, SMUIO_MCM_CONFIG, TOPOLOGY_ID);
62f6a0a7d844be Hawking Zhang 2020-10-23 104 /* data[4:0]
62f6a0a7d844be Hawking Zhang 2020-10-23 105 * bit 0 == 0 host-gpu interface is PCIE
62f6a0a7d844be Hawking Zhang 2020-10-23 106 * bit 0 == 1 host-gpu interface is Alternate Protocal
62f6a0a7d844be Hawking Zhang 2020-10-23 107 * for AMD, this is XGMI
62f6a0a7d844be Hawking Zhang 2020-10-23 108 */
62f6a0a7d844be Hawking Zhang 2020-10-23 109 data &= SMUIO_MCM_CONFIG__HOST_GPU_XGMI_MASK;
62f6a0a7d844be Hawking Zhang 2020-10-23 110
62f6a0a7d844be Hawking Zhang 2020-10-23 111 return data ? true : false;
62f6a0a7d844be Hawking Zhang 2020-10-23 112 }
62f6a0a7d844be Hawking Zhang 2020-10-23 113
:::::: The code at line 99 was first introduced by commit
:::::: 62f6a0a7d844be7ccc8bbd85bb8decac3145f59a drm/amdgpu: implement smuio v13_0 callbacks
:::::: TO: Hawking Zhang <Hawking.Zhang(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[RFC PATCH] bpf: check_bpf_snprintf_call() can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
verifier.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 3ab549df817b6..06c868989852d 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -5732,8 +5732,8 @@ static int check_reference_leak(struct bpf_verifier_env *env)
return state->acquired_refs ? -EINVAL : 0;
}
-int check_bpf_snprintf_call(struct bpf_verifier_env *env,
- struct bpf_reg_state *regs)
+static int check_bpf_snprintf_call(struct bpf_verifier_env *env,
+ struct bpf_reg_state *regs)
{
struct bpf_reg_state *fmt_reg = ®s[BPF_REG_3];
struct bpf_reg_state *data_len_reg = ®s[BPF_REG_5];
1 year, 6 months
Re: [PATCH bpf-next 2/5] bpf: Add a bpf_snprintf helper
by kernel test robot
Hi Florent,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Florent-Revest/bpf-Add-a-ARG_PTR...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-s022-20210310 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/c06d419a45370b897b7383625f0435873...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Florent-Revest/bpf-Add-a-ARG_PTR_TO_CONST_STR-argument-type/20210311-070306
git checkout c06d419a45370b897b7383625f0435873a7458fa
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)"
>> kernel/bpf/verifier.c:5735:5: sparse: sparse: symbol 'check_bpf_snprintf_call' was not declared. Should it be static?
kernel/bpf/verifier.c:11865:76: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12273:81: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12277:81: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12281:81: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12285:79: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12289:78: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12293:79: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12297:78: sparse: sparse: subtraction of functions? Share your drugs
kernel/bpf/verifier.c:12341:38: sparse: sparse: subtraction of functions? Share your drugs
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months