linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH drivers/i2c 0/3] Fix ERRORs reported by checkpatch
@ 2021-04-05  9:03 Tian Tao
  2021-04-05  9:03 ` [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues Tian Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Tian Tao @ 2021-04-05  9:03 UTC (permalink / raw)
  To: linux-i2c

Fix ERRORs reported by checkpatch, no functional changes.

Tian Tao (3):
  i2c: amd8111: Fix coding style issues
  i2c: iop3xx: Fix coding style issues
  i2c: nomadik: Fix space errors

 drivers/i2c/busses/i2c-amd8111.c | 268 +++++++++++++++++++--------------------
 drivers/i2c/busses/i2c-iop3xx.c  |  28 ++--
 drivers/i2c/busses/i2c-nomadik.c |   4 +-
 3 files changed, 151 insertions(+), 149 deletions(-)

-- 
2.7.4


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

* [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues
  2021-04-05  9:03 [PATCH drivers/i2c 0/3] Fix ERRORs reported by checkpatch Tian Tao
@ 2021-04-05  9:03 ` Tian Tao
  2021-04-13 20:25   ` Wolfram Sang
  2021-04-15 20:26   ` Wolfram Sang
  2021-04-05  9:03 ` [PATCH drivers/i2c 2/3] i2c: iop3xx: " Tian Tao
  2021-04-05  9:03 ` [PATCH drivers/i2c 3/3] i2c: nomadik: Fix space errors Tian Tao
  2 siblings, 2 replies; 11+ messages in thread
From: Tian Tao @ 2021-04-05  9:03 UTC (permalink / raw)
  To: linux-i2c

Fix the following checkpatch errors:

  ERROR: "foo * bar" should be "foo *bar"
  #189: FILE: drivers/i2c/busses/i2c-amd8111.c:189:

  ERROR: "foo * bar" should be "foo *bar"
  #191: FILE: drivers/i2c/busses/i2c-amd8111.c:191:

  ERROR: switch and case should be at the same indent
  #201: FILE: drivers/i2c/busses/i2c-amd8111.c:201:

  ERROR: switch and case should be at the same indent
  #359: FILE: drivers/i2c/busses/i2c-amd8111.c:359:

No functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Cc: Jean Delvare <jdelvare@suse.com>
---
 drivers/i2c/busses/i2c-amd8111.c | 268 +++++++++++++++++++--------------------
 1 file changed, 134 insertions(+), 134 deletions(-)

diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index 34862ad..1ed7e94 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -186,9 +186,9 @@ static int amd_ec_write(struct amd_smbus *smbus, unsigned char address,
 #define AMD_SMB_PRTCL_PEC		0x80
 
 
-static s32 amd8111_access(struct i2c_adapter * adap, u16 addr,
+static s32 amd8111_access(struct i2c_adapter *adap, u16 addr,
 		unsigned short flags, char read_write, u8 command, int size,
-		union i2c_smbus_data * data)
+		union i2c_smbus_data *data)
 {
 	struct amd_smbus *smbus = adap->algo_data;
 	unsigned char protocol, len, pec, temp[2];
@@ -199,130 +199,130 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr,
 	pec = (flags & I2C_CLIENT_PEC) ? AMD_SMB_PRTCL_PEC : 0;
 
 	switch (size) {
-		case I2C_SMBUS_QUICK:
-			protocol |= AMD_SMB_PRTCL_QUICK;
-			read_write = I2C_SMBUS_WRITE;
-			break;
-
-		case I2C_SMBUS_BYTE:
-			if (read_write == I2C_SMBUS_WRITE) {
-				status = amd_ec_write(smbus, AMD_SMB_CMD,
-						      command);
-				if (status)
-					return status;
-			}
-			protocol |= AMD_SMB_PRTCL_BYTE;
-			break;
-
-		case I2C_SMBUS_BYTE_DATA:
-			status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+	case I2C_SMBUS_QUICK:
+		protocol |= AMD_SMB_PRTCL_QUICK;
+		read_write = I2C_SMBUS_WRITE;
+		break;
+
+	case I2C_SMBUS_BYTE:
+		if (read_write == I2C_SMBUS_WRITE) {
+			status = amd_ec_write(smbus, AMD_SMB_CMD,
+						command);
 			if (status)
 				return status;
-			if (read_write == I2C_SMBUS_WRITE) {
-				status = amd_ec_write(smbus, AMD_SMB_DATA,
-						      data->byte);
-				if (status)
-					return status;
-			}
-			protocol |= AMD_SMB_PRTCL_BYTE_DATA;
-			break;
+		}
+		protocol |= AMD_SMB_PRTCL_BYTE;
+		break;
 
-		case I2C_SMBUS_WORD_DATA:
-			status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+	case I2C_SMBUS_BYTE_DATA:
+		status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+		if (status)
+			return status;
+		if (read_write == I2C_SMBUS_WRITE) {
+			status = amd_ec_write(smbus, AMD_SMB_DATA,
+						data->byte);
 			if (status)
 				return status;
-			if (read_write == I2C_SMBUS_WRITE) {
-				status = amd_ec_write(smbus, AMD_SMB_DATA,
-						      data->word & 0xff);
-				if (status)
-					return status;
-				status = amd_ec_write(smbus, AMD_SMB_DATA + 1,
-						      data->word >> 8);
-				if (status)
-					return status;
-			}
-			protocol |= AMD_SMB_PRTCL_WORD_DATA | pec;
-			break;
+		}
+		protocol |= AMD_SMB_PRTCL_BYTE_DATA;
+		break;
 
-		case I2C_SMBUS_BLOCK_DATA:
-			status = amd_ec_write(smbus, AMD_SMB_CMD, command);
-			if (status)
-				return status;
-			if (read_write == I2C_SMBUS_WRITE) {
-				len = min_t(u8, data->block[0],
-					    I2C_SMBUS_BLOCK_MAX);
-				status = amd_ec_write(smbus, AMD_SMB_BCNT, len);
-				if (status)
-					return status;
-				for (i = 0; i < len; i++) {
-					status =
-					  amd_ec_write(smbus, AMD_SMB_DATA + i,
-						       data->block[i + 1]);
-					if (status)
-						return status;
-				}
-			}
-			protocol |= AMD_SMB_PRTCL_BLOCK_DATA | pec;
-			break;
-
-		case I2C_SMBUS_I2C_BLOCK_DATA:
-			len = min_t(u8, data->block[0],
-				    I2C_SMBUS_BLOCK_MAX);
-			status = amd_ec_write(smbus, AMD_SMB_CMD, command);
-			if (status)
-				return status;
-			status = amd_ec_write(smbus, AMD_SMB_BCNT, len);
-			if (status)
-				return status;
-			if (read_write == I2C_SMBUS_WRITE)
-				for (i = 0; i < len; i++) {
-					status =
-					  amd_ec_write(smbus, AMD_SMB_DATA + i,
-						       data->block[i + 1]);
-					if (status)
-						return status;
-				}
-			protocol |= AMD_SMB_PRTCL_I2C_BLOCK_DATA;
-			break;
-
-		case I2C_SMBUS_PROC_CALL:
-			status = amd_ec_write(smbus, AMD_SMB_CMD, command);
-			if (status)
-				return status;
+	case I2C_SMBUS_WORD_DATA:
+		status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+		if (status)
+			return status;
+		if (read_write == I2C_SMBUS_WRITE) {
 			status = amd_ec_write(smbus, AMD_SMB_DATA,
-					      data->word & 0xff);
+						data->word & 0xff);
 			if (status)
 				return status;
 			status = amd_ec_write(smbus, AMD_SMB_DATA + 1,
-					      data->word >> 8);
+						data->word >> 8);
 			if (status)
 				return status;
-			protocol = AMD_SMB_PRTCL_PROC_CALL | pec;
-			read_write = I2C_SMBUS_READ;
-			break;
+		}
+		protocol |= AMD_SMB_PRTCL_WORD_DATA | pec;
+		break;
 
-		case I2C_SMBUS_BLOCK_PROC_CALL:
+	case I2C_SMBUS_BLOCK_DATA:
+		status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+		if (status)
+			return status;
+		if (read_write == I2C_SMBUS_WRITE) {
 			len = min_t(u8, data->block[0],
-				    I2C_SMBUS_BLOCK_MAX - 1);
-			status = amd_ec_write(smbus, AMD_SMB_CMD, command);
-			if (status)
-				return status;
+					I2C_SMBUS_BLOCK_MAX);
 			status = amd_ec_write(smbus, AMD_SMB_BCNT, len);
 			if (status)
 				return status;
 			for (i = 0; i < len; i++) {
-				status = amd_ec_write(smbus, AMD_SMB_DATA + i,
-						      data->block[i + 1]);
+				status =
+					amd_ec_write(smbus, AMD_SMB_DATA + i,
+						data->block[i + 1]);
 				if (status)
 					return status;
 			}
-			protocol = AMD_SMB_PRTCL_BLOCK_PROC_CALL | pec;
-			read_write = I2C_SMBUS_READ;
-			break;
+		}
+		protocol |= AMD_SMB_PRTCL_BLOCK_DATA | pec;
+		break;
+
+	case I2C_SMBUS_I2C_BLOCK_DATA:
+		len = min_t(u8, data->block[0],
+				I2C_SMBUS_BLOCK_MAX);
+		status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+		if (status)
+			return status;
+		status = amd_ec_write(smbus, AMD_SMB_BCNT, len);
+		if (status)
+			return status;
+		if (read_write == I2C_SMBUS_WRITE)
+			for (i = 0; i < len; i++) {
+				status =
+					amd_ec_write(smbus, AMD_SMB_DATA + i,
+						data->block[i + 1]);
+				if (status)
+					return status;
+			}
+		protocol |= AMD_SMB_PRTCL_I2C_BLOCK_DATA;
+		break;
 
