CC: kbuild-all(a)lists.01.org In-Reply-To: <20210526130037.856068-22-lee.jones@linaro.org> References: <20210526130037.856068-22-lee.jones@linaro.org> TO: Lee Jones TO: lee.jones(a)linaro.org CC: linux-kernel(a)vger.kernel.org CC: Mathias Nyman CC: "Greg Kroah-Hartman" CC: linux-usb(a)vger.kernel.org From: kernel test robot drivers/usb/host/xhci.c:2791:48-58: ERROR: function xhci_reserve_bandwidth called on line 2911 inside lock on line 2885 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci CC: Lee Jones Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-W-1-warnings-from-USB/20210526-210403 base: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git for-usb-next :::::: branch date: 6 hours ago :::::: commit date: 6 hours ago Please take the patch only if it's a positive warning. Thanks! xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -2788,7 +2788,7 @@ static int xhci_reserve_bandwidth(struct return -ENOMEM; } - ep_bw_info = kzalloc(sizeof(*ep_bw_info) * 31, GFP_KERNEL); + ep_bw_info = kzalloc(sizeof(*ep_bw_info) * 31, GFP_ATOMIC); if (!ep_bw_info) return -ENOMEM;