public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
@ 2017-08-29 17:19 harsha
  2017-08-29 17:28 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: harsha @ 2017-08-29 17:19 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, harsha

Signed-off-by: harsha <harshasharmaiitr@gmail.com>
---
 drivers/staging/android/ion/ion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 93e2c90..a2d36b3 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -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();
 		}
 	}
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
@ 2017-08-29 18:00 harsha
  2017-08-29 18:07 ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: harsha @ 2017-08-29 18:00 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, harsha

Fixes checkpatch.pl warning: Use WARN_ON() rather than BUG_ON() and BUG()

Signed-off-by: harsha <harshasharmaiitr@gmail.com>
---
 drivers/staging/android/ion/ion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 93e2c90..a2d36b3 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -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();
 		}
 	}
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG()
@ 2017-08-29 19:21 harsha
  2017-08-29 19:21 ` harsha
  2017-08-29 20:36 ` Dan Carpenter
  0 siblings, 2 replies; 10+ messages in thread
From: harsha @ 2017-08-29 19:21 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel

Hi,
harsha,  this is my real name.
There is no need to call BUG() over here as this error is not very basic and BUG() tends to bring the system down so calling WARN_ON() is preferable.
Please correct me if I am wrong as this is my first contribution.
I am unable to send any direct mail from gmail( gets rejected based on some filter rule match) so trying to send it in this way.
Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-01  9:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-29 17:19 [PATCH] Staging:android:ion:ion.c : Using WARN_ON() rather than BUG() harsha
2017-08-29 17:28 ` Greg KH
2017-09-01  9:07 ` kbuild test robot
2017-09-01  9:11 ` kbuild test robot
  -- strict thread matches above, loose matches on Subject: below --
2017-08-29 18:00 harsha
2017-08-29 18:07 ` Greg KH
2017-08-29 19:21 harsha
2017-08-29 19:21 ` harsha
2017-08-30  5:58   ` Greg KH
2017-08-29 20:36 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox