mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
kfifo: use BUG_ON
Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: // <smpl> @@ identifier x; @@ -if (!x) BUG(); +BUG_ON(!x); // </smpl> Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Julia Lawall <[email protected]> Cc: Stefani Seibold <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
998d6688fb
commit
89b3ac6301
1 changed files with 2 additions and 4 deletions
|
|
@ -561,8 +561,7 @@ EXPORT_SYMBOL(__kfifo_to_user_r);
|
|||
unsigned int __kfifo_dma_in_prepare_r(struct __kfifo *fifo,
|
||||
struct scatterlist *sgl, int nents, unsigned int len, size_t recsize)
|
||||
{
|
||||
if (!nents)
|
||||
BUG();
|
||||
BUG_ON(!nents);
|
||||
|
||||
len = __kfifo_max_r(len, recsize);
|
||||
|
||||
|
|
@ -585,8 +584,7 @@ EXPORT_SYMBOL(__kfifo_dma_in_finish_r);
|
|||
unsigned int __kfifo_dma_out_prepare_r(struct __kfifo *fifo,
|
||||
struct scatterlist *sgl, int nents, unsigned int len, size_t recsize)
|
||||
{
|
||||
if (!nents)
|
||||
BUG();
|
||||
BUG_ON(!nents);
|
||||
|
||||
len = __kfifo_max_r(len, recsize);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue