Re: [PATCH 4/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.
by kernel test robot
Hi Vitaly,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on sound/for-next]
[also build test WARNING on next-20210312]
[cannot apply to v5.12-rc2]
[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/Vitaly-Rodionov/ALSA-hda-cirrus-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: microblaze-randconfig-m031-20210312 (attached as .config)
compiler: microblaze-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>
New smatch warnings:
sound/pci/hda/patch_cirrus.c:2143 cs8409_cs42l42_fixups() warn: always true condition '(caps >= 0) => (0-u32max >= 0)'
Old smatch warnings:
sound/pci/hda/patch_cirrus.c:2150 cs8409_cs42l42_fixups() warn: always true condition '(caps >= 0) => (0-u32max >= 0)'
sound/pci/hda/patch_cirrus.c:2156 cs8409_cs42l42_fixups() warn: always true condition '(caps >= 0) => (0-u32max >= 0)'
sound/pci/hda/patch_cirrus.c:2161 cs8409_cs42l42_fixups() warn: always true condition '(caps >= 0) => (0-u32max >= 0)'
vim +2143 sound/pci/hda/patch_cirrus.c
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2098
89b3eea4b1e18f Stefan Binding 2021-03-12 2099 static void cs8409_cs42l42_fixups(struct hda_codec *codec,
89b3eea4b1e18f Stefan Binding 2021-03-12 2100 const struct hda_fixup *fix, int action)
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2101 {
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2102 struct cs_spec *spec = codec->spec;
76e2b57d1d60d1 Stefan Binding 2021-03-12 2103 unsigned int caps;
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2104
89b3eea4b1e18f Stefan Binding 2021-03-12 2105 switch (action) {
89b3eea4b1e18f Stefan Binding 2021-03-12 2106 case HDA_FIXUP_ACT_PRE_PROBE:
89b3eea4b1e18f Stefan Binding 2021-03-12 2107 snd_hda_add_verbs(codec, cs8409_cs42l42_init_verbs);
89b3eea4b1e18f Stefan Binding 2021-03-12 2108 /* verb exec op override */
89b3eea4b1e18f Stefan Binding 2021-03-12 2109 spec->exec_verb = codec->core.exec_verb;
89b3eea4b1e18f Stefan Binding 2021-03-12 2110 codec->core.exec_verb = cs8409_cs42l42_exec_verb;
89b3eea4b1e18f Stefan Binding 2021-03-12 2111
89b3eea4b1e18f Stefan Binding 2021-03-12 2112 mutex_init(&spec->cs8409_i2c_mux);
89b3eea4b1e18f Stefan Binding 2021-03-12 2113
89b3eea4b1e18f Stefan Binding 2021-03-12 2114 codec->patch_ops = cs8409_cs42l42_patch_ops;
89b3eea4b1e18f Stefan Binding 2021-03-12 2115
89b3eea4b1e18f Stefan Binding 2021-03-12 2116 spec->gen.suppress_auto_mute = 1;
89b3eea4b1e18f Stefan Binding 2021-03-12 2117 spec->gen.no_primary_hp = 1;
89b3eea4b1e18f Stefan Binding 2021-03-12 2118 spec->gen.suppress_vmaster = 1;
89b3eea4b1e18f Stefan Binding 2021-03-12 2119
89b3eea4b1e18f Stefan Binding 2021-03-12 2120 /* GPIO 5 out, 3,4 in */
89b3eea4b1e18f Stefan Binding 2021-03-12 2121 spec->gpio_dir = GPIO5_INT;
89b3eea4b1e18f Stefan Binding 2021-03-12 2122 spec->gpio_data = 0;
89b3eea4b1e18f Stefan Binding 2021-03-12 2123 spec->gpio_mask = 0x03f;
89b3eea4b1e18f Stefan Binding 2021-03-12 2124
89b3eea4b1e18f Stefan Binding 2021-03-12 2125 spec->cs42l42_hp_jack_in = 0;
89b3eea4b1e18f Stefan Binding 2021-03-12 2126 spec->cs42l42_mic_jack_in = 0;
89b3eea4b1e18f Stefan Binding 2021-03-12 2127
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2128 /* Basic initial sequence for specific hw configuration */
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2129 snd_hda_sequence_write(codec, cs8409_cs42l42_init_verbs);
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2130
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2131 /* CS8409 is simple HDA bridge and intended to be used with a remote
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2132 * companion codec. Most of input/output PIN(s) have only basic
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2133 * capabilities. NID(s) 0x24 and 0x34 have only OUTC and INC
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2134 * capabilities and no presence detect capable (PDC) and call to
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2135 * snd_hda_gen_build_controls() will mark them as non detectable
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2136 * phantom jacks. However, in this configuration companion codec
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2137 * CS42L42 is connected to these pins and it has jack detect
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2138 * capabilities. We have to override pin capabilities,
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2139 * otherwise they will not be created as input devices.
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2140 */
76e2b57d1d60d1 Stefan Binding 2021-03-12 2141 caps = snd_hdac_read_parm(&codec->core, CS8409_CS42L42_HP_PIN_NID,
76e2b57d1d60d1 Stefan Binding 2021-03-12 2142 AC_PAR_PIN_CAP);
76e2b57d1d60d1 Stefan Binding 2021-03-12 @2143 if (caps >= 0)
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2144 snd_hdac_override_parm(&codec->core,
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2145 CS8409_CS42L42_HP_PIN_NID, AC_PAR_PIN_CAP,
76e2b57d1d60d1 Stefan Binding 2021-03-12 2146 (caps | (AC_PINCAP_IMP_SENSE | AC_PINCAP_PRES_DETECT)));
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2147
76e2b57d1d60d1 Stefan Binding 2021-03-12 2148 caps = snd_hdac_read_parm(&codec->core, CS8409_CS42L42_AMIC_PIN_NID,
76e2b57d1d60d1 Stefan Binding 2021-03-12 2149 AC_PAR_PIN_CAP);
76e2b57d1d60d1 Stefan Binding 2021-03-12 2150 if (caps >= 0)
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2151 snd_hdac_override_parm(&codec->core,
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2152 CS8409_CS42L42_AMIC_PIN_NID, AC_PAR_PIN_CAP,
76e2b57d1d60d1 Stefan Binding 2021-03-12 2153 (caps | (AC_PINCAP_IMP_SENSE | AC_PINCAP_PRES_DETECT)));
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2154
76e2b57d1d60d1 Stefan Binding 2021-03-12 2155 caps = get_wcaps(codec, CS8409_CS42L42_HP_PIN_NID);
76e2b57d1d60d1 Stefan Binding 2021-03-12 2156 if (caps >= 0)
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2157 snd_hda_override_wcaps(codec, CS8409_CS42L42_HP_PIN_NID,
76e2b57d1d60d1 Stefan Binding 2021-03-12 2158 (caps | AC_WCAP_UNSOL_CAP));
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2159
76e2b57d1d60d1 Stefan Binding 2021-03-12 2160 caps = get_wcaps(codec, CS8409_CS42L42_AMIC_PIN_NID);
76e2b57d1d60d1 Stefan Binding 2021-03-12 2161 if (caps >= 0)
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2162 snd_hda_override_wcaps(codec, CS8409_CS42L42_AMIC_PIN_NID,
76e2b57d1d60d1 Stefan Binding 2021-03-12 2163 (caps | AC_WCAP_UNSOL_CAP));
89b3eea4b1e18f Stefan Binding 2021-03-12 2164 break;
89b3eea4b1e18f Stefan Binding 2021-03-12 2165 case HDA_FIXUP_ACT_PROBE:
89b3eea4b1e18f Stefan Binding 2021-03-12 2166 snd_hda_gen_add_kctl(&spec->gen,
89b3eea4b1e18f Stefan Binding 2021-03-12 2167 NULL, &cs8409_cs42l42_hp_volume_mixer);
89b3eea4b1e18f Stefan Binding 2021-03-12 2168 snd_hda_gen_add_kctl(&spec->gen,
89b3eea4b1e18f Stefan Binding 2021-03-12 2169 NULL, &cs8409_cs42l42_amic_volume_mixer);
89b3eea4b1e18f Stefan Binding 2021-03-12 2170 cs8409_cs42l42_hw_init(codec);
89b3eea4b1e18f Stefan Binding 2021-03-12 2171 snd_hda_codec_set_name(codec, "CS8409/CS42L42");
89b3eea4b1e18f Stefan Binding 2021-03-12 2172 break;
89b3eea4b1e18f Stefan Binding 2021-03-12 2173 case HDA_FIXUP_ACT_INIT:
89b3eea4b1e18f Stefan Binding 2021-03-12 2174 cs8409_cs42l42_hw_init(codec);
89b3eea4b1e18f Stefan Binding 2021-03-12 2175 // Fall through
89b3eea4b1e18f Stefan Binding 2021-03-12 2176 case HDA_FIXUP_ACT_BUILD:
89b3eea4b1e18f Stefan Binding 2021-03-12 2177 /* Run jack auto detect first time on boot
89b3eea4b1e18f Stefan Binding 2021-03-12 2178 * after controls have been added, to check if jack has
89b3eea4b1e18f Stefan Binding 2021-03-12 2179 * been already plugged in.
89b3eea4b1e18f Stefan Binding 2021-03-12 2180 * Run immediately after init.
89b3eea4b1e18f Stefan Binding 2021-03-12 2181 */
89b3eea4b1e18f Stefan Binding 2021-03-12 2182 cs8409_cs42l42_run_jack_detect(codec);
89b3eea4b1e18f Stefan Binding 2021-03-12 2183 usleep_range(100000, 150000);
89b3eea4b1e18f Stefan Binding 2021-03-12 2184 break;
89b3eea4b1e18f Stefan Binding 2021-03-12 2185 default:
89b3eea4b1e18f Stefan Binding 2021-03-12 2186 break;
89b3eea4b1e18f Stefan Binding 2021-03-12 2187 }
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2188 }
6cc7e93f46a5ce Vitaly Rodionov 2021-03-06 2189
---
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 2778/3213] arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b01d57bfdc41c8f635b08b8a5af8a31217d46936
commit: 3c583493688a0a1276f6a8c0bbc5ece84e77f086 [2778/3213] x86/vmemmap: handle unpopulated sub-pmd ranges
config: x86_64-randconfig-s022-20210309 (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://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 3c583493688a0a1276f6a8c0bbc5ece84e77f086
# 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>
All errors (new ones prefixed by >>):
arch/x86/mm/init_64.c: In function 'vmemmap_populate_hugepages':
>> arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' [-Werror=implicit-function-declaration]
1583 | vmemmap_use_new_sub_pmd(addr, next);
| ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/mm/init_64.c:1589:4: error: implicit declaration of function 'vmemmap_use_sub_pmd' [-Werror=implicit-function-declaration]
1589 | vmemmap_use_sub_pmd(addr, next);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/vmemmap_use_new_sub_pmd +1583 arch/x86/mm/init_64.c
1530
1531 static int __meminit vmemmap_populate_hugepages(unsigned long start,
1532 unsigned long end, int node, struct vmem_altmap *altmap)
1533 {
1534 unsigned long addr;
1535 unsigned long next;
1536 pgd_t *pgd;
1537 p4d_t *p4d;
1538 pud_t *pud;
1539 pmd_t *pmd;
1540
1541 for (addr = start; addr < end; addr = next) {
1542 next = pmd_addr_end(addr, end);
1543
1544 pgd = vmemmap_pgd_populate(addr, node);
1545 if (!pgd)
1546 return -ENOMEM;
1547
1548 p4d = vmemmap_p4d_populate(pgd, addr, node);
1549 if (!p4d)
1550 return -ENOMEM;
1551
1552 pud = vmemmap_pud_populate(p4d, addr, node);
1553 if (!pud)
1554 return -ENOMEM;
1555
1556 pmd = pmd_offset(pud, addr);
1557 if (pmd_none(*pmd)) {
1558 void *p;
1559
1560 p = vmemmap_alloc_block_buf(PMD_SIZE, node, altmap);
1561 if (p) {
1562 pte_t entry;
1563
1564 entry = pfn_pte(__pa(p) >> PAGE_SHIFT,
1565 PAGE_KERNEL_LARGE);
1566 set_pmd(pmd, __pmd(pte_val(entry)));
1567
1568 /* check to see if we have contiguous blocks */
1569 if (p_end != p || node_start != node) {
1570 if (p_start)
1571 pr_debug(" [%lx-%lx] PMD -> [%p-%p] on node %d\n",
1572 addr_start, addr_end-1, p_start, p_end-1, node_start);
1573 addr_start = addr;
1574 node_start = node;
1575 p_start = p;
1576 }
1577
1578 addr_end = addr + PMD_SIZE;
1579 p_end = p + PMD_SIZE;
1580
1581 if (!IS_ALIGNED(addr, PMD_SIZE) ||
1582 !IS_ALIGNED(next, PMD_SIZE))
> 1583 vmemmap_use_new_sub_pmd(addr, next);
1584 continue;
1585 } else if (altmap)
1586 return -ENOMEM; /* no fallback */
1587 } else if (pmd_large(*pmd)) {
1588 vmemmap_verify((pte_t *)pmd, node, addr, next);
> 1589 vmemmap_use_sub_pmd(addr, next);
1590 continue;
1591 }
1592 if (vmemmap_populate_basepages(addr, next, node, NULL))
1593 return -ENOMEM;
1594 }
1595 return 0;
1596 }
1597
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
drivers/pci/controller/dwc/pci-keystone.c:1127:34: warning: unused variable 'ks_pcie_of_match'
by kernel test robot
Hi Alex,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 344178334b0971a1ad5f36b76d7b739400e46ec6
commit: 476b70b4d1adff4465e9ff68021c52858555ac28 PCI: keystone: Enable compile-testing on !ARM
date: 4 months ago
config: x86_64-randconfig-a012-20210313 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7b153b43d3a14d76975039408c4b922beb576735)
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/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 476b70b4d1adff4465e9ff68021c52858555ac28
# 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/pci/controller/dwc/pci-keystone.c:1127:34: warning: unused variable 'ks_pcie_of_match' [-Wunused-const-variable]
static const struct of_device_id ks_pcie_of_match[] = {
^
1 warning generated.
vim +/ks_pcie_of_match +1127 drivers/pci/controller/dwc/pci-keystone.c
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1126
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 @1127 static const struct of_device_id ks_pcie_of_match[] = {
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1128 {
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1129 .type = "pci",
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1130 .data = &ks_pcie_rc_of_data,
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1131 .compatible = "ti,keystone-pcie",
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1132 },
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1133 {
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1134 .data = &ks_pcie_am654_rc_of_data,
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1135 .compatible = "ti,am654-pcie-rc",
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1136 },
23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1137 {
23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1138 .data = &ks_pcie_am654_ep_of_data,
23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1139 .compatible = "ti,am654-pcie-ep",
23284ad677a94f Kishon Vijay Abraham I 2019-03-25 1140 },
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1141 { },
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1142 };
18b0415bc802a8 Kishon Vijay Abraham I 2019-03-25 1143
:::::: The code at line 1127 was first introduced by commit
:::::: 18b0415bc802a8bab5dedba5ae2757e83259e6ee PCI: keystone: Add support for PCIe RC in AM654x Platforms
:::::: TO: Kishon Vijay Abraham I <kishon(a)ti.com>
:::::: CC: Lorenzo Pieralisi <lorenzo.pieralisi(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
[kas:kvm-unmapped-poison 7/7] arch/s390/kvm/../../../virt/kvm/kvm_main.c:2809:8: error: implicit declaration of function 'TestClearPageHWPoison'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git kvm-unmapped-poison
head: 51d4d402256b9c1b8e38be95bfa2bb28dc8189ad
commit: 51d4d402256b9c1b8e38be95bfa2bb28dc8189ad [7/7] KVM: unmap guest memory with poison
config: s390-randconfig-r011-20210312 (attached as .config)
compiler: s390-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/kas/linux.git/commit/?id=...
git remote add kas https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git
git fetch --no-tags kas kvm-unmapped-poison
git checkout 51d4d402256b9c1b8e38be95bfa2bb28dc8189ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
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/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_share_memory':
>> arch/s390/kvm/../../../virt/kvm/kvm_main.c:2809:8: error: implicit declaration of function 'TestClearPageHWPoison'; did you mean 'ClearPageHWPoison'? [-Werror=implicit-function-declaration]
2809 | if (!TestClearPageHWPoison(page))
| ^~~~~~~~~~~~~~~~~~~~~
| ClearPageHWPoison
cc1: some warnings being treated as errors
vim +2809 arch/s390/kvm/../../../virt/kvm/kvm_main.c
2780
2781 int kvm_share_memory(struct kvm *kvm, unsigned long gfn, unsigned long npages)
2782 {
2783 unsigned long end = gfn + npages;
2784
2785 if (!npages)
2786 return 0;
2787
2788 /*
2789 * Out of slots.
2790 * Still worth to proceed: the new range may merge with an existing
2791 * one.
2792 */
2793 WARN_ON_ONCE(nr_shared_ranges == ARRAY_SIZE(shared_ranges));
2794
2795 if (mmap_write_lock_killable(kvm->mm))
2796 return -KVM_EINTR;
2797 nr_shared_ranges = add_range_with_merge(shared_ranges,
2798 ARRAY_SIZE(shared_ranges),
2799 nr_shared_ranges, gfn, end);
2800 nr_shared_ranges = clean_sort_range(shared_ranges,
2801 ARRAY_SIZE(shared_ranges));
2802 mmap_write_unlock(kvm->mm);
2803
2804 for (; gfn < end; gfn++) {
2805 struct page *page = gfn_to_page(kvm, gfn);
2806
2807 if (page == KVM_ERR_PTR_BAD_PAGE)
2808 continue;
> 2809 if (!TestClearPageHWPoison(page))
2810 continue;
2811 lock_page(page);
2812 remove_migration_ptes(page, page, false);
2813 unlock_page(page);
2814 put_page(page);
2815 }
2816
2817 return 0;
2818 }
2819
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[morse:mpam/resctrl_merge_cdp/v2 20/24] arch/x86/kernel/cpu/resctrl/ctrlmondata.c:315:17: warning: use of unary operator that may be intended as compound assignment (+=)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/resctrl_merge_cdp/v2
head: e37b40a07b6b4fbcf573c03dcdf303a82edceeb1
commit: 675bc0dd2e66e0e4ff54ac72a5d020a94ad9931e [20/24] x86/resctrl: Apply offset correction when config is staged
config: x86_64-randconfig-a003-20210312 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7b153b43d3a14d76975039408c4b922beb576735)
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/morse/linux.git/commit/?i...
git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
git fetch --no-tags morse mpam/resctrl_merge_cdp/v2
git checkout 675bc0dd2e66e0e4ff54ac72a5d020a94ad9931e
# 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 >>):
>> arch/x86/kernel/cpu/resctrl/ctrlmondata.c:315:17: warning: use of unary operator that may be intended as compound assignment (+=)
msr_param.high =+ 1;
^~
1 warning generated.
vim +315 arch/x86/kernel/cpu/resctrl/ctrlmondata.c
273
274 int resctrl_arch_update_domains(struct rdt_resource *r, u32 closid)
275 {
276 struct resctrl_staged_config *cfg;
277 struct rdt_hw_domain *hw_dom;
278 bool msr_param_init = false;
279 struct msr_param msr_param;
280 enum resctrl_conf_type t;
281 cpumask_var_t cpu_mask;
282 struct rdt_domain *d;
283 bool mba_sc;
284 int cpu;
285 u32 idx;
286
287 if (!zalloc_cpumask_var(&cpu_mask, GFP_KERNEL))
288 return -ENOMEM;
289
290 msr_param.res = r;
291
292 mba_sc = is_mba_sc(r);
293 list_for_each_entry(d, &r->domains, list) {
294 hw_dom = resctrl_to_arch_dom(d);
295 for (t = 0; t < CDP_NUM_TYPES; t++) {
296 cfg = &hw_dom->resctrl.staged_config[t];
297 if (!cfg->have_new_ctrl)
298 continue;
299
300 idx = cbm_idx(r, closid);
301 if (!apply_config(hw_dom, cfg, idx, cpu_mask, mba_sc))
302 continue;
303
304 if (!msr_param_init) {
305 msr_param.low = idx;
306 msr_param.high = idx;
307 msr_param_init = true;
308 } else {
309 msr_param.low = min(msr_param.low, idx);
310 msr_param.high = max(msr_param.high, idx);
311 }
312 }
313 }
314
> 315 msr_param.high =+ 1;
316
317 /*
318 * Avoid writing the control msr with control values when
319 * MBA software controller is enabled
320 */
321 if (cpumask_empty(cpu_mask) || mba_sc)
322 goto done;
323 cpu = get_cpu();
324 /* Update resource control msr on this CPU if it's in cpu_mask. */
325 if (cpumask_test_cpu(cpu, cpu_mask))
326 rdt_ctrl_update(&msr_param);
327 /* Update resource control msr on other CPUs. */
328 smp_call_function_many(cpu_mask, rdt_ctrl_update, &msr_param, 1);
329 put_cpu();
330
331 done:
332 free_cpumask_var(cpu_mask);
333
334 return 0;
335 }
336
---
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 2159/4141] drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c:34 mlx5_dm_create() warn: should '(((1))) << + (($expr_0x7fbd58df5790(30)) / 32))))) >> (32 - 8 - (($expr_0x7fbd58df5d30(30)) & 31))) & (((1 << 8) - 1))) - (...
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d98f554b318f57ded14684c04b3337a1975cf490
commit: 960984d964a9341cf50bf2b4ffdf0beb14467517 [2159/4141] include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
config: i386-randconfig-m021-20210312 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c:34 mlx5_dm_create() warn: should '(((1))) << (((__builtin_bswap32(((*((dev->caps.hca_cur[15]) + (($expr_0x7fbd58df5790(30)) / 32))))) >> (32 - 8 - (($expr_0x7fbd58df5d30(30)) & 31))) & (((1 << 8) - 1))) - (((__builtin_bswap32(((*((dev->caps.hca_cur[15]) + (($expr_0x7fbd58df6af0(30)) / 32))))) >> (32 - 6 - (($expr_0x7fbd58df7090(30)) & 31))) & (((1 << 6) - 1)))))' be a 64 bit type?
Old smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c:46 mlx5_dm_create() warn: should '(((1))) << (((__builtin_bswap32(((*((dev->caps.hca_cur[15]) + (($expr_0x7fbd58df9610(30)) / 32))))) >> (32 - 8 - (($expr_0x7fbd58df9bb0(30)) & 31))) & (((1 << 8) - 1))) - (((__builtin_bswap32(((*((dev->caps.hca_cur[15]) + (($expr_0x7fbd58dfa970(30)) / 32))))) >> (32 - 6 - (($expr_0x7fbd58dfaf10(30)) & 31))) & (((1 << 6) - 1)))))' be a 64 bit type?
vim +34 drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 16
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 17 struct mlx5_dm *mlx5_dm_create(struct mlx5_core_dev *dev)
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 18 {
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 19 u64 header_modify_icm_blocks = 0;
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 20 u64 steering_icm_blocks = 0;
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 21 struct mlx5_dm *dm;
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 22
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 23 if (!(MLX5_CAP_GEN_64(dev, general_obj_types) & MLX5_GENERAL_OBJ_TYPES_CAP_SW_ICM))
586ee9e8a3b007 Saeed Mahameed 2020-01-22 24 return NULL;
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 25
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 26 dm = kzalloc(sizeof(*dm), GFP_KERNEL);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 27 if (!dm)
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 28 return ERR_PTR(-ENOMEM);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 29
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 30 spin_lock_init(&dm->lock);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 31
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 32 if (MLX5_CAP64_DEV_MEM(dev, steering_sw_icm_start_address)) {
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 33 steering_icm_blocks =
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 @34 BIT(MLX5_CAP_DEV_MEM(dev, log_steering_sw_icm_size) -
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 35 MLX5_LOG_SW_ICM_BLOCK_SIZE(dev));
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 36
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 37 dm->steering_sw_icm_alloc_blocks =
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 38 kcalloc(BITS_TO_LONGS(steering_icm_blocks),
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 39 sizeof(unsigned long), GFP_KERNEL);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 40 if (!dm->steering_sw_icm_alloc_blocks)
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 41 goto err_steering;
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 42 }
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 43
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 44 if (MLX5_CAP64_DEV_MEM(dev, header_modify_sw_icm_start_address)) {
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 45 header_modify_icm_blocks =
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 46 BIT(MLX5_CAP_DEV_MEM(dev, log_header_modify_sw_icm_size) -
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 47 MLX5_LOG_SW_ICM_BLOCK_SIZE(dev));
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 48
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 49 dm->header_modify_sw_icm_alloc_blocks =
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 50 kcalloc(BITS_TO_LONGS(header_modify_icm_blocks),
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 51 sizeof(unsigned long), GFP_KERNEL);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 52 if (!dm->header_modify_sw_icm_alloc_blocks)
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 53 goto err_modify_hdr;
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 54 }
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 55
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 56 return dm;
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 57
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 58 err_modify_hdr:
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 59 kfree(dm->steering_sw_icm_alloc_blocks);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 60
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 61 err_steering:
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 62 kfree(dm);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 63
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 64 return ERR_PTR(-ENOMEM);
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 65 }
c9b9dcb430b3cd Ariel Levkovich 2019-08-29 66
:::::: The code at line 34 was first introduced by commit
:::::: c9b9dcb430b3cd0ad2b04c360c4e528d73430481 net/mlx5: Move device memory management to mlx5_core
:::::: TO: Ariel Levkovich <lariel(a)mellanox.com>
:::::: CC: Saeed Mahameed <saeedm(a)mellanox.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-nvme:nvme-5.12 7/9] drivers/nvme/host/core.c:4100 nvme_validate_or_alloc_ns() error: we previously assumed 'ns' could be null (see line 4082)
by kernel test robot
tree: git://git.infradead.org/nvme.git nvme-5.12
head: abbb5f5929ec6c52574c430c5475c158a65c2a8c
commit: 0ec84df4953bd42c6583a555773f1d4996a061eb [7/9] nvme-core: check ctrl css before setting up zns
config: i386-randconfig-m021-20210312 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/nvme/host/core.c:4100 nvme_validate_or_alloc_ns() error: we previously assumed 'ns' could be null (see line 4082)
Old smatch warnings:
drivers/nvme/host/core.c:692 nvme_configure_directives() warn: missing error code 'ret'
drivers/nvme/host/core.c:788 nvme_setup_discard() warn: possible memory leak of 'range'
vim +/ns +4100 drivers/nvme/host/core.c
4072
4073 static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
4074 {
4075 struct nvme_ns_ids ids = { };
4076 struct nvme_ns *ns;
4077
4078 if (nvme_identify_ns_descs(ctrl, nsid, &ids))
4079 return;
4080
4081 ns = nvme_find_get_ns(ctrl, nsid);
> 4082 if (ns) {
4083 nvme_validate_ns(ns, &ids);
4084 nvme_put_ns(ns);
4085 return;
4086 }
4087
4088 switch (ids.csi) {
4089 case NVME_CSI_NVM:
4090 nvme_alloc_ns(ctrl, nsid, &ids);
4091 break;
4092 case NVME_CSI_ZNS:
4093 if (!IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
4094 dev_warn(ctrl->device,
4095 "nsid %u not supported without CONFIG_BLK_DEV_ZONED\n",
4096 nsid);
4097 break;
4098 }
4099 if (!nvme_multi_css(ctrl)) {
> 4100 dev_warn(ctrl->device,
4101 "command set not reported for nsid: %d\n",
4102 ns->head->ns_id);
4103 break;
4104 }
4105 nvme_alloc_ns(ctrl, nsid, &ids);
4106 break;
4107 default:
4108 dev_warn(ctrl->device, "unknown csi %u for nsid %u\n",
4109 ids.csi, nsid);
4110 break;
4111 }
4112 }
4113
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months