[1/5] i2c: designware: Remove needless variable from i2c_dw_init_slave()

Message ID 20180529112754.13477-2-jarkko.nikula@linux.intel.com
State New
Headers show
Series
  • i2c: designware: Improve debug prints
Related show

Commit Message

Jarkko Nikula May 29, 2018, 11:27 a.m.
Commit 43df43e6ba13 ("i2c: designware: Don't set SCL timings and speed
mode when in slave mode") made variable comp_param1 needless in
i2c_dw_init_slave(). Remove it now.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 drivers/i2c/busses/i2c-designware-slave.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Andy Shevchenko May 29, 2018, 1:44 p.m. | #1
On Tue, 2018-05-29 at 14:27 +0300, Jarkko Nikula wrote:
> Commit 43df43e6ba13 ("i2c: designware: Don't set SCL timings and speed
> mode when in slave mode") made variable comp_param1 needless in
> i2c_dw_init_slave(). Remove it now.
> 

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
>  drivers/i2c/busses/i2c-designware-slave.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-slave.c
> b/drivers/i2c/busses/i2c-designware-slave.c
> index 8ce2cd368477..2036a579b5df 100644
> --- a/drivers/i2c/busses/i2c-designware-slave.c
> +++ b/drivers/i2c/busses/i2c-designware-slave.c
> @@ -51,7 +51,7 @@ static void i2c_dw_configure_fifo_slave(struct
> dw_i2c_dev *dev)
>   */
>  static int i2c_dw_init_slave(struct dw_i2c_dev *dev)
>  {
> -	u32 reg, comp_param1;
> +	u32 reg;
>  	int ret;
>  
>  	ret = i2c_dw_acquire_lock(dev);
> @@ -72,8 +72,6 @@ static int i2c_dw_init_slave(struct dw_i2c_dev *dev)
>  		return -ENODEV;
>  	}
>  
> -	comp_param1 = dw_readl(dev, DW_IC_COMP_PARAM_1);
> -
>  	/* Disable the adapter. */
>  	__i2c_dw_disable(dev);
>

Patch

diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
index 8ce2cd368477..2036a579b5df 100644
--- a/drivers/i2c/busses/i2c-designware-slave.c
+++ b/drivers/i2c/busses/i2c-designware-slave.c
@@ -51,7 +51,7 @@  static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev)
  */
 static int i2c_dw_init_slave(struct dw_i2c_dev *dev)
 {
-	u32 reg, comp_param1;
+	u32 reg;
 	int ret;
 
 	ret = i2c_dw_acquire_lock(dev);
@@ -72,8 +72,6 @@  static int i2c_dw_init_slave(struct dw_i2c_dev *dev)
 		return -ENODEV;
 	}
 
-	comp_param1 = dw_readl(dev, DW_IC_COMP_PARAM_1);
-
 	/* Disable the adapter. */
 	__i2c_dw_disable(dev);