All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomer Samara <tomersamara98@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: devel@driverdev.osuosl.org, "Todd Kjos" <tkjos@android.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Riley Andrews" <riandrews@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Hridya Valsaraju" <hridya@google.com>,
	"Laura Abbott" <labbott@redhat.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Christian Brauner" <christian@brauner.io>
Subject: Re: [PATCH 3/3] staging: androind: Convert BUG() to WARN()
Date: Sun, 16 Aug 2020 20:43:40 +0300	[thread overview]
Message-ID: <20200816174340.GA236914@tsnow> (raw)
In-Reply-To: <df5e2206-51be-3fc7-ddc2-6f318a8e5a1a@infradead.org>

On Sun, Aug 16, 2020 at 10:34:50AM -0700, Randy Dunlap wrote:
> On 8/16/20 10:22 AM, Tomer Samara wrote:
> > replace BUG() with WARN() at ion_sytem_heap.c, this
> > fix the following checkpatch issue:
> > Avoid crashing the kernel - try using WARN_ON &
> > recovery code ratherthan BUG() or BUG_ON().
> > 
> > Signed-off-by: Tomer Samara <tomersamara98@gmail.com>
> > ---
> >  drivers/staging/android/ion/ion_system_heap.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
> > index eac0632ab4e8..37065a59ca69 100644
> > --- a/drivers/staging/android/ion/ion_system_heap.c
> > +++ b/drivers/staging/android/ion/ion_system_heap.c
> > @@ -30,7 +30,8 @@ static int order_to_index(unsigned int order)
> >  	for (i = 0; i < NUM_ORDERS; i++)
> >  		if (order == orders[i])
> >  			return i;
> > -	BUG();
> > +
> > +	WARN(1, "%s: Did not found index to order %d", __FUNCTION__, order);
> >  	return -1;
> >  }
> 
> Hi,
> Did you look at what happens when order_to_index() returns -1
> to its callers?
> 
> 
> Also: fix spelling in Subjects: android and BUG/BUG_ON
> 
> -- 
> ~Randy
> 

Hi,
yes I've made a patch for that too but it seems I forgot to
include him in the patch set.
I will send new version for this patch set soon.

Thanks
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Tomer Samara <tomersamara98@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, "Todd Kjos" <tkjos@android.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Riley Andrews" <riandrews@android.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Hridya Valsaraju" <hridya@google.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Laura Abbott" <labbott@redhat.com>,
	"Martijn Coenen" <maco@android.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian Brauner" <christian@brauner.io>
Subject: Re: [PATCH 3/3] staging: androind: Convert BUG() to WARN()
Date: Sun, 16 Aug 2020 20:43:40 +0300	[thread overview]
Message-ID: <20200816174340.GA236914@tsnow> (raw)
In-Reply-To: <df5e2206-51be-3fc7-ddc2-6f318a8e5a1a@infradead.org>

On Sun, Aug 16, 2020 at 10:34:50AM -0700, Randy Dunlap wrote:
> On 8/16/20 10:22 AM, Tomer Samara wrote:
> > replace BUG() with WARN() at ion_sytem_heap.c, this
> > fix the following checkpatch issue:
> > Avoid crashing the kernel - try using WARN_ON &
> > recovery code ratherthan BUG() or BUG_ON().
> > 
> > Signed-off-by: Tomer Samara <tomersamara98@gmail.com>
> > ---
> >  drivers/staging/android/ion/ion_system_heap.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
> > index eac0632ab4e8..37065a59ca69 100644
> > --- a/drivers/staging/android/ion/ion_system_heap.c
> > +++ b/drivers/staging/android/ion/ion_system_heap.c
> > @@ -30,7 +30,8 @@ static int order_to_index(unsigned int order)
> >  	for (i = 0; i < NUM_ORDERS; i++)
> >  		if (order == orders[i])
> >  			return i;
> > -	BUG();
> > +
> > +	WARN(1, "%s: Did not found index to order %d", __FUNCTION__, order);
> >  	return -1;
> >  }
> 
> Hi,
> Did you look at what happens when order_to_index() returns -1
> to its callers?
> 
> 
> Also: fix spelling in Subjects: android and BUG/BUG_ON
> 
> -- 
> ~Randy
> 

Hi,
yes I've made a patch for that too but it seems I forgot to
include him in the patch set.
I will send new version for this patch set soon.

Thanks

  reply	other threads:[~2020-08-17  7:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16 17:20 [PATCH 0/3] Replac BAG/BAG_ON with WARN/WARN_ON Tomer Samara
2020-08-16 17:20 ` Tomer Samara
2020-08-16 17:21 ` [PATCH 1/3] staging: androind: Replace BUG_ONs with WARN_ONs Tomer Samara
2020-08-16 17:21   ` Tomer Samara
2020-08-16 18:18   ` kernel test robot
2020-08-16 18:18     ` kernel test robot
2020-08-16 18:18     ` kernel test robot
2020-08-16 19:08   ` kernel test robot
2020-08-16 19:08     ` kernel test robot
2020-08-16 19:08     ` kernel test robot
2020-08-17  0:08   ` kernel test robot
2020-08-17  0:08     ` kernel test robot
2020-08-17  0:08     ` kernel test robot
2020-08-16 17:22 ` [PATCH 2/3] staging: androind: Add error handling to ion_page_pool_shrink Tomer Samara
2020-08-16 17:22   ` Tomer Samara
2020-08-16 17:22 ` [PATCH 3/3] staging: androind: Convert BUG() to WARN() Tomer Samara
2020-08-16 17:22   ` Tomer Samara
2020-08-16 17:34   ` Randy Dunlap
2020-08-16 17:34     ` Randy Dunlap
2020-08-16 17:43     ` Tomer Samara [this message]
2020-08-16 17:43       ` Tomer Samara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200816174340.GA236914@tsnow \
    --to=tomersamara98@gmail.com \
    --cc=arve@android.com \
    --cc=christian@brauner.io \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hridya@google.com \
    --cc=joel@joelfernandes.org \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maco@android.com \
    --cc=rdunlap@infradead.org \
    --cc=riandrews@android.com \
    --cc=surenb@google.com \
    --cc=tkjos@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.