All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [Patch] change if() BUG();
@ 2006-01-17 21:25 Eric Sesterhenn / snakebyte
  2006-01-17 22:24 ` Alexey Dobriyan
  2006-01-19  2:53 ` Adrian Bunk
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Sesterhenn / snakebyte @ 2006-01-17 21:25 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

hi,

this patch changes the if() BUG(); construct in
drivers/ieee1394/cmp.c to a BUG_ON; so defining
BUG to a no-op is safe.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.15-git11/drivers/ieee1394/cmp.c.orig	2006-01-17 22:11:13.000000000 +0100
+++ linux-2.6.15-git11/drivers/ieee1394/cmp.c	2006-01-17 22:11:29.000000000 +0100
@@ -129,7 +129,7 @@ void cmp_unregister_opcr(struct hpsb_hos
 
 	ch = hpsb_get_hostinfo(&cmp_highlevel, host);
 	plug = (struct plug *)opcr;
-	if (plug - ch->opcr >= ch->u.ompr.nplugs) BUG();
+	BUG_ON(plug - ch->opcr >= ch->u.ompr.nplugs);
 
 	plug->u.pcr.online = 0;
 	plug->update = NULL;



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] [Patch] change if() BUG();
  2006-01-17 21:25 [KJ] [Patch] change if() BUG(); Eric Sesterhenn / snakebyte
@ 2006-01-17 22:24 ` Alexey Dobriyan
  2006-01-19  2:53 ` Adrian Bunk
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2006-01-17 22:24 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

On Tue, Jan 17, 2006 at 10:25:11PM +0100, Eric Sesterhenn / snakebyte wrote:
> this patch changes the if() BUG(); construct in
> drivers/net/ixgb/ixgb_osdep.h to a BUG_ON; so defining
> BUG to a no-op is safe.

> --- linux-2.6.15-git11/drivers/net/ixgb/ixgb_osdep.h.orig
> +++ linux-2.6.15-git11/drivers/net/ixgb/ixgb_osdep.h
> @@ -60,7 +60,7 @@ typedef enum {
>  } boolean_t;
>
>  #undef ASSERT
> -#define ASSERT(x)	if(!(x)) BUG()
> +#define ASSERT(x)	BUG_ON(!(x))

Naah. Just Drop It (TM).


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] [Patch] change if() BUG();
  2006-01-17 21:25 [KJ] [Patch] change if() BUG(); Eric Sesterhenn / snakebyte
  2006-01-17 22:24 ` Alexey Dobriyan
@ 2006-01-19  2:53 ` Adrian Bunk
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2006-01-19  2:53 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

On Wed, Jan 18, 2006 at 01:24:02AM +0300, Alexey Dobriyan wrote:
> On Tue, Jan 17, 2006 at 10:25:11PM +0100, Eric Sesterhenn / snakebyte wrote:
> > this patch changes the if() BUG(); construct in
> > drivers/net/ixgb/ixgb_osdep.h to a BUG_ON; so defining
> > BUG to a no-op is safe.
> 
> > --- linux-2.6.15-git11/drivers/net/ixgb/ixgb_osdep.h.orig
> > +++ linux-2.6.15-git11/drivers/net/ixgb/ixgb_osdep.h
> > @@ -60,7 +60,7 @@ typedef enum {
> >  } boolean_t;
> >
> >  #undef ASSERT
> > -#define ASSERT(x)	if(!(x)) BUG()
> > +#define ASSERT(x)	BUG_ON(!(x))
> 
> Naah. Just Drop It (TM).

AFAIR, this driver is both actively maintained by Intel and shared 
between operating systems (e.g. FreeBSD contains the same driver).

Therefore dropping this ASSERT is not possible.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2006-01-19  2:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-17 21:25 [KJ] [Patch] change if() BUG(); Eric Sesterhenn / snakebyte
2006-01-17 22:24 ` Alexey Dobriyan
2006-01-19  2:53 ` Adrian Bunk

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.