lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 17 Oct 2015 00:33:28 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Neil Armstrong <narmstrong@...libre.com>
Cc:	kbuild-all@...org, Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: [PATCH] usb: gadget: fix bugon.cocci warnings

drivers/usb/gadget/udc/cadence_hsudc.c:1303:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h)

 Use BUG_ON instead of a if condition followed by BUG.

Semantic patch information:
 This makes an effort to find cases where BUG() follows an if
 condition on an expression and replaces the if condition and BUG()
 with a BUG_ON having the conditional expression of the if statement
 as argument.

Generated by: scripts/coccinelle/misc/bugon.cocci

CC: Neil Armstrong <narmstrong@...libre.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

Please take the patch only if it's a positive warning. Thanks!

 cadence_hsudc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/usb/gadget/udc/cadence_hsudc.c
+++ b/drivers/usb/gadget/udc/cadence_hsudc.c
@@ -1299,8 +1299,7 @@ static void hsudc_ep_work(struct work_st
 
 	hsudc_ep->cur = hsudc_req;
 
-	if (!hsudc_req)
-		BUG();
+	BUG_ON(!hsudc_req);
 
 	spin_unlock(&hsudc_ep->s);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