drivers/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous prototype for 'rtw_pci_probe'
by kernel test robot
Hi Zong-Zhe,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 23ee3e4e5bd27bdbc0f1785eef7209ce872794c7
commit: 72f256c2b948622cc45ff8bc0456dd6039d8fe36 rtw88: extract: export symbols about pci interface
date: 10 weeks ago
config: arc-randconfig-r026-20200725 (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
git checkout 72f256c2b948622cc45ff8bc0456dd6039d8fe36
# 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/net/wireless/realtek/rtw88/pci.c:1477:5: warning: no previous prototype for 'rtw_pci_probe' [-Wmissing-prototypes]
1477 | int rtw_pci_probe(struct pci_dev *pdev,
| ^~~~~~~~~~~~~
>> drivers/net/wireless/realtek/rtw88/pci.c:1557:6: warning: no previous prototype for 'rtw_pci_remove' [-Wmissing-prototypes]
1557 | void rtw_pci_remove(struct pci_dev *pdev)
| ^~~~~~~~~~~~~~
>> drivers/net/wireless/realtek/rtw88/pci.c:1579:6: warning: no previous prototype for 'rtw_pci_shutdown' [-Wmissing-prototypes]
1579 | void rtw_pci_shutdown(struct pci_dev *pdev)
| ^~~~~~~~~~~~~~~~
vim +/rtw_pci_probe +1477 drivers/net/wireless/realtek/rtw88/pci.c
1476
> 1477 int rtw_pci_probe(struct pci_dev *pdev,
1478 const struct pci_device_id *id)
1479 {
1480 struct ieee80211_hw *hw;
1481 struct rtw_dev *rtwdev;
1482 int drv_data_size;
1483 int ret;
1484
1485 drv_data_size = sizeof(struct rtw_dev) + sizeof(struct rtw_pci);
1486 hw = ieee80211_alloc_hw(drv_data_size, &rtw_ops);
1487 if (!hw) {
1488 dev_err(&pdev->dev, "failed to allocate hw\n");
1489 return -ENOMEM;
1490 }
1491
1492 rtwdev = hw->priv;
1493 rtwdev->hw = hw;
1494 rtwdev->dev = &pdev->dev;
1495 rtwdev->chip = (struct rtw_chip_info *)id->driver_data;
1496 rtwdev->hci.ops = &rtw_pci_ops;
1497 rtwdev->hci.type = RTW_HCI_TYPE_PCIE;
1498
1499 ret = rtw_core_init(rtwdev);
1500 if (ret)
1501 goto err_release_hw;
1502
1503 rtw_dbg(rtwdev, RTW_DBG_PCI,
1504 "rtw88 pci probe: vendor=0x%4.04X device=0x%4.04X rev=%d\n",
1505 pdev->vendor, pdev->device, pdev->revision);
1506
1507 ret = rtw_pci_claim(rtwdev, pdev);
1508 if (ret) {
1509 rtw_err(rtwdev, "failed to claim pci device\n");
1510 goto err_deinit_core;
1511 }
1512
1513 ret = rtw_pci_setup_resource(rtwdev, pdev);
1514 if (ret) {
1515 rtw_err(rtwdev, "failed to setup pci resources\n");
1516 goto err_pci_declaim;
1517 }
1518
1519 ret = rtw_chip_info_setup(rtwdev);
1520 if (ret) {
1521 rtw_err(rtwdev, "failed to setup chip information\n");
1522 goto err_destroy_pci;
1523 }
1524
1525 rtw_pci_phy_cfg(rtwdev);
1526
1527 ret = rtw_register_hw(rtwdev, hw);
1528 if (ret) {
1529 rtw_err(rtwdev, "failed to register hw\n");
1530 goto err_destroy_pci;
1531 }
1532
1533 ret = rtw_pci_request_irq(rtwdev, pdev);
1534 if (ret) {
1535 ieee80211_unregister_hw(hw);
1536 goto err_destroy_pci;
1537 }
1538
1539 return 0;
1540
1541 err_destroy_pci:
1542 rtw_pci_destroy(rtwdev, pdev);
1543
1544 err_pci_declaim:
1545 rtw_pci_declaim(rtwdev, pdev);
1546
1547 err_deinit_core:
1548 rtw_core_deinit(rtwdev);
1549
1550 err_release_hw:
1551 ieee80211_free_hw(hw);
1552
1553 return ret;
1554 }
1555 EXPORT_SYMBOL(rtw_pci_probe);
1556
> 1557 void rtw_pci_remove(struct pci_dev *pdev)
1558 {
1559 struct ieee80211_hw *hw = pci_get_drvdata(pdev);
1560 struct rtw_dev *rtwdev;
1561 struct rtw_pci *rtwpci;
1562
1563 if (!hw)
1564 return;
1565
1566 rtwdev = hw->priv;
1567 rtwpci = (struct rtw_pci *)rtwdev->priv;
1568
1569 rtw_unregister_hw(rtwdev, hw);
1570 rtw_pci_disable_interrupt(rtwdev, rtwpci);
1571 rtw_pci_destroy(rtwdev, pdev);
1572 rtw_pci_declaim(rtwdev, pdev);
1573 rtw_pci_free_irq(rtwdev, pdev);
1574 rtw_core_deinit(rtwdev);
1575 ieee80211_free_hw(hw);
1576 }
1577 EXPORT_SYMBOL(rtw_pci_remove);
1578
> 1579 void rtw_pci_shutdown(struct pci_dev *pdev)
1580 {
1581 struct ieee80211_hw *hw = pci_get_drvdata(pdev);
1582 struct rtw_dev *rtwdev;
1583 struct rtw_chip_info *chip;
1584
1585 if (!hw)
1586 return;
1587
1588 rtwdev = hw->priv;
1589 chip = rtwdev->chip;
1590
1591 if (chip->ops->shutdown)
1592 chip->ops->shutdown(rtwdev);
1593 }
1594 EXPORT_SYMBOL(rtw_pci_shutdown);
1595
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
4 months, 3 weeks
[PATCH] printk: fix ifnullfree.cocci warnings
by Julia Lawall
Make the code a little simpler by dropping
some unneeded tests.
Generated by: scripts/coccinelle/free/ifnullfree.cocci
Fixes: c406fbce2054 ("printk: implement syslog")
CC: John Ogness <john.ogness(a)linutronix.de>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.4.y-rt
head: 5fbf1e70f11dba64cc05c9d85120a3aa7c67a4a2
commit: c406fbce2054efbf812b3d811ed23a872f719db9 [43/325] printk: implement syslog
:::::: branch date: 4 months ago
:::::: commit date: 7 months ago
printk.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1539,10 +1539,8 @@ static int syslog_print_all(char __user
if (clear && !seq)
syslog_clear();
- if (text)
- kfree(text);
- if (msgbuf)
- kfree(msgbuf);
+ kfree(text);
+ kfree(msgbuf);
return len;
}
@@ -1695,10 +1693,8 @@ int do_syslog(int type, char __user *buf
break;
}
out:
- if (msgbuf)
- kfree(msgbuf);
- if (text)
- kfree(text);
+ kfree(msgbuf);
+ kfree(text);
return error;
}
5 months, 1 week
[intel-linux-intel-lts:5.4/yocto 15/16] arch/x86/kernel/traps.c:309: undefined reference to `split_lock_detect_enabled'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 36fb6de86271426eb51a3e418d507a40b50ae311
commit: eecee9ebb97331e711740b814672e52347260c20 [15/16] x86/split_lock: Handle #AC exception for split lock
config: i386-randconfig-c001-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout eecee9ebb97331e711740b814672e52347260c20
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
ld: arch/x86/kernel/traps.o: in function `do_alignment_check':
>> arch/x86/kernel/traps.c:309: undefined reference to `split_lock_detect_enabled'
vim +309 arch/x86/kernel/traps.c
297
298 dotraplinkage void do_alignment_check(struct pt_regs *regs, long error_code)
299 {
300 unsigned int trapnr = X86_TRAP_AC;
301 char str[] = "alignment check";
302 int signr = SIGBUS;
303
304 RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
305
306 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) == NOTIFY_STOP)
307 return;
308
> 309 if (!user_mode(regs) && split_lock_detect_enabled)
310 panic("Split lock detected\n");
311
312 cond_local_irq_enable(regs);
313
314 /* Handle #AC generated in any other cases. */
315 do_trap(X86_TRAP_AC, SIGBUS, "alignment check", regs,
316 error_code, BUS_ADRALN, NULL);
317 }
318
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months, 2 weeks
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c:123:39: sparse: sparse: restricted __le32 degrades to integer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92ed301919932f777713b9172e525674157e983d
commit: 93c7f4d357de68f1e3a998b2fc775466d75c4c07 crypto: sun8i-ce - enable working on big endian
date: 8 months ago
config: arm64-randconfig-s031-20200728 (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.2-94-geb6779f6-dirty
git checkout 93c7f4d357de68f1e3a998b2fc775466d75c4c07
# 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/crypto/allwinner/sun8i-ce/sun8i-ce-core.c:123:39: sparse: sparse: restricted __le32 degrades to integer
vim +123 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
06f751b613296c Corentin Labbe 2019-10-23 109
06f751b613296c Corentin Labbe 2019-10-23 110 mutex_lock(&ce->mlock);
06f751b613296c Corentin Labbe 2019-10-23 111
06f751b613296c Corentin Labbe 2019-10-23 112 v = readl(ce->base + CE_ICR);
06f751b613296c Corentin Labbe 2019-10-23 113 v |= 1 << flow;
06f751b613296c Corentin Labbe 2019-10-23 114 writel(v, ce->base + CE_ICR);
06f751b613296c Corentin Labbe 2019-10-23 115
06f751b613296c Corentin Labbe 2019-10-23 116 reinit_completion(&ce->chanlist[flow].complete);
06f751b613296c Corentin Labbe 2019-10-23 117 writel(ce->chanlist[flow].t_phy, ce->base + CE_TDQ);
06f751b613296c Corentin Labbe 2019-10-23 118
06f751b613296c Corentin Labbe 2019-10-23 119 ce->chanlist[flow].status = 0;
06f751b613296c Corentin Labbe 2019-10-23 120 /* Be sure all data is written before enabling the task */
06f751b613296c Corentin Labbe 2019-10-23 121 wmb();
06f751b613296c Corentin Labbe 2019-10-23 122
06f751b613296c Corentin Labbe 2019-10-23 @123 v = 1 | (ce->chanlist[flow].tl->t_common_ctl & 0x7F) << 8;
06f751b613296c Corentin Labbe 2019-10-23 124 writel(v, ce->base + CE_TLR);
06f751b613296c Corentin Labbe 2019-10-23 125 mutex_unlock(&ce->mlock);
06f751b613296c Corentin Labbe 2019-10-23 126
06f751b613296c Corentin Labbe 2019-10-23 127 wait_for_completion_interruptible_timeout(&ce->chanlist[flow].complete,
06f751b613296c Corentin Labbe 2019-10-23 128 msecs_to_jiffies(ce->chanlist[flow].timeout));
06f751b613296c Corentin Labbe 2019-10-23 129
06f751b613296c Corentin Labbe 2019-10-23 130 if (ce->chanlist[flow].status == 0) {
06f751b613296c Corentin Labbe 2019-10-23 131 dev_err(ce->dev, "DMA timeout for %s\n", name);
06f751b613296c Corentin Labbe 2019-10-23 132 err = -EFAULT;
06f751b613296c Corentin Labbe 2019-10-23 133 }
06f751b613296c Corentin Labbe 2019-10-23 134 /* No need to lock for this read, the channel is locked so
06f751b613296c Corentin Labbe 2019-10-23 135 * nothing could modify the error value for this channel
06f751b613296c Corentin Labbe 2019-10-23 136 */
06f751b613296c Corentin Labbe 2019-10-23 137 v = readl(ce->base + CE_ESR);
06f751b613296c Corentin Labbe 2019-10-23 138 if (v) {
06f751b613296c Corentin Labbe 2019-10-23 139 v >>= (flow * 4);
06f751b613296c Corentin Labbe 2019-10-23 140 v &= 0xFF;
06f751b613296c Corentin Labbe 2019-10-23 141 if (v) {
06f751b613296c Corentin Labbe 2019-10-23 142 dev_err(ce->dev, "CE ERROR: %x for flow %x\n", v, flow);
06f751b613296c Corentin Labbe 2019-10-23 143 err = -EFAULT;
06f751b613296c Corentin Labbe 2019-10-23 144 }
06f751b613296c Corentin Labbe 2019-10-23 145 if (v & CE_ERR_ALGO_NOTSUP)
06f751b613296c Corentin Labbe 2019-10-23 146 dev_err(ce->dev, "CE ERROR: algorithm not supported\n");
06f751b613296c Corentin Labbe 2019-10-23 147 if (v & CE_ERR_DATALEN)
06f751b613296c Corentin Labbe 2019-10-23 148 dev_err(ce->dev, "CE ERROR: data length error\n");
06f751b613296c Corentin Labbe 2019-10-23 149 if (v & CE_ERR_KEYSRAM)
06f751b613296c Corentin Labbe 2019-10-23 150 dev_err(ce->dev, "CE ERROR: keysram access error for AES\n");
06f751b613296c Corentin Labbe 2019-10-23 151 if (v & CE_ERR_ADDR_INVALID)
06f751b613296c Corentin Labbe 2019-10-23 152 dev_err(ce->dev, "CE ERROR: address invalid\n");
06f751b613296c Corentin Labbe 2019-10-23 153 }
06f751b613296c Corentin Labbe 2019-10-23 154
06f751b613296c Corentin Labbe 2019-10-23 155 return err;
06f751b613296c Corentin Labbe 2019-10-23 156 }
06f751b613296c Corentin Labbe 2019-10-23 157
:::::: The code at line 123 was first introduced by commit
:::::: 06f751b613296cc34b86fc83fccaf30d646eb8bc crypto: allwinner - Add sun8i-ce Crypto Engine
:::::: TO: Corentin Labbe <clabbe.montjoie(a)gmail.com>
:::::: CC: Herbert Xu <herbert(a)gondor.apana.org.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months, 3 weeks
[csky-linux:linux-next 7/13] arch/csky/kernel/traps.c:117:6: warning: no previous prototype for 'do_trap'
by kernel test robot
tree: https://github.com/c-sky/csky-linux linux-next
head: 66c40fbeccdab07f3ef89bf738f6d0c0536f4975
commit: 5bc46ce26cfc42fa066b2206621587f9dea9a8a8 [7/13] csky: Optimize the trap processing flow
config: csky-defconfig (attached as .config)
compiler: csky-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 checkout 5bc46ce26cfc42fa066b2206621587f9dea9a8a8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky
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/csky/kernel/traps.c:59:13: warning: no previous prototype for 'trap_init' [-Wmissing-prototypes]
59 | void __init trap_init(void)
| ^~~~~~~~~
>> arch/csky/kernel/traps.c:117:6: warning: no previous prototype for 'do_trap' [-Wmissing-prototypes]
117 | void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
| ^~~~~~~
>> arch/csky/kernel/traps.c:152:15: warning: no previous prototype for 'do_trap_unknown' [-Wmissing-prototypes]
152 | DO_ERROR_INFO(do_trap_unknown,
| ^~~~~~~~~~~~~~~
arch/csky/kernel/traps.c:147:27: note: in definition of macro 'DO_ERROR_INFO'
147 | asmlinkage __visible void name(struct pt_regs *regs) \
| ^~~~
>> arch/csky/kernel/traps.c:154:15: warning: no previous prototype for 'do_trap_zdiv' [-Wmissing-prototypes]
154 | DO_ERROR_INFO(do_trap_zdiv,
| ^~~~~~~~~~~~
arch/csky/kernel/traps.c:147:27: note: in definition of macro 'DO_ERROR_INFO'
147 | asmlinkage __visible void name(struct pt_regs *regs) \
| ^~~~
>> arch/csky/kernel/traps.c:156:15: warning: no previous prototype for 'do_trap_buserr' [-Wmissing-prototypes]
156 | DO_ERROR_INFO(do_trap_buserr,
| ^~~~~~~~~~~~~~
arch/csky/kernel/traps.c:147:27: note: in definition of macro 'DO_ERROR_INFO'
147 | asmlinkage __visible void name(struct pt_regs *regs) \
| ^~~~
>> arch/csky/kernel/traps.c:159:17: warning: no previous prototype for 'do_trap_misaligned' [-Wmissing-prototypes]
159 | asmlinkage void do_trap_misaligned(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
>> arch/csky/kernel/traps.c:170:17: warning: no previous prototype for 'do_trap_bkpt' [-Wmissing-prototypes]
170 | asmlinkage void do_trap_bkpt(struct pt_regs *regs)
| ^~~~~~~~~~~~
>> arch/csky/kernel/traps.c:189:17: warning: no previous prototype for 'do_trap_illinsn' [-Wmissing-prototypes]
189 | asmlinkage void do_trap_illinsn(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~
>> arch/csky/kernel/traps.c:212:17: warning: no previous prototype for 'do_trap_fpe' [-Wmissing-prototypes]
212 | asmlinkage void do_trap_fpe(struct pt_regs *regs)
| ^~~~~~~~~~~
>> arch/csky/kernel/traps.c:222:17: warning: no previous prototype for 'do_trap_priv' [-Wmissing-prototypes]
222 | asmlinkage void do_trap_priv(struct pt_regs *regs)
| ^~~~~~~~~~~~
arch/csky/kernel/traps.c:232:17: warning: no previous prototype for 'trap_c' [-Wmissing-prototypes]
232 | asmlinkage void trap_c(struct pt_regs *regs)
| ^~~~~~
vim +/do_trap +117 arch/csky/kernel/traps.c
116
> 117 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
118 {
119 struct task_struct *tsk = current;
120
121 if (show_unhandled_signals && unhandled_signal(tsk, signo)
122 && printk_ratelimit()) {
123 pr_info("%s[%d]: unhandled signal %d code 0x%x at 0x%08lx",
124 tsk->comm, task_pid_nr(tsk), signo, code, addr);
125 print_vma_addr(KERN_CONT " in ", instruction_pointer(regs));
126 pr_cont("\n");
127 show_regs(regs);
128 }
129
130 force_sig_fault(signo, code, (void __user *)addr);
131 }
132
133 static void do_trap_error(struct pt_regs *regs, int signo, int code,
134 unsigned long addr, const char *str)
135 {
136 current->thread.trap_no = trap_no(regs);
137
138 if (user_mode(regs)) {
139 do_trap(regs, signo, code, addr);
140 } else {
141 if (!fixup_exception(regs))
142 die(regs, str);
143 }
144 }
145
146 #define DO_ERROR_INFO(name, signo, code, str) \
147 asmlinkage __visible void name(struct pt_regs *regs) \
148 { \
149 do_trap_error(regs, signo, code, regs->pc, "Oops - " str); \
150 }
151
> 152 DO_ERROR_INFO(do_trap_unknown,
153 SIGILL, ILL_ILLTRP, "unknown exception");
> 154 DO_ERROR_INFO(do_trap_zdiv,
155 SIGFPE, FPE_INTDIV, "error zero div exception");
> 156 DO_ERROR_INFO(do_trap_buserr,
157 SIGSEGV, ILL_ILLADR, "error bus error exception");
158
> 159 asmlinkage void do_trap_misaligned(struct pt_regs *regs)
160 {
161 #ifdef CONFIG_CPU_NEED_SOFTALIGN
162 csky_alignment(regs);
163 #else
164 current->thread.trap_no = trap_no(regs);
165 do_trap_error(regs, SIGBUS, BUS_ADRALN, regs->pc,
166 "Oops - load/store address misaligned");
167 #endif
168 }
169
> 170 asmlinkage void do_trap_bkpt(struct pt_regs *regs)
171 {
172 #ifdef CONFIG_KPROBES
173 if (kprobe_single_step_handler(regs))
174 return;
175 #endif
176 #ifdef CONFIG_UPROBES
177 if (uprobe_single_step_handler(regs))
178 return;
179 #endif
180 if (user_mode(regs)) {
181 send_sig(SIGTRAP, current, 0);
182 return;
183 }
184
185 do_trap_error(regs, SIGILL, ILL_ILLTRP, regs->pc,
186 "Oops - illegal trap exception");
187 }
188
> 189 asmlinkage void do_trap_illinsn(struct pt_regs *regs)
190 {
191 current->thread.trap_no = trap_no(regs);
192
193 #ifdef CONFIG_KPROBES
194 if (kprobe_breakpoint_handler(regs))
195 return;
196 #endif
197 #ifdef CONFIG_UPROBES
198 if (uprobe_breakpoint_handler(regs))
199 return;
200 #endif
201 #ifndef CONFIG_CPU_NO_USER_BKPT
202 if (*(uint16_t *)instruction_pointer(regs) != USR_BKPT) {
203 send_sig(SIGTRAP, current, 0);
204 return;
205 }
206 #endif
207
208 do_trap_error(regs, SIGILL, ILL_ILLOPC, regs->pc,
209 "Oops - illegal instruction exception");
210 }
211
> 212 asmlinkage void do_trap_fpe(struct pt_regs *regs)
213 {
214 #ifdef CONFIG_CPU_HAS_FP
215 return fpu_fpe(regs);
216 #else
217 do_trap_error(regs, SIGILL, ILL_ILLOPC, regs->pc,
218 "Oops - fpu instruction exception");
219 #endif
220 }
221
> 222 asmlinkage void do_trap_priv(struct pt_regs *regs)
223 {
224 #ifdef CONFIG_CPU_HAS_FP
225 if (user_mode(regs) && fpu_libc_helper(regs))
226 return;
227 #endif
228 do_trap_error(regs, SIGILL, ILL_PRVOPC, regs->pc,
229 "Oops - illegal privileged exception");
230 }
231
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months, 3 weeks
[linux-next:master 12047/13260] drivers/net/ethernet/huawei/hinic/hinic_devlink.c:393:3: warning: 'strncpy' output truncated before terminating nul copying 7 bytes from a string of the same length
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 01830e6c042e8eb6eb202e05d7df8057135b4c26
commit: c15850c709eb5c7771785c9174e4908d1806a0f0 [12047/13260] hinic: add support to handle hw abnormal event
config: x86_64-randconfig-r022-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout c15850c709eb5c7771785c9174e4908d1806a0f0
# save the attached .config to linux build tree
make W=1 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/net/ethernet/huawei/hinic/hinic_devlink.c: In function 'fault_report_show':
>> drivers/net/ethernet/huawei/hinic/hinic_devlink.c:393:3: warning: 'strncpy' output truncated before terminating nul copying 7 bytes from a string of the same length [-Wstringop-truncation]
393 | strncpy(type_str, "Unknown", strlen("Unknown"));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/huawei/hinic/hinic_devlink.c: In function 'chip_fault_show':
drivers/net/ethernet/huawei/hinic/hinic_devlink.c:347:3: warning: 'strncpy' output truncated before terminating nul copying 7 bytes from a string of the same length [-Wstringop-truncation]
347 | strncpy(level_str, "Unknown", strlen("Unknown"));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +393 drivers/net/ethernet/huawei/hinic/hinic_devlink.c
380
381 static int fault_report_show(struct devlink_fmsg *fmsg,
382 struct hinic_fault_event *event)
383 {
384 char fault_type[FAULT_TYPE_MAX][FAULT_SHOW_STR_LEN + 1] = {
385 "chip", "ucode", "mem rd timeout", "mem wr timeout",
386 "reg rd timeout", "reg wr timeout", "phy fault"};
387 char type_str[FAULT_SHOW_STR_LEN + 1] = {0};
388 int err;
389
390 if (event->type < FAULT_TYPE_MAX)
391 strncpy(type_str, fault_type[event->type], strlen(fault_type[event->type]));
392 else
> 393 strncpy(type_str, "Unknown", strlen("Unknown"));
394
395 err = devlink_fmsg_string_pair_put(fmsg, "Fault type", type_str);
396 if (err)
397 return err;
398
399 err = devlink_fmsg_binary_pair_put(fmsg, "Fault raw data",
400 event->event.val, sizeof(event->event.val));
401 if (err)
402 return err;
403
404 switch (event->type) {
405 case FAULT_TYPE_CHIP:
406 err = chip_fault_show(fmsg, event);
407 if (err)
408 return err;
409 break;
410 case FAULT_TYPE_UCODE:
411 err = devlink_fmsg_u8_pair_put(fmsg, "Cause_id", event->event.ucode.cause_id);
412 if (err)
413 return err;
414 err = devlink_fmsg_u8_pair_put(fmsg, "core_id", event->event.ucode.core_id);
415 if (err)
416 return err;
417 err = devlink_fmsg_u8_pair_put(fmsg, "c_id", event->event.ucode.c_id);
418 if (err)
419 return err;
420 err = devlink_fmsg_u8_pair_put(fmsg, "epc", event->event.ucode.epc);
421 if (err)
422 return err;
423 break;
424 case FAULT_TYPE_MEM_RD_TIMEOUT:
425 case FAULT_TYPE_MEM_WR_TIMEOUT:
426 err = devlink_fmsg_u32_pair_put(fmsg, "Err_csr_ctrl",
427 event->event.mem_timeout.err_csr_ctrl);
428 if (err)
429 return err;
430 err = devlink_fmsg_u32_pair_put(fmsg, "err_csr_data",
431 event->event.mem_timeout.err_csr_data);
432 if (err)
433 return err;
434 err = devlink_fmsg_u32_pair_put(fmsg, "ctrl_tab",
435 event->event.mem_timeout.ctrl_tab);
436 if (err)
437 return err;
438 err = devlink_fmsg_u32_pair_put(fmsg, "mem_index",
439 event->event.mem_timeout.mem_index);
440 if (err)
441 return err;
442 break;
443 case FAULT_TYPE_REG_RD_TIMEOUT:
444 case FAULT_TYPE_REG_WR_TIMEOUT:
445 err = devlink_fmsg_u32_pair_put(fmsg, "Err_csr", event->event.reg_timeout.err_csr);
446 if (err)
447 return err;
448 break;
449 case FAULT_TYPE_PHY_FAULT:
450 err = devlink_fmsg_u8_pair_put(fmsg, "Op_type", event->event.phy_fault.op_type);
451 if (err)
452 return err;
453 err = devlink_fmsg_u8_pair_put(fmsg, "port_id", event->event.phy_fault.port_id);
454 if (err)
455 return err;
456 err = devlink_fmsg_u8_pair_put(fmsg, "dev_ad", event->event.phy_fault.dev_ad);
457 if (err)
458 return err;
459
460 err = devlink_fmsg_u32_pair_put(fmsg, "csr_addr", event->event.phy_fault.csr_addr);
461 if (err)
462 return err;
463 err = devlink_fmsg_u32_pair_put(fmsg, "op_data", event->event.phy_fault.op_data);
464 if (err)
465 return err;
466 break;
467 default:
468 break;
469 }
470
471 return 0;
472 }
473
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months, 3 weeks
[ti:ti-linux-5.4.y 8324/8346] net/core/sock.c:2306:14: sparse: sparse: incompatible types for 'case' statement
by kernel test robot
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-linux-5.4.y
head: 41c32273d7f5666a5637a109ec004fd746d5efac
commit: a4aead6fc0566e064448dc8363333b78f7bb1545 [8324/8346] net: socket: accept redundant network info in control message
config: parisc-randconfig-s032-20200731 (attached as .config)
compiler: hppa-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.2-115-g5fc204f2-dirty
git checkout a4aead6fc0566e064448dc8363333b78f7bb1545
# 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=parisc
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 >>)
net/core/sock.c: note: in included file (through arch/parisc/include/uapi/asm/unistd.h, arch/parisc/include/asm/unistd.h, include/uapi/linux/unistd.h, ...):
./arch/parisc/include/generated/uapi/asm/unistd_32.h:380:41: sparse: sparse: no newline at end of file
net/core/sock.c:2306:14: sparse: sparse: undefined identifier 'SCM_REDUNDANT'
>> net/core/sock.c:2306:14: sparse: sparse: incompatible types for 'case' statement
net/core/sock.c:3102:35: sparse: sparse: undefined identifier 'SCM_REDUNDANT'
net/core/sock.c:1910:9: sparse: sparse: context imbalance in 'sk_clone_lock' - wrong count at exit
net/core/sock.c:1914:6: sparse: sparse: context imbalance in 'sk_free_unlock_clone' - unexpected unlock
net/core/sock.c:2306:14: sparse: sparse: Expected constant expression in case statement
vim +/case +2306 net/core/sock.c
2269
2270 int __sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct cmsghdr *cmsg,
2271 struct sockcm_cookie *sockc)
2272 {
2273 struct skb_redundant_info *cred;
2274 u32 tsflags;
2275
2276 switch (cmsg->cmsg_type) {
2277 case SO_MARK:
2278 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
2279 return -EPERM;
2280 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
2281 return -EINVAL;
2282 sockc->mark = *(u32 *)CMSG_DATA(cmsg);
2283 break;
2284 case SO_TIMESTAMPING_OLD:
2285 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
2286 return -EINVAL;
2287
2288 tsflags = *(u32 *)CMSG_DATA(cmsg);
2289 if (tsflags & ~SOF_TIMESTAMPING_TX_RECORD_MASK)
2290 return -EINVAL;
2291
2292 sockc->tsflags &= ~SOF_TIMESTAMPING_TX_RECORD_MASK;
2293 sockc->tsflags |= tsflags;
2294 break;
2295 case SCM_TXTIME:
2296 if (!sock_flag(sk, SOCK_TXTIME))
2297 return -EINVAL;
2298 if (cmsg->cmsg_len != CMSG_LEN(sizeof(u64)))
2299 return -EINVAL;
2300 sockc->transmit_time = get_unaligned((u64 *)CMSG_DATA(cmsg));
2301 break;
2302 /* SCM_RIGHTS and SCM_CREDENTIALS are semantically in SOL_UNIX. */
2303 case SCM_RIGHTS:
2304 case SCM_CREDENTIALS:
2305 break;
> 2306 case SCM_REDUNDANT:
2307 if (cmsg->cmsg_len !=
2308 CMSG_LEN(sizeof(struct skb_redundant_info)))
2309 return -EINVAL;
2310
2311 cred = (struct skb_redundant_info *)CMSG_DATA(cmsg);
2312 memcpy(&sockc->redinfo, cred,
2313 sizeof(struct skb_redundant_info));
2314 break;
2315 default:
2316 return -EINVAL;
2317 }
2318 return 0;
2319 }
2320 EXPORT_SYMBOL(__sock_cmsg_send);
2321
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
5 months, 3 weeks