linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Input: remove a duplicative NULL test
@ 2014-02-21  8:55 Dan Carpenter
  2014-02-21  9:14 ` fugang.duan
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2014-02-21  8:55 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Paul Gortmaker, Jingoo Han, Fugang Duan, Benson Leung,
	Daniel Kurtz, linux-input, kernel-janitors

"pdata" is non-NULL here.  We verified that at the start of the
function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index a70400754e92..40abe90cc924 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1146,7 +1146,7 @@ static int mxt_probe(struct i2c_client *client,
 		goto err_free_mem;
 	}
 
-	data->is_tp = pdata && pdata->is_tp;
+	data->is_tp = pdata->is_tp;
 
 	input_dev->name = (data->is_tp) ? "Atmel maXTouch Touchpad" :
 					  "Atmel maXTouch Touchscreen";

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

* RE: [patch] Input: remove a duplicative NULL test
  2014-02-21  8:55 Dan Carpenter
@ 2014-02-21  9:14 ` fugang.duan
  2014-03-13  4:24   ` Benson Leung
  0 siblings, 1 reply; 5+ messages in thread
From: fugang.duan @ 2014-02-21  9:14 UTC (permalink / raw)
  To: Dan Carpenter, Dmitry Torokhov
  Cc: Paul Gortmaker, Jingoo Han, Benson Leung, Daniel Kurtz,
	linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org

From: Dan Carpenter <dan.carpenter@oracle.com>
Data: Friday, February 21, 2014 4:55 PM

>To: Dmitry Torokhov
>Cc: Paul Gortmaker; Jingoo Han; Duan Fugang-B38611; Benson Leung; Daniel Kurtz;
>linux-input@vger.kernel.org; kernel-janitors@vger.kernel.org
>Subject: [patch] Input: remove a duplicative NULL test
>
>"pdata" is non-NULL here.  We verified that at the start of the function.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
>diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c
>b/drivers/input/touchscreen/atmel_mxt_ts.c
>index a70400754e92..40abe90cc924 100644
>--- a/drivers/input/touchscreen/atmel_mxt_ts.c
>+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
>@@ -1146,7 +1146,7 @@ static int mxt_probe(struct i2c_client *client,
> 		goto err_free_mem;
> 	}
>
>-	data->is_tp = pdata && pdata->is_tp;
>+	data->is_tp = pdata->is_tp;
>
> 	input_dev->name = (data->is_tp) ? "Atmel maXTouch Touchpad" :
> 					  "Atmel maXTouch Touchscreen";
>
Agree, it is redundant. And if you have free time, you can convert the driver to support devicetree.

Acked-by: Fugang Duan <B38611@freescale.com>

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

* Re: [patch] Input: remove a duplicative NULL test
@ 2014-02-23 23:23 Jingoo Han
  0 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2014-02-23 23:23 UTC (permalink / raw)
  To: fugang.duan@freescale.com, Dan Carpenter, Dmitry Torokhov
  Cc: Paul Gortmaker, Benson Leung, Daniel Kurtz,
	linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Jingoo Han

On Friday, February 21, 2014 6:15 PM, fugang.duan@freescale.com wrote:
> 
> From: Dan Carpenter <dan.carpenter@oracle.com>
> Data: Friday, February 21, 2014 4:55 PM
> 
> >To: Dmitry Torokhov
> >Cc: Paul Gortmaker; Jingoo Han; Duan Fugang-B38611; Benson Leung; Daniel Kurtz;
> >linux-input@vger.kernel.org; kernel-janitors@vger.kernel.org
> >Subject: [patch] Input: remove a duplicative NULL test
> >
> >"pdata" is non-NULL here.  We verified that at the start of the function.
> >
> >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> >diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c
> >b/drivers/input/touchscreen/atmel_mxt_ts.c
> >index a70400754e92..40abe90cc924 100644
> >--- a/drivers/input/touchscreen/atmel_mxt_ts.c
> >+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> >@@ -1146,7 +1146,7 @@ static int mxt_probe(struct i2c_client *client,
> > 		goto err_free_mem;
> > 	}
> >
> >-	data->is_tp = pdata && pdata->is_tp;
> >+	data->is_tp = pdata->is_tp;
> >
> > 	input_dev->name = (data->is_tp) ? "Atmel maXTouch Touchpad" :
> > 					  "Atmel maXTouch Touchscreen";
> >
> Agree, it is redundant. And if you have free time, you can convert the driver to support devicetree.
> 
> Acked-by: Fugang Duan <B38611@freescale.com>

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

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

* Re: [patch] Input: remove a duplicative NULL test
  2014-02-21  9:14 ` fugang.duan
@ 2014-03-13  4:24   ` Benson Leung
  2014-03-19 16:02     ` Nick Dyer
  0 siblings, 1 reply; 5+ messages in thread
From: Benson Leung @ 2014-03-13  4:24 UTC (permalink / raw)
  To: fugang.duan@freescale.com, Nick Dyer
  Cc: Dan Carpenter, Dmitry Torokhov, Paul Gortmaker, Jingoo Han,
	Daniel Kurtz, linux-input@vger.kernel.org,
	kernel-janitors@vger.kernel.org

On Fri, Feb 21, 2014 at 1:14 AM, fugang.duan@freescale.com
<fugang.duan@freescale.com> wrote:
>
> Agree, it is redundant. And if you have free time, you can convert the driver to support devicetree.

Please check with Nick Dyer before you convert this driver to support
devicetree. Much of the platform data this driver uses has been
eliminated or consolidated in a patch series that he's been working
on.



-- 
Benson Leung
Software Engineer, Chrom* OS
bleung@chromium.org

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

* Re: [patch] Input: remove a duplicative NULL test
  2014-03-13  4:24   ` Benson Leung
@ 2014-03-19 16:02     ` Nick Dyer
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Dyer @ 2014-03-19 16:02 UTC (permalink / raw)
  To: Benson Leung, fugang.duan@freescale.com
  Cc: Dan Carpenter, Dmitry Torokhov, Paul Gortmaker, Jingoo Han,
	Daniel Kurtz, linux-input@vger.kernel.org,
	kernel-janitors@vger.kernel.org

> On Fri, Feb 21, 2014 at 1:14 AM, fugang.duan@freescale.com
> <fugang.duan@freescale.com> wrote:
>>
>> Agree, it is redundant. And if you have free time, you can convert
>> the driver to support devicetree.
> 
> Please check with Nick Dyer before you convert this driver to support
> devicetree. Much of the platform data this driver uses has been
> eliminated or consolidated in a patch series that he's been working
> on.

If you look at the "improve T19 GPIO keys handling" patch in the patch set
I posted to linux-input on 17th March, this redundant NULL test has been
removed.

I want to remove most of the existing platform data since it is not generic
across all chips - see "remove unnecessary platform data" and "read screen
config from chip" in that series of patches. It's high priority on my list
to implement device tree support for the remaining items, which will be
just irqflags and the touchpad key config.

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

end of thread, other threads:[~2014-03-19 16:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 23:23 [patch] Input: remove a duplicative NULL test Jingoo Han
  -- strict thread matches above, loose matches on Subject: below --
2014-02-21  8:55 Dan Carpenter
2014-02-21  9:14 ` fugang.duan
2014-03-13  4:24   ` Benson Leung
2014-03-19 16:02     ` Nick Dyer

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).