diff mbox series

[1/2] i2c: ibm_iic: don't check number of messages in the driver

Message ID 20180520065035.7920-2-wsa@the-dreams.de
State Accepted
Headers show
Series don't check number of I2C messages in drivers | expand

Commit Message

Wolfram Sang May 20, 2018, 6:50 a.m. UTC
Since commit 1eace8344c02 ("i2c: add param sanity check to
i2c_transfer()"), the I2C core does this check now. We can remove it
from drivers.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---

Only build tested.

 drivers/i2c/busses/i2c-ibm_iic.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Peter Rosin May 24, 2018, 2:13 p.m. UTC | #1
On 2018-05-20 08:50, Wolfram Sang wrote:
> Since commit 1eace8344c02 ("i2c: add param sanity check to
> i2c_transfer()"), the I2C core does this check now. We can remove it
> from drivers.

Reviewed-by: Peter Rosin <peda@axentia.se>

> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> 
> Only build tested.
> 
>  drivers/i2c/busses/i2c-ibm_iic.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
> index 961c5f42d956..6f6e1dfe7cce 100644
> --- a/drivers/i2c/busses/i2c-ibm_iic.c
> +++ b/drivers/i2c/busses/i2c-ibm_iic.c
> @@ -561,9 +561,6 @@ static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
>  
>  	DBG2("%d: iic_xfer, %d msg(s)\n", dev->idx, num);
>  
> -	if (!num)
> -		return 0;
> -
>  	/* Check the sanity of the passed messages.
>  	 * Uhh, generic i2c layer is more suitable place for such code...
>  	 */
>
Wolfram Sang May 24, 2018, 8:07 p.m. UTC | #2
On Sun, May 20, 2018 at 08:50:33AM +0200, Wolfram Sang wrote:
> Since commit 1eace8344c02 ("i2c: add param sanity check to
> i2c_transfer()"), the I2C core does this check now. We can remove it
> from drivers.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 961c5f42d956..6f6e1dfe7cce 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -561,9 +561,6 @@  static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 
 	DBG2("%d: iic_xfer, %d msg(s)\n", dev->idx, num);
 
-	if (!num)
-		return 0;
-
 	/* Check the sanity of the passed messages.
 	 * Uhh, generic i2c layer is more suitable place for such code...
 	 */