Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
PATCH 1/1 Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
Fixes checkpatch.pl warning: Use WARN_ON() rather than BUG_ON() and BUG()
Signed-off-by harsha <[email protected]>
--- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion.c +1 -1
@@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, p = &(*p)->rb_right; }else {pr_err ("%s: buffer already found." , __func__); -BUG (); +WARN_ON (); } }
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 3 lines · harsha
Fixes checkpatch.pl warning: Use
WARN_ON()rather thanBUG_ON()andBUG()Signed-off-by harsha <[email protected]>
I still need a real name here.
Quoted 9 lines
--- drivers/staging/android/ion/ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/android/ion/ion.c +0
-0
drivers/staging/android/ion/ion.c static void ion_buffer_add(struct ion_device *dev, · line 69
Quoted 5 lines
drivers/staging/android/ion/ion.c +1
-1@@ -66,7 +66,7 @@ static void ion_buffer_add(struct ion_device *dev, p = &(*p)->rb_right; }else {pr_err ("%s: buffer already found." , __func__); -BUG (); +WARN_ON ();
You can't just change code without understanding _why_ you are changing it. You just changed the logic here, why do you think it is ok that BUG() is no longer called? Are you properly cleaning up and recovering here now that WARN_ON() is called?
checkpatch.pl is a hint, you can't just blindly do whatever it says, you still have to think.
thanks,
greg k-h