[PATCH 2/2] dim: remove redundant warning about BUG

Daniel Vetter daniel at ffwll.ch
Mon Mar 5 08:20:15 UTC 2018


On Fri, Mar 02, 2018 at 05:58:00PM +0200, Jani Nikula wrote:
> checkpatch already covers "WARNING:AVOID_BUG: Avoid crashing the kernel
> - try using WARN_ON & recovery code rather than BUG() or BUG_ON()"

Nice. Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch> on both patches.
> 
> Remove the redundant warning in dim.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

> ---
>  dim | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/dim b/dim
> index 35eb16104222..ea9be9ace78c 100755
> --- a/dim
> +++ b/dim
> @@ -1366,11 +1366,6 @@ function checkpatch_commit
>  		rv=1
>  	fi
>  
> -	if bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG') && [[ "$bug_lines" = "1" ]]; then
> -		echoerr "WARNING: New BUG macro added"
> -		rv=1
> -	fi
> -
>  	return $rv
>  }
>  
> -- 
> 2.11.0
> 
> _______________________________________________
> dim-tools mailing list
> dim-tools at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dim-tools

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dim-tools mailing list