Re: [PATCH] return hidden bug

2007-10-22 Thread Rene Herman
On 10/23/2007 01:00 AM, Ray Lee wrote: On 10/22/07, Rene Herman <[EMAIL PROTECTED]> wrote: Hugely trust inspiring isn't it -- the amount of eyes and comments you'll get even on trivial patches like this? This development model is working! Go easy with the snarkiness, hmm? It's the trivial o

Re: [PATCH] return hidden bug

2007-10-22 Thread Ray Lee
On 10/22/07, Rene Herman <[EMAIL PROTECTED]> wrote: > Hugely trust inspiring isn't it -- the amount of eyes and comments you'll > get even on trivial patches like this? This development model is working! Go easy with the snarkiness, hmm? It's the trivial ones that seem to be the most dangerous. Th

Re: [PATCH] return hidden bug

2007-10-22 Thread Rene Herman
On 10/22/2007 08:52 PM, Roel Kluin wrote: Ray Lee wrote: Arguing intentions is very dangerous. I've written code like that where the intention is to make it simple to turn a printk into a full bug and back and forth during development. At the end of the day, the fact remains that you're chang

Re: [PATCH] return hidden bug

2007-10-22 Thread Roel Kluin
Ray Lee wrote: >>> I'm sorry, perhaps I poured myself a cup of stupid this morning, but >>> isn't the above patch effectively introducing a BUG where none could >>> be reached before? In other words, for the patch to have zero >>> behavioral change, wouldn't it have to remove the BUG() altogether?

Re: [PATCH] return hidden bug

2007-10-22 Thread Matt Mackall
On Sun, Oct 21, 2007 at 09:42:09PM -0400, Rik van Riel wrote: > On Mon, 22 Oct 2007 03:05:05 +0200 > Roel Kluin <[EMAIL PROTECTED]> wrote: > > > return hidden bug > > > > Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> > > > > diff --git a/arch/alpha/kernel/pci_iommu.c > > b/arch/alpha

Re: [PATCH] return hidden bug

2007-10-22 Thread Ray Lee
On 10/22/07, Roel Kluin <[EMAIL PROTECTED]> wrote: > Ray Lee wrote: > > > I'm sorry, perhaps I poured myself a cup of stupid this morning, but > > isn't the above patch effectively introducing a BUG where none could > > be reached before? In other words, for the patch to have zero > > behavioral ch

Re: [PATCH] return hidden bug

2007-10-22 Thread Roel Kluin
Ray Lee wrote: > I'm sorry, perhaps I poured myself a cup of stupid this morning, but > isn't the above patch effectively introducing a BUG where none could > be reached before? In other words, for the patch to have zero > behavioral change, wouldn't it have to remove the BUG() altogether? True,

Re: [PATCH] return hidden bug

2007-10-22 Thread Ray Lee
On 10/21/07, Rik van Riel <[EMAIL PROTECTED]> wrote: > On Mon, 22 Oct 2007 03:05:05 +0200 > Roel Kluin <[EMAIL PROTECTED]> wrote: > > > return hidden bug > > > > Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> > > > > diff --git a/arch/alpha/kernel/pci_iommu.c > > b/arch/alpha/kernel/pci_iomm

Re: [PATCH] return hidden bug

2007-10-22 Thread Pekka Enberg
Hi Rik, On 10/22/07, Rik van Riel <[EMAIL PROTECTED]> wrote: > On Mon, 22 Oct 2007 12:30:00 +0300 > I guess people who disable CONFIG_BUG really choose to shoot themselves > in the foot when something bad happens. The kernel is full of error > paths where the current thread really should not be c

Re: [PATCH] return hidden bug

2007-10-22 Thread Rik van Riel
On Mon, 22 Oct 2007 12:30:00 +0300 "Pekka Enberg" <[EMAIL PROTECTED]> wrote: > On 10/22/07, Rik van Riel <[EMAIL PROTECTED]> wrote: > > BUG() will terminate the process that runs into it, so you can > > just remove the return alltogether. If BUG() is hit, the return > > will never be reached. > >

Re: [PATCH] return hidden bug

2007-10-22 Thread Pekka Enberg
Hi, On 10/22/07, Rik van Riel <[EMAIL PROTECTED]> wrote: > BUG() will terminate the process that runs into it, so you can > just remove the return alltogether. If BUG() is hit, the return > will never be reached. This isn't true when CONFIG_BUG is disabled (in embedded builds, for example).

Re: [PATCH] return hidden bug

2007-10-21 Thread Herbert Xu
On Mon, Oct 22, 2007 at 01:42:09AM +, Rik van Riel wrote: > > BUG() will terminate the process that runs into it, so you can > just remove the return alltogether. If BUG() is hit, the return > will never be reached. This is true in general. However, if someone builds the kernel with CONFIG_B

Re: [PATCH] return hidden bug

2007-10-21 Thread Rik van Riel
On Mon, 22 Oct 2007 03:53:30 +0200 Roel Kluin <[EMAIL PROTECTED]> wrote: > hidden bug returns > > Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> Acked-by: Rik van Riel <[EMAIL PROTECTED]> -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write

Re: [PATCH] return hidden bug

2007-10-21 Thread Roel Kluin
Rik van Riel wrote: > On Mon, 22 Oct 2007 03:05:05 +0200 > Roel Kluin <[EMAIL PROTECTED]> wrote: > >> return hidden bug >> >> Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> >> >> diff --git a/arch/alpha/kernel/pci_iommu.c >> b/arch/alpha/kernel/pci_iommu.c index e1c4707..6a69425 100644

Re: [PATCH] return hidden bug

2007-10-21 Thread Rik van Riel
On Mon, 22 Oct 2007 03:05:05 +0200 Roel Kluin <[EMAIL PROTECTED]> wrote: > return hidden bug > > Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> > > diff --git a/arch/alpha/kernel/pci_iommu.c > b/arch/alpha/kernel/pci_iommu.c index e1c4707..6a69425 100644 > --- a/arch/alpha/kernel/pci_

[PATCH] return hidden bug

2007-10-21 Thread Roel Kluin
return hidden bug Signed-off-by: Roel Kluin <[EMAIL PROTECTED]> diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index e1c4707..6a69425 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c @@ -365,8 +365,8 @@ pci_unmap_single(struct