-		default:
-			dev_warn(&adap->dev, "Unsupported transaction %d\n", size);
-			return -EOPNOTSUPP;
+	case I2C_SMBUS_PROC_CALL:
+		status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+		if (status)
+			return status;
+		status = amd_ec_write(smbus, AMD_SMB_DATA,
+					data->word & 0xff);
+		if (status)
+			return status;
+		status = amd_ec_write(smbus, AMD_SMB_DATA + 1,
+					data->word >> 8);
+		if (status)
+			return status;
+		protocol = AMD_SMB_PRTCL_PROC_CALL | pec;
+		read_write = I2C_SMBUS_READ;
+		break;
+
+	case I2C_SMBUS_BLOCK_PROC_CALL:
+		len = min_t(u8, data->block[0],
+				I2C_SMBUS_BLOCK_MAX - 1);
+		status = amd_ec_write(smbus, AMD_SMB_CMD, command);
+		if (status)
+			return status;
+		status = amd_ec_write(smbus, AMD_SMB_BCNT, len);
+		if (status)
+			return status;
+		for (i = 0; i < len; i++) {
+			status = amd_ec_write(smbus, AMD_SMB_DATA + i,
+						data->block[i + 1]);
+			if (status)
+				return status;
+		}
+		protocol = AMD_SMB_PRTCL_BLOCK_PROC_CALL | pec;
+		read_write = I2C_SMBUS_READ;
+		break;
+
+	default:
+		dev_warn(&adap->dev, "Unsupported transaction %d\n", size);
+		return -EOPNOTSUPP;
 	}
 
 	status = amd_ec_write(smbus, AMD_SMB_ADDR, addr << 1);
@@ -357,40 +357,40 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr,
 		return 0;
 
 	switch (size) {
-		case I2C_SMBUS_BYTE:
-		case I2C_SMBUS_BYTE_DATA:
-			status = amd_ec_read(smbus, AMD_SMB_DATA, &data->byte);
-			if (status)
-				return status;
-			break;
+	case I2C_SMBUS_BYTE:
+	case I2C_SMBUS_BYTE_DATA:
+		status = amd_ec_read(smbus, AMD_SMB_DATA, &data->byte);
+		if (status)
+			return status;
+		break;
 
-		case I2C_SMBUS_WORD_DATA:
-		case I2C_SMBUS_PROC_CALL:
-			status = amd_ec_read(smbus, AMD_SMB_DATA, temp + 0);
-			if (status)
-				return status;
-			status = amd_ec_read(smbus, AMD_SMB_DATA + 1, temp + 1);
-			if (status)
-				return status;
-			data->word = (temp[1] << 8) | temp[0];
-			break;
+	case I2C_SMBUS_WORD_DATA:
+	case I2C_SMBUS_PROC_CALL:
+		status = amd_ec_read(smbus, AMD_SMB_DATA, temp + 0);
+		if (status)
+			return status;
+		status = amd_ec_read(smbus, AMD_SMB_DATA + 1, temp + 1);
+		if (status)
+			return status;
+		data->word = (temp[1] << 8) | temp[0];
+		break;
 
-		case I2C_SMBUS_BLOCK_DATA:
-		case I2C_SMBUS_BLOCK_PROC_CALL:
-			status = amd_ec_read(smbus, AMD_SMB_BCNT, &len);
+	case I2C_SMBUS_BLOCK_DATA:
+	case I2C_SMBUS_BLOCK_PROC_CALL:
+		status = amd_ec_read(smbus, AMD_SMB_BCNT, &len);
+		if (status)
+			return status;
+		len = min_t(u8, len, I2C_SMBUS_BLOCK_MAX);
+		fallthrough;
+	case I2C_SMBUS_I2C_BLOCK_DATA:
+		for (i = 0; i < len; i++) {
+			status = amd_ec_read(smbus, AMD_SMB_DATA + i,
+						data->block + i + 1);
 			if (status)
 				return status;
-			len = min_t(u8, len, I2C_SMBUS_BLOCK_MAX);
-			fallthrough;
-		case I2C_SMBUS_I2C_BLOCK_DATA:
-			for (i = 0; i < len; i++) {
-				status = amd_ec_read(smbus, AMD_SMB_DATA + i,
-						     data->block + i + 1);
-				if (status)
-					return status;
-			}
-			data->block[0] = len;
-			break;
+		}
+		data->block[0] = len;
+		break;
 	}
 
 	return 0;
-- 
2.7.4


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

* [PATCH drivers/i2c 2/3] i2c: iop3xx: Fix coding style issues
  2021-04-05  9:03 [PATCH drivers/i2c 0/3] Fix ERRORs reported by checkpatch Tian Tao
  2021-04-05  9:03 ` [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues Tian Tao
@ 2021-04-05  9:03 ` Tian Tao
  2021-04-15 20:27   ` Wolfram Sang
  2021-04-05  9:03 ` [PATCH drivers/i2c 3/3] i2c: nomadik: Fix space errors Tian Tao
  2 siblings, 1 reply; 11+ messages in thread
From: Tian Tao @ 2021-04-05  9:03 UTC (permalink / raw)
  To: linux-i2c

Fix 20 checkpatch errors.

Among these errors, 18 of them are incorrect space usage, such as:

  ERROR: space prohibited after that open parenthesis '('
  #128: FILE: drivers/i2c/busses/i2c-iop3xx.c:128:
  +               if ( !rc ) rc = -I2C_ERR_BERR

The remaining two errors are trailing statements should be on next line,
such as:

  ERROR: trailing statements should be on next line
  #128: FILE: drivers/i2c/busses/i2c-iop3xx.c:128:
  +               if ( !rc ) rc = -I2C_ERR_BERR;

No functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
---
 drivers/i2c/busses/i2c-iop3xx.c | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index 2f8b805..cfecaf1 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -125,10 +125,12 @@ iop3xx_i2c_error(u32 sr)
 	int rc = 0;
 
 	if ((sr & IOP3XX_ISR_BERRD)) {
-		if ( !rc ) rc = -I2C_ERR_BERR;
+		if (!rc)
+			rc = -I2C_ERR_BERR;
 	}
 	if ((sr & IOP3XX_ISR_ALD)) {
-		if ( !rc ) rc = -I2C_ERR_ALD;
+		if (!rc)
+			rc = -I2C_ERR_ALD;
 	}
 	return rc;
 }
@@ -151,12 +153,12 @@ iop3xx_i2c_get_srstat(struct i2c_algo_iop3xx_data *iop3xx_adap)
  * sleep until interrupted, then recover and analyse the SR
  * saved by handler
  */
-typedef int (* compare_func)(unsigned test, unsigned mask);
+typedef int (*compare_func)(unsigned test, unsigned mask);
 /* returns 1 on correct comparison */
 
 static int
 iop3xx_i2c_wait_event(struct i2c_algo_iop3xx_data *iop3xx_adap,
-			  unsigned flags, unsigned* status,
+			  unsigned flags, unsigned *status,
 			  compare_func compare)
 {
 	unsigned sr = 0;
@@ -167,7 +169,7 @@ iop3xx_i2c_wait_event(struct i2c_algo_iop3xx_data *iop3xx_adap,
 	do {
 		interrupted = wait_event_interruptible_timeout (
 			iop3xx_adap->waitq,
-			(done = compare( sr = iop3xx_i2c_get_srstat(iop3xx_adap) ,flags )),
+			(done = compare(sr = iop3xx_i2c_get_srstat(iop3xx_adap), flags)),
 			1 * HZ
 			);
 		if ((rc = iop3xx_i2c_error(sr)) < 0) {
@@ -177,7 +179,7 @@ iop3xx_i2c_wait_event(struct i2c_algo_iop3xx_data *iop3xx_adap,
 			*status = sr;
 			return -ETIMEDOUT;
 		}
-	} while(!done);
+	} while (!done);
 
 	*status = sr;
 
@@ -204,7 +206,7 @@ iop3xx_i2c_wait_tx_done(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
 {
 	return iop3xx_i2c_wait_event(
 		iop3xx_adap,
-	        IOP3XX_ISR_TXEMPTY | IOP3XX_ISR_ALD | IOP3XX_ISR_BERRD,
+		IOP3XX_ISR_TXEMPTY | IOP3XX_ISR_ALD | IOP3XX_ISR_BERRD,
 		status, any_bits_set);
 }
 
@@ -226,7 +228,7 @@ iop3xx_i2c_wait_idle(struct i2c_algo_iop3xx_data *iop3xx_adap, int *status)
 
 static int
 iop3xx_i2c_send_target_addr(struct i2c_algo_iop3xx_data *iop3xx_adap,
-				struct i2c_msg* msg)
+				struct i2c_msg *msg)
 {
 	unsigned long cr = __raw_readl(iop3xx_adap->ioaddr + CR_OFFSET);
 	int status;
@@ -273,7 +275,7 @@ iop3xx_i2c_write_byte(struct i2c_algo_iop3xx_data *iop3xx_adap, char byte,
 }
 
 static int
-iop3xx_i2c_read_byte(struct i2c_algo_iop3xx_data *iop3xx_adap, char* byte,
+iop3xx_i2c_read_byte(struct i2c_algo_iop3xx_data *iop3xx_adap, char *byte,
 				int stop)
 {
 	unsigned long cr = __raw_readl(iop3xx_adap->ioaddr + CR_OFFSET);
@@ -305,7 +307,7 @@ iop3xx_i2c_writebytes(struct i2c_adapter *i2c_adap, const char *buf, int count)
 	int rc = 0;
 
 	for (ii = 0; rc == 0 && ii != count; ++ii)
-		rc = iop3xx_i2c_write_byte(iop3xx_adap, buf[ii], ii==count-1);
+		rc = iop3xx_i2c_write_byte(iop3xx_adap, buf[ii], ii == count-1);
 	return rc;
 }
 
@@ -317,7 +319,7 @@ iop3xx_i2c_readbytes(struct i2c_adapter *i2c_adap, char *buf, int count)
 	int rc = 0;
 
 	for (ii = 0; rc == 0 && ii != count; ++ii)
-		rc = iop3xx_i2c_read_byte(iop3xx_adap, &buf[ii], ii==count-1);
+		rc = iop3xx_i2c_read_byte(iop3xx_adap, &buf[ii], ii == count-1);
 
 	return rc;
 }
@@ -330,7 +332,7 @@ iop3xx_i2c_readbytes(struct i2c_adapter *i2c_adap, char *buf, int count)
  * condition.
  */
 static int
-iop3xx_i2c_handle_msg(struct i2c_adapter *i2c_adap, struct i2c_msg* pmsg)
+iop3xx_i2c_handle_msg(struct i2c_adapter *i2c_adap, struct i2c_msg *pmsg)
 {
 	struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
 	int rc;
@@ -369,7 +371,7 @@ iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs,
 
 	iop3xx_i2c_transaction_cleanup(iop3xx_adap);
 
-	if(ret)
+	if (ret)
 		return ret;
 
 	return im;
-- 
2.7.4


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

* [PATCH drivers/i2c 3/3] i2c: nomadik: Fix space errors
  2021-04-05  9:03 [PATCH drivers/i2c 0/3] Fix ERRORs reported by checkpatch Tian Tao
  2021-04-05  9:03 ` [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues Tian Tao
  2021-04-05  9:03 ` [PATCH drivers/i2c 2/3] i2c: iop3xx: " Tian Tao
@ 2021-04-05  9:03 ` Tian Tao
  2021-04-15 20:27   ` Wolfram Sang
  2 siblings, 1 reply; 11+ messages in thread
From: Tian Tao @ 2021-04-05  9:03 UTC (permalink / raw)
  To: linux-i2c

Fix the following checkpatch errors:

  ERROR: space prohibited before that ',' (ctx:WxW)
  #280: FILE: drivers/i2c/busses/i2c-nomadik.c:280:
  +	i2c_clr_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
  	                                   ^
  ERROR: space prohibited before that ',' (ctx:WxW)
  #528: FILE: drivers/i2c/busses/i2c-nomadik.c:528:
  +	i2c_set_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
 	                                   ^

No functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/i2c/busses/i2c-nomadik.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index a3363b2..dc77e1c 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -277,7 +277,7 @@ static int init_hw(struct nmk_i2c_dev *dev)
 		goto exit;
 
 	/* disable the controller */
-	i2c_clr_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
+	i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE);
 
 	disable_all_interrupts(dev);
 
@@ -525,7 +525,7 @@ static int write_i2c(struct nmk_i2c_dev *dev, u16 flags)
 			dev->virtbase + I2C_CR);
 
 	/* enable the controller */
-	i2c_set_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
+	i2c_set_bit(dev->virtbase + I2C_CR, I2C_CR_PE);
 
 	init_completion(&dev->xfer_complete);
 
-- 
2.7.4


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

* Re: [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues
  2021-04-05  9:03 ` [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues Tian Tao
@ 2021-04-13 20:25   ` Wolfram Sang
  2021-04-14  1:03     ` tiantao (H)
  2021-04-15 20:26   ` Wolfram Sang
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2021-04-13 20:25 UTC (permalink / raw)
  To: Tian Tao; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

On Mon, Apr 05, 2021 at 05:03:48PM +0800, Tian Tao wrote:
> Fix the following checkpatch errors:
> 
>   ERROR: "foo * bar" should be "foo *bar"
>   #189: FILE: drivers/i2c/busses/i2c-amd8111.c:189:
> 
>   ERROR: "foo * bar" should be "foo *bar"
>   #191: FILE: drivers/i2c/busses/i2c-amd8111.c:191:
> 
>   ERROR: switch and case should be at the same indent
>   #201: FILE: drivers/i2c/busses/i2c-amd8111.c:201:
> 
>   ERROR: switch and case should be at the same indent
>   #359: FILE: drivers/i2c/busses/i2c-amd8111.c:359:
> 
> No functional changes.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
> Cc: Jean Delvare <jdelvare@suse.com>

Is the binary after the patch applied equal to the binary before your
patch? Same question for patch 2.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues
  2021-04-13 20:25   ` Wolfram Sang
@ 2021-04-14  1:03     ` tiantao (H)
  2021-04-14  8:31       ` Wolfram Sang
  0 siblings, 1 reply; 11+ messages in thread
From: tiantao (H) @ 2021-04-14  1:03 UTC (permalink / raw)
  To: Wolfram Sang, Tian Tao, linux-i2c


在 2021/4/14 4:25, Wolfram Sang 写道:
> On Mon, Apr 05, 2021 at 05:03:48PM +0800, Tian Tao wrote:
>> Fix the following checkpatch errors:
>>
>>    ERROR: "foo * bar" should be "foo *bar"
>>    #189: FILE: drivers/i2c/busses/i2c-amd8111.c:189:
>>
>>    ERROR: "foo * bar" should be "foo *bar"
>>    #191: FILE: drivers/i2c/busses/i2c-amd8111.c:191:
>>
>>    ERROR: switch and case should be at the same indent
>>    #201: FILE: drivers/i2c/busses/i2c-amd8111.c:201:
>>
>>    ERROR: switch and case should be at the same indent
>>    #359: FILE: drivers/i2c/busses/i2c-amd8111.c:359:
>>
>> No functional changes.
>>
>> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
>> Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
>> Cc: Jean Delvare <jdelvare@suse.com>
> Is the binary after the patch applied equal to the binary before your
> patch? Same question for patch 2.

The MD5 value of binary is the same before and after the patch is 
merged,the log is as below:

tiantao@ubuntu:~/mailline/linux-next$ md5sum 
drivers/i2c/busses//i2c-amd8111.o

d1d2a43e4a6166f127e47c494b9bef1c  drivers/i2c/busses//i2c-amd8111.o
tiantao@ubuntu:~/mailline/linux-next$ git am 
/home/tiantao/i2c/0004-i2c-amd8111-Fix-coding-style-issues.patch
Applying: i2c: amd8111: Fix coding style issues
tiantao@ubuntu:~/mailline/linux-next$ make modules M=drivers/i2c/busses/
   CC [M]  drivers/i2c/busses//i2c-amd8111.o
   MODPOST drivers/i2c/busses//Module.symvers
   LD [M]  drivers/i2c/busses//i2c-amd8111.ko
tiantao@ubuntu:~/mailline/linux-next$ md5sum 
drivers/i2c/busses//i2c-amd8111.o
d1d2a43e4a6166f127e47c494b9bef1c  drivers/i2c/busses//i2c-amd8111.o



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

* Re: [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues
  2021-04-14  1:03     ` tiantao (H)
@ 2021-04-14  8:31       ` Wolfram Sang
  2021-04-14  8:40         ` tiantao (H)
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2021-04-14  8:31 UTC (permalink / raw)
  To: tiantao (H); +Cc: Tian Tao, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]


> > Is the binary after the patch applied equal to the binary before your
> > patch? Same question for patch 2.
> 
> The MD5 value of binary is the same before and after the patch is
> merged,the log is as below:

Thanks for checking! What about patch 2?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues
  2021-04-14  8:31       ` Wolfram Sang
@ 2021-04-14  8:40         ` tiantao (H)
  0 siblings, 0 replies; 11+ messages in thread
From: tiantao (H) @ 2021-04-14  8:40 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Tian Tao, linux-i2c


在 2021/4/14 16:31, Wolfram Sang 写道:
>>> Is the binary after the patch applied equal to the binary before your
>>> patch? Same question for patch 2.
>> The MD5 value of binary is the same before and after the patch is
>> merged,the log is as below:
> Thanks for checking! What about patch 2?

The MD5 value of binary is the same before and after the patch2 is
merged,the log is as below:

tiantao@ubuntu:~/mailline/linux-next$ make modules M=drivers/i2c/busses/
   CC [M]  drivers/i2c/busses//i2c-iop3xx.o
   MODPOST drivers/i2c/busses//Module.symvers
   CC [M]  drivers/i2c/busses//i2c-iop3xx.mod.o
   LD [M]  drivers/i2c/busses//i2c-iop3xx.ko
tiantao@ubuntu:~/mailline/linux-next$ md5sum 
drivers/i2c/busses//i2c-iop3xx.o
6c1b7bdd1fa8bb372eee04344e496617  drivers/i2c/busses//i2c-iop3xx.o
tiantao@ubuntu:~/mailline/linux-next$ git am 
/home/tiantao/patchi3c/0002-i2c-iop3xx-Fix-coding-style-issues.patch
Applying: i2c: iop3xx: Fix coding style issues
tiantao@ubuntu:~/mailline/linux-next$ make modules M=drivers/i2c/busses/
   CC [M]  drivers/i2c/busses//i2c-iop3xx.o
   MODPOST drivers/i2c/busses//Module.symvers
   LD [M]  drivers/i2c/busses//i2c-iop3xx.ko
tiantao@ubuntu:~/mailline/linux-next$ md5sum 
drivers/i2c/busses//i2c-iop3xx.o
6c1b7bdd1fa8bb372eee04344e496617  drivers/i2c/busses//i2c-iop3xx.o

>


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

* Re: [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues
  2021-04-05  9:03 ` [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues Tian Tao
  2021-04-13 20:25   ` Wolfram Sang
@ 2021-04-15 20:26   ` Wolfram Sang
  1 sibling, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2021-04-15 20:26 UTC (permalink / raw)
  To: Tian Tao; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

On Mon, Apr 05, 2021 at 05:03:48PM +0800, Tian Tao wrote:
> Fix the following checkpatch errors:
> 
>   ERROR: "foo * bar" should be "foo *bar"
>   #189: FILE: drivers/i2c/busses/i2c-amd8111.c:189:
> 
>   ERROR: "foo * bar" should be "foo *bar"
>   #191: FILE: drivers/i2c/busses/i2c-amd8111.c:191:
> 
>   ERROR: switch and case should be at the same indent
>   #201: FILE: drivers/i2c/busses/i2c-amd8111.c:201:
> 
>   ERROR: switch and case should be at the same indent
>   #359: FILE: drivers/i2c/busses/i2c-amd8111.c:359:
> 
> No functional changes.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
> Cc: Jean Delvare <jdelvare@suse.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH drivers/i2c 2/3] i2c: iop3xx: Fix coding style issues
  2021-04-05  9:03 ` [PATCH drivers/i2c 2/3] i2c: iop3xx: " Tian Tao
@ 2021-04-15 20:27   ` Wolfram Sang
  0 siblings, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2021-04-15 20:27 UTC (permalink / raw)
  To: Tian Tao; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

On Mon, Apr 05, 2021 at 05:03:49PM +0800, Tian Tao wrote:
> Fix 20 checkpatch errors.
> 
> Among these errors, 18 of them are incorrect space usage, such as:
> 
>   ERROR: space prohibited after that open parenthesis '('
>   #128: FILE: drivers/i2c/busses/i2c-iop3xx.c:128:
>   +               if ( !rc ) rc = -I2C_ERR_BERR
> 
> The remaining two errors are trailing statements should be on next line,
> such as:
> 
>   ERROR: trailing statements should be on next line
>   #128: FILE: drivers/i2c/busses/i2c-iop3xx.c:128:
>   +               if ( !rc ) rc = -I2C_ERR_BERR;
> 
> No functional changes.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH drivers/i2c 3/3] i2c: nomadik: Fix space errors
  2021-04-05  9:03 ` [PATCH drivers/i2c 3/3] i2c: nomadik: Fix space errors Tian Tao
@ 2021-04-15 20:27   ` Wolfram Sang
  0 siblings, 0 replies; 11+ messages in thread
From: Wolfram Sang @ 2021-04-15 20:27 UTC (permalink / raw)
  To: Tian Tao; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

On Mon, Apr 05, 2021 at 05:03:50PM +0800, Tian Tao wrote:
> Fix the following checkpatch errors:
> 
>   ERROR: space prohibited before that ',' (ctx:WxW)
>   #280: FILE: drivers/i2c/busses/i2c-nomadik.c:280:
>   +	i2c_clr_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
>   	                                   ^
>   ERROR: space prohibited before that ',' (ctx:WxW)
>   #528: FILE: drivers/i2c/busses/i2c-nomadik.c:528:
>   +	i2c_set_bit(dev->virtbase + I2C_CR , I2C_CR_PE);
>  	                                   ^
> 
> No functional changes.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-04-15 20:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05  9:03 [PATCH drivers/i2c 0/3] Fix ERRORs reported by checkpatch Tian Tao
2021-04-05  9:03 ` [PATCH drivers/i2c 1/3] i2c: amd8111: Fix coding style issues Tian Tao
2021-04-13 20:25   ` Wolfram Sang
2021-04-14  1:03     ` tiantao (H)
2021-04-14  8:31       ` Wolfram Sang
2021-04-14  8:40         ` tiantao (H)
2021-04-15 20:26   ` Wolfram Sang
2021-04-05  9:03 ` [PATCH drivers/i2c 2/3] i2c: iop3xx: " Tian Tao
2021-04-15 20:27   ` Wolfram Sang
2021-04-05  9:03 ` [PATCH drivers/i2c 3/3] i2c: nomadik: Fix space errors Tian Tao
2021-04-15 20:27   ` Wolfram Sang

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