Re: [PATCH] vmxnet3: convert BUG_ON(true) into a simple BUG()

2012-11-11 Thread Ryan Mallon
On 09/11/12 07:23, Sasha Levin wrote:
> Signed-off-by: Sasha Levin 
> ---
>  drivers/net/vmxnet3/vmxnet3_drv.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c 
> b/drivers/net/vmxnet3/vmxnet3_drv.c
> index 0ae1bcc..7e9622f 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
> @@ -1922,7 +1922,7 @@ vmxnet3_free_irqs(struct vmxnet3_adapter *adapter)
>   free_irq(adapter->pdev->irq, adapter->netdev);
>   break;
>   default:
> - BUG_ON(true);
> + BUG();
>   }
>  }

All of the BUG_ON tests in this function look like programming error
assertions. It looks like the worst that would happen is that some irqs
might not be properly released, not the sort of thing that is going to
make the system unstable if you don't bug.

Can't they just be replaced with (for example):

if (WARN_ON(blah))
return;

Or even just:

netdev_err(adapter->netdev, "bad irq type %d for free\n",
intr->type);

~Ryan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] vmxnet3: convert BUG_ON(true) into a simple BUG()

2012-11-09 Thread David Miller
From: Shreyas Bhatewara 
Date: Thu, 8 Nov 2012 22:02:16 -0800 (PST)

> 
> - Original Message -
>> Signed-off-by: Sasha Levin 
>> ---
>>  drivers/net/vmxnet3/vmxnet3_drv.c |2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Signed-off-by: Shreyas N Bhatewara 

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] vmxnet3: convert BUG_ON(true) into a simple BUG()

2012-11-08 Thread Shreyas Bhatewara

- Original Message -
> Signed-off-by: Sasha Levin 
> ---
>  drivers/net/vmxnet3/vmxnet3_drv.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Shreyas N Bhatewara 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] vmxnet3: convert BUG_ON(true) into a simple BUG()

2012-11-08 Thread Sasha Levin
Signed-off-by: Sasha Levin 
---
 drivers/net/vmxnet3/vmxnet3_drv.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c 
b/drivers/net/vmxnet3/vmxnet3_drv.c
index 0ae1bcc..7e9622f 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1922,7 +1922,7 @@ vmxnet3_free_irqs(struct vmxnet3_adapter *adapter)
free_irq(adapter->pdev->irq, adapter->netdev);
break;
default:
-   BUG_ON(true);
+   BUG();
}
 }
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/