drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c:121 iwl_mvm_ftm_responder_cmd() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c
commit: 20578872d503d5c211bdf334185ccd8afe4ae697 iwlwifi: mvm: responder: support responder config command version 8
date: 3 months ago
config: x86_64-randconfig-m001-20210720 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c:121 iwl_mvm_ftm_responder_cmd() warn: inconsistent indenting
vim +121 drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c
95
96 static int
97 iwl_mvm_ftm_responder_cmd(struct iwl_mvm *mvm,
98 struct ieee80211_vif *vif,
99 struct cfg80211_chan_def *chandef)
100 {
101 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
102 /*
103 * The command structure is the same for versions 6, 7 and 8 (only the
104 * field interpretation is different), so the same struct can be use
105 * for all cases.
106 */
107 struct iwl_tof_responder_config_cmd_v8 cmd = {
108 .channel_num = chandef->chan->hw_value,
109 .cmd_valid_fields =
110 cpu_to_le32(IWL_TOF_RESPONDER_CMD_VALID_CHAN_INFO |
111 IWL_TOF_RESPONDER_CMD_VALID_BSSID |
112 IWL_TOF_RESPONDER_CMD_VALID_STA_ID),
113 .sta_id = mvmvif->bcast_sta.sta_id,
114 };
115 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, LOCATION_GROUP,
116 TOF_RESPONDER_CONFIG_CMD, 6);
117 int err;
118
119 lockdep_assert_held(&mvm->mutex);
120
> 121 if (cmd_ver == 8)
122 iwl_mvm_ftm_responder_set_ndp(mvm, &cmd);
123
124 if (cmd_ver >= 7)
125 err = iwl_mvm_ftm_responder_set_bw_v2(chandef, &cmd.format_bw,
126 &cmd.ctrl_ch_position);
127 else
128 err = iwl_mvm_ftm_responder_set_bw_v1(chandef, &cmd.format_bw,
129 &cmd.ctrl_ch_position);
130
131 if (err) {
132 IWL_ERR(mvm, "Failed to set responder bandwidth\n");
133 return err;
134 }
135
136 memcpy(cmd.bssid, vif->addr, ETH_ALEN);
137
138 return iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(TOF_RESPONDER_CONFIG_CMD,
139 LOCATION_GROUP, 0),
140 0, sizeof(cmd), &cmd);
141 }
142
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[linux-chenxing:mstar_v5_14_rebase 128/352] drivers/phy/phy-msc313-usb.c:199:2: warning: ignoring return value of 'regulator_enable' declared with attribute 'warn_unused_result'
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase
head: 651efd0e52f225e60faa8b30f9768021e2104d3c
commit: 0bf5e94a6db2b88cfa3e5ac8ed9c2c237f6c03c9 [128/352] phy: msc313: usb: add vbus support
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.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/linux-chenxing/linux/commit/0bf5e94a6db2b88cfa3e5ac8ed...
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing mstar_v5_14_rebase
git checkout 0bf5e94a6db2b88cfa3e5ac8ed9c2c237f6c03c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.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 >>):
drivers/phy/phy-msc313-usb.c: In function 'msc313_usb_phy_probe':
drivers/phy/phy-msc313-usb.c:159:3: warning: ignoring return value of 'devm_request_irq' declared with attribute 'warn_unused_result' [-Wunused-result]
159 | devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160 | dev_name(&pdev->dev), msc313_usb_phy);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/phy/phy-msc313-usb.c:199:2: warning: ignoring return value of 'regulator_enable' declared with attribute 'warn_unused_result' [-Wunused-result]
199 | regulator_enable(msc313_usb_phy->vbus);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/phy/phy-msc313-usb.c:15:
At top level:
include/linux/usb/mstar_utmi.h:80:25: warning: 'mstar_utmi_pwrctrl_pwrdwn_field' defined but not used [-Wunused-variable]
80 | static struct reg_field mstar_utmi_pwrctrl_pwrdwn_field = REG_FIELD(REG_PWRCTRL, PWRCTRL_REG_PDN, PWRCTRL_REG_PDN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +199 drivers/phy/phy-msc313-usb.c
104
105 static int msc313_usb_phy_probe(struct platform_device *pdev)
106 {
107 struct device *dev = &pdev->dev;
108 struct phy_provider *phy_provider;
109 struct msc313_usb_phy *msc313_usb_phy;
110 int i, irq;
111 bool swap;
112
113 msc313_usb_phy = devm_kzalloc(dev, sizeof(*msc313_usb_phy), GFP_KERNEL);
114 if (!msc313_usb_phy)
115 return -ENOMEM;
116
117 msc313_usb_phy->dev = dev;
118
119 msc313_usb_phy->utmi = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,utmi");
120 if(IS_ERR(msc313_usb_phy->utmi)){
121 return PTR_ERR(msc313_usb_phy->utmi);
122 }
123
124 msc313_usb_phy->usbc = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,usbc");
125 if (IS_ERR(msc313_usb_phy->usbc))
126 return PTR_ERR(msc313_usb_phy->usbc);
127
128 irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
129 if (!irq){
130 dev_warn(&pdev->dev, "no interrupt provided");
131 }
132
133 // hack for m5, these seem to be the reset values for i3
134 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_RSTCTRL,
135 0x228);
136 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST1,
137 0x2088);
138 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST0,
139 0x8051);
140 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CONFIG,
141 0x2084);
142
143 //FIXME for some reason this doesn't update the registers.
144 // some voodoo that is enabled for the msc313 in the vendor sdk
145 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG0,
146 0x0);
147 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG1,
148 0xffff);
149 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG2,
150 BIT(8) | 0xff);
151
152 // clear any existing interrupts and then enable
153 // the interrupt
154 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTEN,
155 MSTAR_USBC_INT_MASK);
156 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTSTS,
157 MSTAR_USBC_INT_MASK);
158 if(irq){
159 devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
160 dev_name(&pdev->dev), msc313_usb_phy);
161 }
162
163 // power up hacks
164 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0c2f);
165 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x040f);
166 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x7f05);
167
168 msc313_usb_phy_switch_port(msc313_usb_phy);
169
170 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0426);
171 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x6bc3);
172 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x69c3);
173 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x0001);
174
175 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING1, 0x0210);
176 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING2, 0x8100);
177
178
179 msc313_usb_phy_do_calibration(msc313_usb_phy);
180
181 swap = of_property_read_bool(dev->of_node, "mstar,utmi-dxswap");
182
183 if(swap)
184 dev_info(dev, "enabling data line swap");
185 regmap_update_bits(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CLKINV,
186 MSTAR_UTMI_REG_CLKINV_DPDNSWP, swap ? MSTAR_UTMI_REG_CLKINV_DPDNSWP : 0);
187
188 //regmap_update_bits(msc313_usb_phy->regmap, REG_PWRCTRL, PWRCTRL_UPLL_PDN, 0);
189
190 for(i = 0; i < NUM_PORTS; i++){
191 msc313_usb_phy->ports[i] = devm_phy_create(dev, NULL, &msc313_usb_phy_ops);
192 if (IS_ERR(msc313_usb_phy->ports[i])) {
193 return PTR_ERR(msc313_usb_phy->ports[i]);
194 }
195 phy_set_drvdata(msc313_usb_phy->ports[i], msc313_usb_phy);
196 }
197
198 msc313_usb_phy->vbus = devm_regulator_get(dev, "vbus");
> 199 regulator_enable(msc313_usb_phy->vbus);
200
201 dev_set_drvdata(dev, msc313_usb_phy);
202
203 phy_provider = devm_of_phy_provider_register(&pdev->dev,
204 msc313_usb_phy_xlate);
205 return PTR_ERR_OR_ZERO(phy_provider);
206 }
207
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[arnd-playground:compat-alloc-user-space-10 1/40] kernel/kexec.c:274:52: sparse: sparse: incorrect type in argument 3 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git compat-alloc-user-space-10
head: 58da7172523fefac0902591b73596ce2b21e5038
commit: 5357a3311b528fbd96e088885c5c17a5ce670ad7 [1/40] kexec: avoid compat_alloc_user_space
config: i386-randconfig-s002-20210720 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground compat-alloc-user-space-10
git checkout 5357a3311b528fbd96e088885c5c17a5ce670ad7
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/kexec.c:274:52: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct kexec_segment *segments @@ got struct kexec_segment [noderef] __user *segments @@
kernel/kexec.c:274:52: sparse: expected struct kexec_segment *segments
kernel/kexec.c:274:52: sparse: got struct kexec_segment [noderef] __user *segments
vim +274 kernel/kexec.c
6b27aef09fea32 Dominik Brodowski 2018-03-17 254
6b27aef09fea32 Dominik Brodowski 2018-03-17 255 SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
6b27aef09fea32 Dominik Brodowski 2018-03-17 256 struct kexec_segment __user *, segments, unsigned long, flags)
6b27aef09fea32 Dominik Brodowski 2018-03-17 257 {
5357a3311b528f Arnd Bergmann 2021-05-19 258 struct kexec_segment *ksegments;
5357a3311b528f Arnd Bergmann 2021-05-19 259 unsigned long bytes, result;
6b27aef09fea32 Dominik Brodowski 2018-03-17 260
6b27aef09fea32 Dominik Brodowski 2018-03-17 261 result = kexec_load_check(nr_segments, flags);
6b27aef09fea32 Dominik Brodowski 2018-03-17 262 if (result)
6b27aef09fea32 Dominik Brodowski 2018-03-17 263 return result;
6b27aef09fea32 Dominik Brodowski 2018-03-17 264
5357a3311b528f Arnd Bergmann 2021-05-19 265 bytes = nr_segments * sizeof(ksegments[0]);
5357a3311b528f Arnd Bergmann 2021-05-19 266 ksegments = kmalloc(bytes, GFP_KERNEL);
5357a3311b528f Arnd Bergmann 2021-05-19 267 if (!ksegments)
5357a3311b528f Arnd Bergmann 2021-05-19 268 return -ENOMEM;
6b27aef09fea32 Dominik Brodowski 2018-03-17 269
5357a3311b528f Arnd Bergmann 2021-05-19 270 result = copy_from_user(ksegments, segments, bytes);
5357a3311b528f Arnd Bergmann 2021-05-19 271 if (result)
5357a3311b528f Arnd Bergmann 2021-05-19 272 goto fail;
72414d3f1d22fc Maneesh Soni 2005-06-25 273
0eea08678ebe9f Minfei Huang 2016-05-23 @274 result = do_kexec_load(entry, nr_segments, segments, flags);
9b492cf58077a0 Xunlei Pang 2016-05-23 275
5357a3311b528f Arnd Bergmann 2021-05-19 276 fail:
5357a3311b528f Arnd Bergmann 2021-05-19 277 kfree(ksegments);
dc009d92435f99 Eric W. Biederman 2005-06-25 278 return result;
dc009d92435f99 Eric W. Biederman 2005-06-25 279 }
dc009d92435f99 Eric W. Biederman 2005-06-25 280
:::::: The code at line 274 was first introduced by commit
:::::: 0eea08678ebe9f7d8ef98fed974a5bf1a0dd2dd2 kexec: do a cleanup for function kexec_load
:::::: TO: Minfei Huang <mnfhuang(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [patch] v2 mm/slub: restore/expand unfreeze_partials() local exclusion scope
by kernel test robot
Hi Mike,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux-rt-devel/linux-5.13.y-rt-testing]
[cannot apply to hnaz-linux-mm/master linux/master linus/master v5.14-rc2 next-20210719]
[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/Mike-Galbraith/v2-mm-slub-restor...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.13.y-rt-testing
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/9398c1a5075cbaa4a610319cfceeab417...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mike-Galbraith/v2-mm-slub-restore-expand-unfreeze_partials-local-exclusion-scope/20210718-092133
git checkout 9398c1a5075cbaa4a610319cfceeab417d1f3e12
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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 >>):
In file included from arch/x86/include/asm/bug.h:84,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from mm/slub.c:13:
mm/slub.c: In function '__unfreeze_partials':
>> mm/slub.c:2428:54: error: 'local_lock_t' {aka 'struct <anonymous>'} has no member named 'lock'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^
include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON'
119 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
| ^~~~~~~~~~~~~~~
mm/slub.c:2428:3: note: in expansion of macro 'lockdep_assert_held'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:241:2: note: in expansion of macro '__verify_pcpu_ptr'
241 | __verify_pcpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
mm/slub.c:2428:23: note: in expansion of macro 'this_cpu_ptr'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^~~~~~~~~~~~
>> mm/slub.c:2428:54: error: 'local_lock_t' {aka 'struct <anonymous>'} has no member named 'lock'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^
include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON'
119 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
| ^~~~~~~~~~~~~~~
mm/slub.c:2428:3: note: in expansion of macro 'lockdep_assert_held'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
mm/slub.c:2428:23: note: in expansion of macro 'this_cpu_ptr'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^~~~~~~~~~~~
>> mm/slub.c:2428:54: error: 'local_lock_t' {aka 'struct <anonymous>'} has no member named 'lock'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^
include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON'
119 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
include/linux/lockdep.h:311:4: note: in expansion of macro 'lockdep_is_held'
311 | lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
| ^~~~~~~~~~~~~~~
mm/slub.c:2428:3: note: in expansion of macro 'lockdep_assert_held'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:242:2: note: in expansion of macro 'arch_raw_cpu_ptr'
242 | arch_raw_cpu_ptr(ptr); \
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
mm/slub.c:2428:23: note: in expansion of macro 'this_cpu_ptr'
2428 | lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
| ^~~~~~~~~~~~
vim +2428 mm/slub.c
2369
2370 #ifdef CONFIG_SLUB_CPU_PARTIAL
2371 static void __unfreeze_partials(struct kmem_cache *s, struct page *partial_page)
2372 {
2373 struct kmem_cache_node *n = NULL, *n2 = NULL;
2374 struct page *page, *discard_page = NULL;
2375 unsigned long flags = 0;
2376
2377 while (partial_page) {
2378 struct page new;
2379 struct page old;
2380
2381 page = partial_page;
2382 partial_page = page->next;
2383
2384 n2 = get_node(s, page_to_nid(page));
2385 if (n != n2) {
2386 if (n)
2387 spin_unlock_irqrestore(&n->list_lock, flags);
2388
2389 n = n2;
2390 spin_lock_irqsave(&n->list_lock, flags);
2391 }
2392
2393 do {
2394
2395 old.freelist = page->freelist;
2396 old.counters = page->counters;
2397 VM_BUG_ON(!old.frozen);
2398
2399 new.counters = old.counters;
2400 new.freelist = old.freelist;
2401
2402 new.frozen = 0;
2403
2404 } while (!__cmpxchg_double_slab(s, page,
2405 old.freelist, old.counters,
2406 new.freelist, new.counters,
2407 "unfreezing slab"));
2408
2409 if (unlikely(!new.inuse && n->nr_partial >= s->min_partial)) {
2410 page->next = discard_page;
2411 discard_page = page;
2412 } else {
2413 add_partial(n, page, DEACTIVATE_TO_TAIL);
2414 stat(s, FREE_ADD_PARTIAL);
2415 }
2416 }
2417
2418 if (n)
2419 spin_unlock_irqrestore(&n->list_lock, flags);
2420
2421 /*
2422 * If we got here via __slab_free() -> put_cpu_partial(),
2423 * memcg_free_page_obj_cgroups() ->kfree() may send us
2424 * back to __slab_free() -> put_cpu_partial() for an
2425 * unfortunate second encounter with cpu_slab->lock.
2426 */
2427 if (IS_ENABLED(CONFIG_PREEMPT_RT) && memcg_kmem_enabled()) {
> 2428 lockdep_assert_held(this_cpu_ptr(&s->cpu_slab->lock.lock));
2429 local_unlock(&s->cpu_slab->lock);
2430 }
2431
2432 while (discard_page) {
2433 page = discard_page;
2434 discard_page = discard_page->next;
2435
2436 stat(s, DEACTIVATE_EMPTY);
2437 discard_slab(s, page);
2438 stat(s, FREE_SLAB);
2439 }
2440
2441 if (IS_ENABLED(CONFIG_PREEMPT_RT) && memcg_kmem_enabled())
2442 local_lock(&s->cpu_slab->lock);
2443 }
2444
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[linux-chenxing:mstar_v5_14_rebase 266/352] s390-linux-ld: clk-msc313-mux.c:undefined reference to `clk_mux_determine_rate_flags'
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase
head: 651efd0e52f225e60faa8b30f9768021e2104d3c
commit: 74407bf8925da5c839bb1d99c26a932b859dd868 [266/352] clk: mux core: allow setting the mux
config: s390-randconfig-c003-20210719 (attached as .config)
compiler: s390-linux-gcc (GCC) 10.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/linux-chenxing/linux/commit/74407bf8925da5c839bb1d99c2...
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing mstar_v5_14_rebase
git checkout 74407bf8925da5c839bb1d99c26a932b859dd868
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash
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 >>):
s390-linux-ld: drivers/clk/mstar/clk-msc313-mux.o: in function `msc313_mux_deglitch_determine_rate':
clk-msc313-mux.c:(.text+0x1a8): undefined reference to `clk_hw_get_flags'
>> s390-linux-ld: clk-msc313-mux.c:(.text+0x1c0): undefined reference to `clk_mux_determine_rate_flags'
s390-linux-ld: drivers/clk/mstar/clk-msc313-mux.o: in function `msc313_mux_mux_determine_rate':
clk-msc313-mux.c:(.text+0x1e8): undefined reference to `clk_hw_get_flags'
s390-linux-ld: clk-msc313-mux.c:(.text+0x200): undefined reference to `clk_mux_determine_rate_flags'
s390-linux-ld: drivers/clk/mstar/clk-msc313-mux.o: in function `msc313_mux_register_muxes':
clk-msc313-mux.c:(.text+0x526): undefined reference to `devm_clk_hw_register'
s390-linux-ld: clk-msc313-mux.c:(.text+0x596): undefined reference to `devm_clk_hw_register'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[linux-chenxing:mstar_v5_14_rebase 127/352] drivers/phy/phy-msc313-usb.c:157:3: warning: ignoring return value of 'devm_request_irq' declared with attribute 'warn_unused_result'
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git mstar_v5_14_rebase
head: 651efd0e52f225e60faa8b30f9768021e2104d3c
commit: 9ee3ebbbe6937e1aa664962e61484a9dc6ed2523 [127/352] ARM:mstar: usb phy
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.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/linux-chenxing/linux/commit/9ee3ebbbe6937e1aa664962e61...
git remote add linux-chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags linux-chenxing mstar_v5_14_rebase
git checkout 9ee3ebbbe6937e1aa664962e61484a9dc6ed2523
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.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 >>):
drivers/phy/phy-msc313-usb.c: In function 'msc313_usb_phy_probe':
>> drivers/phy/phy-msc313-usb.c:157:3: warning: ignoring return value of 'devm_request_irq' declared with attribute 'warn_unused_result' [-Wunused-result]
157 | devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158 | dev_name(&pdev->dev), msc313_usb_phy);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/phy/phy-msc313-usb.c:15:
At top level:
include/linux/usb/mstar_utmi.h:80:25: warning: 'mstar_utmi_pwrctrl_pwrdwn_field' defined but not used [-Wunused-variable]
80 | static struct reg_field mstar_utmi_pwrctrl_pwrdwn_field = REG_FIELD(REG_PWRCTRL, PWRCTRL_REG_PDN, PWRCTRL_REG_PDN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +157 drivers/phy/phy-msc313-usb.c
102
103 static int msc313_usb_phy_probe(struct platform_device *pdev)
104 {
105 struct device *dev = &pdev->dev;
106 struct phy_provider *phy_provider;
107 struct msc313_usb_phy *msc313_usb_phy;
108 int i, irq;
109 bool swap;
110
111 msc313_usb_phy = devm_kzalloc(dev, sizeof(*msc313_usb_phy), GFP_KERNEL);
112 if (!msc313_usb_phy)
113 return -ENOMEM;
114
115 msc313_usb_phy->dev = dev;
116
117 msc313_usb_phy->utmi = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,utmi");
118 if(IS_ERR(msc313_usb_phy->utmi)){
119 return PTR_ERR(msc313_usb_phy->utmi);
120 }
121
122 msc313_usb_phy->usbc = syscon_regmap_lookup_by_phandle(dev->of_node, "mstar,usbc");
123 if (IS_ERR(msc313_usb_phy->usbc))
124 return PTR_ERR(msc313_usb_phy->usbc);
125
126 irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
127 if (!irq){
128 dev_warn(&pdev->dev, "no interrupt provided");
129 }
130
131 // hack for m5, these seem to be the reset values for i3
132 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_RSTCTRL,
133 0x228);
134 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST1,
135 0x2088);
136 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_PLL_TEST0,
137 0x8051);
138 regmap_write(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CONFIG,
139 0x2084);
140
141 //FIXME for some reason this doesn't update the registers.
142 // some voodoo that is enabled for the msc313 in the vendor sdk
143 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG0,
144 0x0);
145 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG1,
146 0xffff);
147 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_MIUCFG2,
148 BIT(8) | 0xff);
149
150 // clear any existing interrupts and then enable
151 // the interrupt
152 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTEN,
153 MSTAR_USBC_INT_MASK);
154 regmap_write(msc313_usb_phy->usbc, MSTAR_USBC_REG_INTSTS,
155 MSTAR_USBC_INT_MASK);
156 if(irq){
> 157 devm_request_irq(&pdev->dev, irq, msc313_usb_phy_irq, IRQF_SHARED,
158 dev_name(&pdev->dev), msc313_usb_phy);
159 }
160
161 // power up hacks
162 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0c2f);
163 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x040f);
164 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x7f05);
165
166 msc313_usb_phy_switch_port(msc313_usb_phy);
167
168 regmap_write(msc313_usb_phy->utmi, REG_CLKCTRL, 0x0426);
169 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x6bc3);
170 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x69c3);
171 regmap_write(msc313_usb_phy->utmi, REG_PWRCTRL, 0x0001);
172
173 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING1, 0x0210);
174 regmap_write(msc313_usb_phy->utmi, REG_EYESETTING2, 0x8100);
175
176
177 msc313_usb_phy_do_calibration(msc313_usb_phy);
178
179 swap = of_property_read_bool(dev->of_node, "mstar,utmi-dxswap");
180
181 if(swap)
182 dev_info(dev, "enabling data line swap");
183 regmap_update_bits(msc313_usb_phy->utmi, MSTAR_UTMI_REG_CLKINV,
184 MSTAR_UTMI_REG_CLKINV_DPDNSWP, swap ? MSTAR_UTMI_REG_CLKINV_DPDNSWP : 0);
185
186 //regmap_update_bits(msc313_usb_phy->regmap, REG_PWRCTRL, PWRCTRL_UPLL_PDN, 0);
187
188 for(i = 0; i < NUM_PORTS; i++){
189 msc313_usb_phy->ports[i] = devm_phy_create(dev, NULL, &msc313_usb_phy_ops);
190 if (IS_ERR(msc313_usb_phy->ports[i])) {
191 return PTR_ERR(msc313_usb_phy->ports[i]);
192 }
193 phy_set_drvdata(msc313_usb_phy->ports[i], msc313_usb_phy);
194 }
195
196 dev_set_drvdata(dev, msc313_usb_phy);
197
198 phy_provider = devm_of_phy_provider_register(&pdev->dev,
199 msc313_usb_phy_xlate);
200 return PTR_ERR_OR_ZERO(phy_provider);
201 }
202
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[android-goldfish:android-5.4 1/3] lib/test_printf.c:584:16: sparse: sparse: restricted gfp_t degrades to integer
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-5.4
head: bb34193d1edc2c8a5ac87ac59d8e410632fc092f
commit: b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac [1/3] ANDROID: GKI: cma: redirect page allocation to CMA
config: i386-randconfig-s002-20210720 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
git fetch --no-tags android-goldfish android-5.4
git checkout b9d3d8f1e991052edb89b0537b8f2e8b2aa941ac
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
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/test_printf.c:584:16: sparse: sparse: restricted gfp_t degrades to integer
>> lib/test_printf.c:584:13: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted gfp_t [addressable] [assigned] [usertype] gfp @@ got unsigned int @@
lib/test_printf.c:584:13: sparse: expected restricted gfp_t [addressable] [assigned] [usertype] gfp
lib/test_printf.c:584:13: sparse: got unsigned int
lib/test_printf.c:585:49: sparse: sparse: cast from restricted gfp_t
lib/test_printf.c:589:58: sparse: sparse: cast from restricted gfp_t
vim +584 lib/test_printf.c
707cc7280f452a Rasmus Villemoes 2015-11-06 546
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 547 static void __init
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 548 flags(void)
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 549 {
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 550 unsigned long flags;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 551 gfp_t gfp;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 552 char *cmp_buffer;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 553
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 554 flags = 0;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 555 test("", "%pGp", &flags);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 556
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 557 /* Page flags should filter the zone id */
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 558 flags = 1UL << NR_PAGEFLAGS;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 559 test("", "%pGp", &flags);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 560
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 561 flags |= 1UL << PG_uptodate | 1UL << PG_dirty | 1UL << PG_lru
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 562 | 1UL << PG_active | 1UL << PG_swapbacked;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 563 test("uptodate|dirty|lru|active|swapbacked", "%pGp", &flags);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 564
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 565
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 566 flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 567 | VM_DENYWRITE;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 568 test("read|exec|mayread|maywrite|mayexec|denywrite", "%pGv", &flags);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 569
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 570 gfp = GFP_TRANSHUGE;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 571 test("GFP_TRANSHUGE", "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 572
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 573 gfp = GFP_ATOMIC|__GFP_DMA;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 574 test("GFP_ATOMIC|GFP_DMA", "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 575
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 576 gfp = __GFP_ATOMIC;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 577 test("__GFP_ATOMIC", "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 578
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 579 cmp_buffer = kmalloc(BUF_SIZE, GFP_KERNEL);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 580 if (!cmp_buffer)
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 581 return;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 582
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 583 /* Any flags not translated by the table should remain numeric */
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 @584 gfp = ~__GFP_BITS_MASK;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 585 snprintf(cmp_buffer, BUF_SIZE, "%#lx", (unsigned long) gfp);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 586 test(cmp_buffer, "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 587
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 588 snprintf(cmp_buffer, BUF_SIZE, "__GFP_ATOMIC|%#lx",
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 589 (unsigned long) gfp);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 590 gfp |= __GFP_ATOMIC;
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 591 test(cmp_buffer, "%pGg", &gfp);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 592
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 593 kfree(cmp_buffer);
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 594 }
edf14cdbf9a0e5 Vlastimil Babka 2016-03-15 595
:::::: The code at line 584 was first introduced by commit
:::::: edf14cdbf9a0e5ab52698ca66d07a76ade0d5c46 mm, printk: introduce new format string for flags
:::::: TO: Vlastimil Babka <vbabka(a)suse.cz>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months