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 <[email protected]> wrote:
> > > > Convert the rmgr module of the tidspbridge driver
> > > > to use struct list_head instead of struct lst_list.
> > > >
> > > > Signed-off-by: Ionut Nicu <[email protected]>
> > > 
> > > <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.

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to