]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vc04_services: Prefer WARN_ON_ONCE instead of if condition followed by BUG.
authorKishore KP <kishore.p@techveda.org>
Sun, 24 Dec 2017 14:03:54 +0000 (19:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:41:37 +0000 (16:41 +0100)
commitb36aa0d357d3c2706dec65baee91d5bab1a5cf9b
tree29e89d92cbf3b3ffabc7d7867a40128d109326d2
parent287afe2bb9ba6a3c595d663cff86bd8796f96450
staging: vc04_services: Prefer WARN_ON_ONCE instead of if condition followed by BUG.

Coccinelle suggested to use BUG_ON instead of if condition followed by BUG
but BUG_ON should be used in situations where integrity of the system is no
longer guaranteed. In this case, as suggested by Stefan Wahren, vchiq isn't
critical.
Since it is not critical, BUG_ON should be avoided.
Replaced if condition followed by BUG with WARN_ON_ONCE.

Signed-off-by: Kishore KP <kishore.p@techveda.org>
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c