Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562102

Re: [PATCH 24/33] Input: ar1021_i2c - Drop unnecessary call to i2c_set_clientdata and other changes

From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 24/33] Input: ar1021_i2c - Drop unnecessary call to i2c_set_clientdata and other changes
Date 2017-01-18 20:30 +0100
Message-ID <t145I-86O-29@gated-at.bofh.it> (permalink)
References <t12wV-72O-9@gated-at.bofh.it> <t12GE-76Z-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jan 18, 2017 at 09:46:45AM -0800, Guenter Roeck wrote:
> There is no call to i2c_get_clientdata() or dev_get_drvdata().
> Drop the unnecessary call to i2c_set_clientdata().

Kept just this part and applied.

> 
> This conversion was done automatically with coccinelle using the
> following semantic patches. The semantic patches and the scripts
> used to generate this commit log are available at
> https://github.com/groeck/coccinelle-patches
> 
> - Replace 'goto l; ... l: return e;' with 'return e;'
> - Drop i2c_set_clientdata()
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/input/touchscreen/ar1021_i2c.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c
> index 71b5a634cf6d..b289eca2b797 100644
> --- a/drivers/input/touchscreen/ar1021_i2c.c
> +++ b/drivers/input/touchscreen/ar1021_i2c.c
> @@ -35,11 +35,11 @@ static irqreturn_t ar1021_i2c_irq(int irq, void *dev_id)
>  	retval = i2c_master_recv(ar1021->client,
>  				ar1021->data, sizeof(ar1021->data));
>  	if (retval != sizeof(ar1021->data))
> -		goto out;
> +		return IRQ_HANDLED;
>  
>  	/* sync bit set ? */
>  	if ((data[0] & 0x80) == 0)
> -		goto out;
> +		return IRQ_HANDLED;
>  
>  	button = data[0] & BIT(0);
>  	x = ((data[2] & 0x1f) << 7) | (data[1] & 0x7f);
> @@ -50,7 +50,6 @@ static irqreturn_t ar1021_i2c_irq(int irq, void *dev_id)
>  	input_report_key(input, BTN_TOUCH, button);
>  	input_sync(input);
>  
> -out:
>  	return IRQ_HANDLED;
>  }
>  
> @@ -127,7 +126,6 @@ static int ar1021_i2c_probe(struct i2c_client *client,
>  		return error;
>  	}
>  
> -	i2c_set_clientdata(client, ar1021);
>  	return 0;
>  }
>  
> -- 
> 2.7.4
> 

-- 
Dmitry

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/33] Input: Automated coccinelle cleanup Guenter Roeck <linux@roeck-us.net> - 2017-01-18 18:50 +0100
  [PATCH 02/33] Input: bcm-keypad - Drop unnecessary call to platform_set_drvdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 18:50 +0100
  [PATCH 29/33] Input: melfas_mip4 - Use devm_add_action_or_reset and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 18:50 +0100
    Re: [PATCH 29/33] Input: melfas_mip4 - Use devm_add_action_or_reset  and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:30 +0100
  [PATCH 04/33] Input: cros_ec_keyb - Drop unnecessary call to dev_set_drvdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 18:50 +0100
    Re: [PATCH 04/33] Input: cros_ec_keyb - Drop unnecessary call to  dev_set_drvdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 19:40 +0100
  [PATCH 23/33] Input: xilinx_ps2 - Use 'dev' instead of dereferencing it and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 23/33] Input: xilinx_ps2 - Use 'dev' instead of  dereferencing it and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:30 +0100
  [PATCH 12/33] Input: axp20x-pek - Use devm_add_action_or_reset and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
  [PATCH 20/33] Input: elan_i2c_core - Use 'dev' instead of dereferencing it and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
  [PATCH 22/33] Input: at32psif - Drop unnecessary error messages and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 22/33] Input: at32psif - Drop unnecessary error messages  and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:20 +0100
  [PATCH 10/33] Input: twl4030_keypad - Drop unnecessary call to platform_set_drvdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 10/33] Input: twl4030_keypad - Drop unnecessary call to  platform_set_drvdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:50 +0100
  [PATCH 14/33] Input: gpio_decoder - Drop unnecessary call to platform_set_drvdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 14/33] Input: gpio_decoder - Drop unnecessary call to  platform_set_drvdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:50 +0100
  [PATCH 15/33] Input: kxtj9 - Drop unnecessary error messages and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
  [PATCH 27/33] Input: eeti_ts - Drop unnecessary error messages and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 27/33] Input: eeti_ts - Drop unnecessary error messages  and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:30 +0100
  [PATCH 08/33] Input: spear-keyboard - Drop unnecessary error messages and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 08/33] Input: spear-keyboard - Drop unnecessary error  messages and other changes Viresh Kumar <viresh.kumar@linaro.org> - 2017-01-19 05:00 +0100
  [PATCH 19/33] Input: tps65218-pwrbutton - Drop unnecessary call to platform_set_drvdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 19/33] Input: tps65218-pwrbutton - Drop unnecessary call  to platform_set_drvdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:50 +0100
  [PATCH 07/33] Input: sh_keysc - Drop unnecessary error messages and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
  [PATCH 28/33] Input: egalax_ts - Drop unnecessary call to i2c_set_clientdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 28/33] Input: egalax_ts - Drop unnecessary call to  i2c_set_clientdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:40 +0100
      Re: [PATCH 28/33] Input: egalax_ts - Drop unnecessary call to  i2c_set_clientdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 21:40 +0100
  [PATCH 11/33] Input: ab8500-ponkey - Drop unnecessary call to platform_set_drvdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 11/33] Input: ab8500-ponkey - Drop unnecessary call to  platform_set_drvdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:50 +0100
  [PATCH 17/33] Input: retu-pwrbutton - Simplify error return and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
  [PATCH 13/33] Input: bfin_rotary - Use 'dev' instead of dereferencing it and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 13/33] Input: bfin_rotary - Use 'dev' instead of  dereferencing it and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:50 +0100
      Re: [PATCH 13/33] Input: bfin_rotary - Use 'dev' instead of  dereferencing it and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 21:40 +0100
        Re: [PATCH 13/33] Input: bfin_rotary - Use 'dev' instead of  dereferencing it and other changes Joe Perches <joe@perches.com> - 2017-01-19 06:10 +0100
          Re: [PATCH 13/33] Input: bfin_rotary - Use 'dev' instead of  dereferencing it and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-19 09:30 +0100
  [PATCH 25/33] Input: atmel-wm97xx - Drop unnecessary error messages and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 25/33] Input: atmel-wm97xx - Drop unnecessary error  messages and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:30 +0100
  [PATCH 09/33] Input: sun4i-lradc-keys - Drop unnecessary call to platform_set_drvdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
  [PATCH 16/33] Input: mma8450 - Drop unnecessary call to i2c_set_clientdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 16/33] Input: mma8450 - Drop unnecessary call to  i2c_set_clientdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:50 +0100
  [PATCH 18/33] Input: soc_button_array - Use 'dev' instead of dereferencing it and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 18/33] Input: soc_button_array - Use 'dev' instead of  dereferencing it and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:50 +0100
  [PATCH 26/33] Input: atmel_mxt_ts - Drop unnecessary error messages and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
  [PATCH 24/33] Input: ar1021_i2c - Drop unnecessary call to i2c_set_clientdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 19:00 +0100
    Re: [PATCH 24/33] Input: ar1021_i2c - Drop unnecessary call to  i2c_set_clientdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 20:30 +0100
  [PATCH 32/33] Input: sis_i2c - Drop unnecessary call to i2c_set_clientdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 21:40 +0100
    Re: [PATCH 32/33] Input: sis_i2c - Drop unnecessary call to  i2c_set_clientdata and other changes Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-18 23:30 +0100
  [PATCH 33/33] Input: sx8654 - Drop unnecessary call to i2c_set_clientdata and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 21:40 +0100
  [PATCH 31/33] Input: rohm_bu21023 - Use 'dev' instead of dereferencing it and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 21:40 +0100
  [PATCH 30/33] Input: raydium_i2c_ts - Simplify error return and other changes Guenter Roeck <linux@roeck-us.net> - 2017-01-18 21:40 +0100
  Re: [PATCH 00/33] Input: Automated coccinelle cleanup Joe Perches <joe@perches.com> - 2017-01-19 02:50 +0100
    Re: [PATCH 00/33] Input: Automated coccinelle cleanup Guenter Roeck <linux@roeck-us.net> - 2017-01-19 06:10 +0100
      Re: [PATCH 00/33] Input: Automated coccinelle cleanup Joe Perches <joe@perches.com> - 2017-01-19 06:10 +0100
        Re: [PATCH 00/33] Input: Automated coccinelle cleanup Guenter Roeck <linux@roeck-us.net> - 2017-01-19 10:20 +0100

csiph-web