CC: [email protected] BCC: [email protected] CC: [email protected] TO: Mihail Chindris <[email protected]> CC: Jonathan Cameron <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 4ea3c6425269d33da53c79d539ce9554117cf4d4 commit: 8f2b54824b28ba8317c60947b5941d686e3df70d drivers:iio:dac: Add AD3552R driver support date: 4 months ago :::::: branch date: 4 hours ago :::::: commit date: 4 months ago compiler: ia64-linux-gcc (GCC) 11.2.0 reproduce (cppcheck warning): # apt-get install cppcheck git checkout 8f2b54824b28ba8317c60947b5941d686e3df70d cppcheck --quiet --enable=style,performance,portability --template=gcc FILE If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> drivers/iio/dac/ad3552r.c:778:44: warning: Parameter 'vals' can be declared >> with const [constParameter] static int ad3552r_find_range(u16 id, s32 *vals) ^ vim +/vals +778 drivers/iio/dac/ad3552r.c 8f2b54824b28ba Mihail Chindris 2021-12-13 777 8f2b54824b28ba Mihail Chindris 2021-12-13 @778 static int ad3552r_find_range(u16 id, s32 *vals) 8f2b54824b28ba Mihail Chindris 2021-12-13 779 { 8f2b54824b28ba Mihail Chindris 2021-12-13 780 int i, len; 8f2b54824b28ba Mihail Chindris 2021-12-13 781 const s32 (*ranges)[2]; 8f2b54824b28ba Mihail Chindris 2021-12-13 782 8f2b54824b28ba Mihail Chindris 2021-12-13 783 if (id == AD3542R_ID) { 8f2b54824b28ba Mihail Chindris 2021-12-13 784 len = ARRAY_SIZE(ad3542r_ch_ranges); 8f2b54824b28ba Mihail Chindris 2021-12-13 785 ranges = ad3542r_ch_ranges; 8f2b54824b28ba Mihail Chindris 2021-12-13 786 } else { 8f2b54824b28ba Mihail Chindris 2021-12-13 787 len = ARRAY_SIZE(ad3552r_ch_ranges); 8f2b54824b28ba Mihail Chindris 2021-12-13 788 ranges = ad3552r_ch_ranges; 8f2b54824b28ba Mihail Chindris 2021-12-13 789 } 8f2b54824b28ba Mihail Chindris 2021-12-13 790 8f2b54824b28ba Mihail Chindris 2021-12-13 791 for (i = 0; i < len; i++) 8f2b54824b28ba Mihail Chindris 2021-12-13 792 if (vals[0] == ranges[i][0] * 1000 && 8f2b54824b28ba Mihail Chindris 2021-12-13 793 vals[1] == ranges[i][1] * 1000) 8f2b54824b28ba Mihail Chindris 2021-12-13 794 return i; 8f2b54824b28ba Mihail Chindris 2021-12-13 795 8f2b54824b28ba Mihail Chindris 2021-12-13 796 return -EINVAL; 8f2b54824b28ba Mihail Chindris 2021-12-13 797 } 8f2b54824b28ba Mihail Chindris 2021-12-13 798 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
