linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Fix warning: using int as NULL pointer
@ 2012-06-20 11:40 Andrei Emeltchenko
  2012-06-26 11:59 ` Andrei Emeltchenko
  2012-06-30 15:09 ` Gustavo Padovan
  0 siblings, 2 replies; 3+ messages in thread
From: Andrei Emeltchenko @ 2012-06-20 11:40 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

Fix for warnings below:

...
drivers/bluetooth/bt3c_cs.c:667:20: warning: Using plain integer
	as NULL pointer
drivers/bluetooth/btuart_cs.c:596:20: warning: Using plain integer
	as NULL pointer
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
 drivers/bluetooth/bt3c_cs.c   |    2 +-
 drivers/bluetooth/btuart_cs.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index b2b0fbb..8925b6d 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -664,7 +664,7 @@ static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data)
 {
 	int *try = priv_data;
 
-	if (try == 0)
+	if (!try)
 		p_dev->io_lines = 16;
 
 	if ((p_dev->resource[0]->end != 8) || (p_dev->resource[0]->start == 0))
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 65b8d99..21e803a 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -593,7 +593,7 @@ static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data)
 {
 	int *try = priv_data;
 
-	if (try == 0)
+	if (!try)
 		p_dev->io_lines = 16;
 
 	if ((p_dev->resource[0]->end != 8) || (p_dev->resource[0]->start == 0))
-- 
1.7.9.5


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

* Re: [PATCH] Bluetooth: Fix warning: using int as NULL pointer
  2012-06-20 11:40 [PATCH] Bluetooth: Fix warning: using int as NULL pointer Andrei Emeltchenko
@ 2012-06-26 11:59 ` Andrei Emeltchenko
  2012-06-30 15:09 ` Gustavo Padovan
  1 sibling, 0 replies; 3+ messages in thread
From: Andrei Emeltchenko @ 2012-06-26 11:59 UTC (permalink / raw)
  To: linux-bluetooth

On Wed, Jun 20, 2012 at 02:40:12PM +0300, Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> Fix for warnings below:
> 
> ...
> drivers/bluetooth/bt3c_cs.c:667:20: warning: Using plain integer
> 	as NULL pointer
> drivers/bluetooth/btuart_cs.c:596:20: warning: Using plain integer
> 	as NULL pointer
> ...
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

ping


> ---
>  drivers/bluetooth/bt3c_cs.c   |    2 +-
>  drivers/bluetooth/btuart_cs.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
> index b2b0fbb..8925b6d 100644
> --- a/drivers/bluetooth/bt3c_cs.c
> +++ b/drivers/bluetooth/bt3c_cs.c
> @@ -664,7 +664,7 @@ static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data)
>  {
>  	int *try = priv_data;
>  
> -	if (try == 0)
> +	if (!try)
>  		p_dev->io_lines = 16;
>  
>  	if ((p_dev->resource[0]->end != 8) || (p_dev->resource[0]->start == 0))
> diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
> index 65b8d99..21e803a 100644
> --- a/drivers/bluetooth/btuart_cs.c
> +++ b/drivers/bluetooth/btuart_cs.c
> @@ -593,7 +593,7 @@ static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data)
>  {
>  	int *try = priv_data;
>  
> -	if (try == 0)
> +	if (!try)
>  		p_dev->io_lines = 16;
>  
>  	if ((p_dev->resource[0]->end != 8) || (p_dev->resource[0]->start == 0))
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] Bluetooth: Fix warning: using int as NULL pointer
  2012-06-20 11:40 [PATCH] Bluetooth: Fix warning: using int as NULL pointer Andrei Emeltchenko
  2012-06-26 11:59 ` Andrei Emeltchenko
@ 2012-06-30 15:09 ` Gustavo Padovan
  1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2012-06-30 15:09 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-20 14:40:12 +0300]:

> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> Fix for warnings below:
> 
> ...
> drivers/bluetooth/bt3c_cs.c:667:20: warning: Using plain integer
> 	as NULL pointer
> drivers/bluetooth/btuart_cs.c:596:20: warning: Using plain integer
> 	as NULL pointer
> ...
> 
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
>  drivers/bluetooth/bt3c_cs.c   |    2 +-
>  drivers/bluetooth/btuart_cs.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Patch has been applied to bluetooth-next, thanks.

	Gustavo

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

end of thread, other threads:[~2012-06-30 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 11:40 [PATCH] Bluetooth: Fix warning: using int as NULL pointer Andrei Emeltchenko
2012-06-26 11:59 ` Andrei Emeltchenko
2012-06-30 15:09 ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).