linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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
* [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

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