public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Ionut Nicu <ionut.nicu@mindbit.ro>
To: Greg KH <greg@kroah.com>
Cc: "Sapiens, Rene" <rene.sapiens@ti.com>,
	Ionut Nicu <ionut.nicu@gmail.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>,
	Fernando Guzman Lugo <x0095840@ti.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [PATCH v2 08/12] staging: tidspbridge: convert rmgr to list_head
Date: Sun, 07 Nov 2010 14:11:24 +0200	[thread overview]
Message-ID: <1289131884.9931.166.camel@atlantis.mindbit.ro> (raw)
In-Reply-To: <20101106182610.GA7306@kroah.com>

Hi Greg,

On Sat, 2010-11-06 at 11:26 -0700, Greg KH wrote:
> On Sat, Nov 06, 2010 at 08:18:27PM +0200, Ionut Nicu wrote:
> > Hi Rene,
> > 
> > On Fri, 2010-11-05 at 18:07 -0600, Sapiens, Rene wrote:
> > > Hi Ionut,
> > > 
> > > On Fri, Nov 5, 2010 at 9:13 AM, Ionut Nicu <ionut.nicu@gmail.com> wrote:
> > > > Convert the rmgr module of the tidspbridge driver
> > > > to use struct list_head instead of struct lst_list.
> > > >
> > > > Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
> > > 
> > > <snip>
> > > 
> > > > diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
> > > 
> > > <snip>
> > > 
> > > > @@ -492,16 +465,17 @@ u32 drv_get_next_dev_object(u32 hdev_obj)
> > > >        u32 dw_next_dev_object = 0;
> > > >        struct drv_object *pdrv_obj;
> > > >        struct drv_data *drv_datap = dev_get_drvdata(bridge);
> > > > +       struct list_head *curr;
> > > >
> > > >        DBC_REQUIRE(hdev_obj != 0);
> > > 
> > > can we remove the DBC_REQUIRE and always check for !hdev_obj?
> > > 
> > 
> > Sounds ok to me.
> > 
> > As a general remark, I personally think that the DBC_* macros should be
> > replaced with BUG_ON, WARN_ON, but that's a subject for other patches.
> > What do you think? 
> 
> They should probably be deleted, I will not add any BUG_ON to a driver,
> nor should anyone else.  That's just rude behavior to crash the system,
> don't you think?
> 

You're right. Removing them sounds like a better plan. There over 1000
DBC_* lines in this driver, so I guess it will clean it up a little bit.

Just out of curiosity, in what cases is it acceptable to use
BUG_ON/WARN_ON?

Thanks,
Ionut.


  reply	other threads:[~2010-11-07 12:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05 15:13 [PATCH v2 00/12] staging: tidspbridge: various cleanups Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 01/12] staging: tidspbridge: remove gs memory allocator Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 02/12] staging: tidspbridge: remove utildefs Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 03/12] staging: tidspbridge: switch to linux bitmap API Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 04/12] staging: tidspbridge: remove gb bitmap implementation Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 05/12] staging: tidspbridge: rmgr/node.c code cleanup Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 06/12] staging: tidspbridge: convert core to list_head Ionut Nicu
2010-11-05 21:07   ` Sapiens, Rene
2010-11-06 17:21     ` Ionut Nicu
2010-11-08 19:15       ` Sapiens, Rene
2010-11-05 22:12   ` Sapiens, Rene
2010-11-06 17:31     ` Ionut Nicu
2010-11-08 19:16       ` Sapiens, Rene
2010-11-05 15:13 ` [PATCH v2 07/12] staging: tidspbridge: convert pmgr " Ionut Nicu
2010-11-05 22:41   ` Sapiens, Rene
2010-11-07 13:39     ` Ionut Nicu
2010-11-08 19:17       ` Sapiens, Rene
2010-11-05 15:13 ` [PATCH v2 08/12] staging: tidspbridge: convert rmgr " Ionut Nicu
2010-11-06  0:07   ` Sapiens, Rene
2010-11-06 18:18     ` Ionut Nicu
2010-11-06 18:26       ` Greg KH
2010-11-07 12:11         ` Ionut Nicu [this message]
2010-11-07 14:24           ` Nishanth Menon
2010-11-07 15:59           ` Greg KH
2010-11-08 19:18       ` Sapiens, Rene
2010-11-05 15:13 ` [PATCH v2 09/12] staging: tidspbridge: remove custom linked list Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 10/12] staging: tidspbridge: core code cleanup Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 11/12] staging: tidspbridge: pmgr " Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 12/12] staging: tidspbridge: rmgr " Ionut Nicu
2010-11-05 15:43 ` [PATCH v2 00/12] staging: tidspbridge: various cleanups Greg KH
2010-11-05 16:02   ` Ionut Nicu

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=1289131884.9931.166.camel@atlantis.mindbit.ro \
    --to=ionut.nicu@mindbit.ro \
    --cc=andy.shevchenko@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=greg@kroah.com \
    --cc=ionut.nicu@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=rene.sapiens@ti.com \
    --cc=x0095840@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox