From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dan Carpenter <error27@gmail.com>,
Todd Fischer <todd.fischer@ridgerun.com>,
Samuel Ortiz <sameo@linux.intel.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-j
Subject: Re: [patch 2/2] input/tps6507x-ts: zero vs NULL
Date: Mon, 31 May 2010 19:10:29 +0000 [thread overview]
Message-ID: <20100531191029.GD30712@core.coreip.homeip.net> (raw)
In-Reply-To: <20100531120215.GS5483@bicker>
On Mon, May 31, 2010 at 02:02:15PM +0200, Dan Carpenter wrote:
> This patch silences a sparse warning:
>
> drivers/input/touchscreen/tps6507x-ts.c:345:19:
> warning: Using plain integer as NULL pointer
> drivers/input/touchscreen/tps6507x-ts.c:367:19:
> warning: Using plain integer as NULL pointer
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
> index b99db09..1e57e4e 100644
> --- a/drivers/input/touchscreen/tps6507x-ts.c
> +++ b/drivers/input/touchscreen/tps6507x-ts.c
> @@ -342,7 +342,7 @@ err2:
> cancel_delayed_work(&tsc->work);
> flush_workqueue(tsc->wq);
> destroy_workqueue(tsc->wq);
> - tsc->wq = 0;
> + tsc->wq = NULL;
> input_free_device(input_dev);
> err1:
> kfree(tsc);
> @@ -364,7 +364,7 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev)
> cancel_delayed_work(&tsc->work);
> flush_workqueue(tsc->wq);
Why isn't it cancel_delayed_work_sync()?
> destroy_workqueue(tsc->wq);
> - tsc->wq = 0;
> + tsc->wq = NULL;
>
Setting tsc to 0/NULL does not make much sense as it is being freed a
couple of lines below.
> input_free_device(input_dev);
>
--
Dmitry
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dan Carpenter <error27@gmail.com>,
Todd Fischer <todd.fischer@ridgerun.com>,
Samuel Ortiz <sameo@linux.intel.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-j
Subject: Re: [patch 2/2] input/tps6507x-ts: zero vs NULL
Date: Mon, 31 May 2010 12:10:29 -0700 [thread overview]
Message-ID: <20100531191029.GD30712@core.coreip.homeip.net> (raw)
In-Reply-To: <20100531120215.GS5483@bicker>
On Mon, May 31, 2010 at 02:02:15PM +0200, Dan Carpenter wrote:
> This patch silences a sparse warning:
>
> drivers/input/touchscreen/tps6507x-ts.c:345:19:
> warning: Using plain integer as NULL pointer
> drivers/input/touchscreen/tps6507x-ts.c:367:19:
> warning: Using plain integer as NULL pointer
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
> index b99db09..1e57e4e 100644
> --- a/drivers/input/touchscreen/tps6507x-ts.c
> +++ b/drivers/input/touchscreen/tps6507x-ts.c
> @@ -342,7 +342,7 @@ err2:
> cancel_delayed_work(&tsc->work);
> flush_workqueue(tsc->wq);
> destroy_workqueue(tsc->wq);
> - tsc->wq = 0;
> + tsc->wq = NULL;
> input_free_device(input_dev);
> err1:
> kfree(tsc);
> @@ -364,7 +364,7 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev)
> cancel_delayed_work(&tsc->work);
> flush_workqueue(tsc->wq);
Why isn't it cancel_delayed_work_sync()?
> destroy_workqueue(tsc->wq);
> - tsc->wq = 0;
> + tsc->wq = NULL;
>
Setting tsc to 0/NULL does not make much sense as it is being freed a
couple of lines below.
> input_free_device(input_dev);
>
--
Dmitry
WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dan Carpenter <error27@gmail.com>,
Todd Fischer <todd.fischer@ridgerun.com>,
Samuel Ortiz <sameo@linux.intel.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] input/tps6507x-ts: zero vs NULL
Date: Mon, 31 May 2010 12:10:29 -0700 [thread overview]
Message-ID: <20100531191029.GD30712@core.coreip.homeip.net> (raw)
In-Reply-To: <20100531120215.GS5483@bicker>
On Mon, May 31, 2010 at 02:02:15PM +0200, Dan Carpenter wrote:
> This patch silences a sparse warning:
>
> drivers/input/touchscreen/tps6507x-ts.c:345:19:
> warning: Using plain integer as NULL pointer
> drivers/input/touchscreen/tps6507x-ts.c:367:19:
> warning: Using plain integer as NULL pointer
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
> index b99db09..1e57e4e 100644
> --- a/drivers/input/touchscreen/tps6507x-ts.c
> +++ b/drivers/input/touchscreen/tps6507x-ts.c
> @@ -342,7 +342,7 @@ err2:
> cancel_delayed_work(&tsc->work);
> flush_workqueue(tsc->wq);
> destroy_workqueue(tsc->wq);
> - tsc->wq = 0;
> + tsc->wq = NULL;
> input_free_device(input_dev);
> err1:
> kfree(tsc);
> @@ -364,7 +364,7 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev)
> cancel_delayed_work(&tsc->work);
> flush_workqueue(tsc->wq);
Why isn't it cancel_delayed_work_sync()?
> destroy_workqueue(tsc->wq);
> - tsc->wq = 0;
> + tsc->wq = NULL;
>
Setting tsc to 0/NULL does not make much sense as it is being freed a
couple of lines below.
> input_free_device(input_dev);
>
--
Dmitry
next prev parent reply other threads:[~2010-05-31 19:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 12:02 [patch 2/2] input/tps6507x-ts: zero vs NULL Dan Carpenter
2010-05-31 12:02 ` Dan Carpenter
2010-05-31 19:10 ` Dmitry Torokhov [this message]
2010-05-31 19:10 ` Dmitry Torokhov
2010-05-31 19:10 ` Dmitry Torokhov
2010-05-31 21:07 ` Dan Carpenter
2010-05-31 21:07 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100531191029.GD30712@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=error27@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=todd.fischer@ridgerun.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.