]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: allow --fix removal of unnecessary break statements
authorJoe Perches <joe@perches.com>
Wed, 16 Dec 2020 04:44:33 +0000 (20:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2020 06:46:17 +0000 (22:46 -0800)
commitfdd8fd04e8a796edacd4da16e7dd5d6eb0e49762
treeb80dd90ae5ee32ac7a5e8515b92bd012694d537e
parent78ed49377be18af4aa7b507a592fdf436a40d994
checkpatch: allow --fix removal of unnecessary break statements

switch/case use of break after a return, goto or break is unnecessary.

There is an existing warning for the return and goto uses, so add
break and a --fix option too.

Link: https://lkml.kernel.org/r/d9ea654104d55f590fb97d252d64a66b23c1a096.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Julia Lawall <julia.lawall@inria.fr>
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl