drivers/usb/host/whci/qset.c:710:6: sparse: context imbalance in 'qset_remove_urb' - unexpected unlock
From: kbuild test robot
Date: Mon May 08 2017 - 14:55:12 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 13e0988140374123bead1dd27c287354cb95108e
commit: edcafc0294589d5ad1220565ffd674007337cdc7 drm/amdgpu/virt: skip VM fault handler for VF
date: 6 weeks ago
reproduce:
# apt-get install sparse
git checkout edcafc0294589d5ad1220565ffd674007337cdc7
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
drivers/usb/host/whci/qset.c:127:35: sparse: restricted __le16 degrades to integer
drivers/usb/host/whci/qset.c:127:25: sparse: incorrect type in assignment (different base types)
drivers/usb/host/whci/qset.c:127:25: expected restricted __le16 [usertype] status
drivers/usb/host/whci/qset.c:127:25: got int
drivers/usb/host/whci/qset.c:148:25: sparse: invalid assignment: &=
drivers/usb/host/whci/qset.c:148:25: left side has type restricted __le16
drivers/usb/host/whci/qset.c:148:25: right side has type int
drivers/usb/host/whci/qset.c:237:21: sparse: restricted __le16 degrades to integer
>> drivers/usb/host/whci/qset.c:710:6: sparse: context imbalance in 'qset_remove_urb' - unexpected unlock
--
arch/x86/include/asm/uaccess.h:714:18: sparse: incorrect type in argument 1 (different modifiers)
arch/x86/include/asm/uaccess.h:714:18: expected void *<noident>
arch/x86/include/asm/uaccess.h:714:18: got void const *from
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1740:49: sparse: incorrect type in argument 1 (different address spaces)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1740:49: expected void [noderef] <asn:2>*ioaddr
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1740:49: got struct mac_device_info *hw
--
>> drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:244:16: sparse: restricted __le32 degrades to integer
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:245:19: sparse: restricted __le32 degrades to integer
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:249:23: sparse: restricted __le32 degrades to integer
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:249:50: sparse: restricted __le32 degrades to integer
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:267:13: sparse: restricted __le32 degrades to integer
--
>> arch/x86/include/asm/qspinlock.h:17:9: sparse: context imbalance in 'xfs_buf_rele' - different lock contexts for basic block
--
include/linux/list.h:43:20: sparse: context imbalance in 'dlm_ctxt_release' - unexpected unlock
>> arch/x86/include/asm/qspinlock.h:17:9: sparse: context imbalance in 'dlm_query_nodeinfo_handler' - different lock contexts for basic block
--
>> arch/x86/include/asm/qspinlock.h:17:9: sparse: context imbalance in '__dlm_wait_on_lockres_flags' - unexpected unlock
fs/ocfs2/dlm/dlmthread.c:260:17: sparse: context imbalance in 'dlm_purge_lockres' - unexpected unlock
fs/ocfs2/dlm/dlmthread.c:305:9: sparse: context imbalance in 'dlm_run_purge_list' - different lock contexts for basic block
--
>> arch/x86/include/asm/qspinlock.h:17:9: sparse: context imbalance in 'dlm_empty_lockres' - unexpected unlock
fs/ocfs2/dlm/dlmmaster.c:3294:28: sparse: context imbalance in 'dlm_reset_mleres_owner' - unexpected unlock
fs/ocfs2/dlm/dlmmaster.c:3367:9: sparse: context imbalance in 'dlm_clean_master_list' - different lock contexts for basic block
--
drivers/scsi/ipr.c:1040:13: sparse: context imbalance in 'ipr_send_blocking_cmd' - unexpected unlock
drivers/scsi/ipr.c:5261:17: sparse: context imbalance in '__ipr_eh_dev_reset' - unexpected unlock
drivers/scsi/ipr.c:7072:32: sparse: context imbalance in 'ipr_ioa_bringdown_done' - unexpected unlock
>> drivers/scsi/ipr.c:7141:9: sparse: context imbalance in 'ipr_ioa_reset_done' - unexpected unlock
drivers/scsi/ipr.c:9167:48: sparse: context imbalance in 'ipr_initiate_ioa_reset' - unexpected unlock
vim +/qset_remove_urb +710 drivers/usb/host/whci/qset.c
7e6133aa David Vrabel 2008-09-17 694 remaining -= std_len;
7e6133aa David Vrabel 2008-09-17 695 transfer_dma += std_len;
7e6133aa David Vrabel 2008-09-17 696 }
7e6133aa David Vrabel 2008-09-17 697
7e6133aa David Vrabel 2008-09-17 698 return 0;
7e6133aa David Vrabel 2008-09-17 699
7e6133aa David Vrabel 2008-09-17 700 err_no_mem:
7e6133aa David Vrabel 2008-09-17 701 qset_free_stds(qset, urb);
7e6133aa David Vrabel 2008-09-17 702 return -ENOMEM;
7e6133aa David Vrabel 2008-09-17 703 }
7e6133aa David Vrabel 2008-09-17 704
7e6133aa David Vrabel 2008-09-17 705 /**
7e6133aa David Vrabel 2008-09-17 706 * qset_remove_urb - remove an URB from the urb queue.
7e6133aa David Vrabel 2008-09-17 707 *
7e6133aa David Vrabel 2008-09-17 708 * The URB is returned to the USB subsystem.
7e6133aa David Vrabel 2008-09-17 709 */
7e6133aa David Vrabel 2008-09-17 @710 void qset_remove_urb(struct whc *whc, struct whc_qset *qset,
7e6133aa David Vrabel 2008-09-17 711 struct urb *urb, int status)
7e6133aa David Vrabel 2008-09-17 712 {
7e6133aa David Vrabel 2008-09-17 713 struct wusbhc *wusbhc = &whc->wusbhc;
7e6133aa David Vrabel 2008-09-17 714 struct whc_urb *wurb = urb->hcpriv;
7e6133aa David Vrabel 2008-09-17 715
7e6133aa David Vrabel 2008-09-17 716 usb_hcd_unlink_urb_from_ep(&wusbhc->usb_hcd, urb);
7e6133aa David Vrabel 2008-09-17 717 /* Drop the lock as urb->complete() may enqueue another urb. */
7e6133aa David Vrabel 2008-09-17 718 spin_unlock(&whc->lock);
:::::: The code at line 710 was first introduced by commit
:::::: 7e6133aa42920ea87ad9791a0fb2b95d1a23b8f9 wusb: WHCI host controller driver
:::::: TO: David Vrabel <david.vrabel@xxxxxxx>
:::::: CC: David Vrabel <dv02@xxxxxxxxxxxxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation