Skip to contentSkip to conversation

i2c : i2c-algo-pcf : fixed errors and warnings in header file

PATCH In review Cezar Chiru 2 participants 2 messages Sep 7, 2025 – Sep 25, 2025 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c : i2c-algo-pcf : fixed errors and warnings in header file

Fixed code indent should use tabs error, missing '*' from multiple line block comment warning, space prohibited after paranthesis error and no space before tabs warning. My motivation was to fix all errors and warnings in drivers/i2c/algos/i2c-algo-pcf.h file.

Testing:
* built kernel with my changes and I2C_ALGOPCF=m enabled and it built successfully.
* installed kernel and external modules generated by build
* rebooted and loaded using modprobe i2c-algo-pcf kernel module with param i2c_debug=3 and no message was found related to module in dmesg. But also no error was generated.

---
 drivers/i2c/algos/i2c-algo-pcf.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/i2c/algos/i2c-algo-pcf.h +4 -4
index 2448ab192ce5..d9393092aaf1 100644
@@ -3,8 +3,8 @@
 /* i2c-pcf8584.h: PCF 8584 global defines				*/
 /* -------------------------------------------------------------------- */
 /*   Copyright (C) 1996 Simon G. Vogl
-                   1999 Hans Berglund
-
+ *		   1999 Hans Berglund
+ *
  */
 /* --------------------------------------------------------------------	*/
 
@@ -25,7 +25,7 @@
 
 #define I2C_PCF_START    (I2C_PCF_PIN | I2C_PCF_ESO | I2C_PCF_STA | I2C_PCF_ACK)
 #define I2C_PCF_STOP     (I2C_PCF_PIN | I2C_PCF_ESO | I2C_PCF_STO | I2C_PCF_ACK)
-#define I2C_PCF_REPSTART (              I2C_PCF_ESO | I2C_PCF_STA | I2C_PCF_ACK)
+#define I2C_PCF_REPSTART	       (I2C_PCF_ESO | I2C_PCF_STA | I2C_PCF_ACK)
 #define I2C_PCF_IDLE     (I2C_PCF_PIN | I2C_PCF_ESO               | I2C_PCF_ACK)
 
 /* ----- Status register bits -----------------------------------------	*/
@@ -55,7 +55,7 @@
 
 
 /* ----- Access to internal registers according to ES1,ES2 ------------	*/
-/* they are mapped to the data port ( a0 = 0 ) 				*/
+/* they are mapped to the data port ( a0 = 0 )				*/
 /* available when ESO == 0 :						*/
 
 #define I2C_PCF_OWNADR	0
Signature · 1 line
2.43.0
#1 lore raw
Quoted 6 lines · Cezar Chiru

Fixed code indent should use tabs error, missing '*' from multiple line block comment warning, space prohibited after paranthesis error and no space before tabs warning. My motivation was to fix all errors and warnings in drivers/i2c/algos/i2c-algo-pcf.h file.

Quoted 7 lines

Testing:
* built kernel with my changes and I2C_ALGOPCF=m enabled and it built successfully.
* installed kernel and external modules generated by build
* rebooted and loaded using modprobe i2c-algo-pcf kernel module with param i2c_debug=3 and no message was found related to module in dmesg. But also no error was generated.

Because these are only whitespace changes, the object file (.o) should not have change after your change. You can check for that.

drivers/i2c/algos/i2c-algo-pcf.h line 28

Quoted 2 lines
drivers/i2c/algos/i2c-algo-pcf.h +1 -1
-#define I2C_PCF_REPSTART (              I2C_PCF_ESO | I2C_PCF_STA | I2C_PCF_ACK)
+#define I2C_PCF_REPSTART	       (I2C_PCF_ESO | I2C_PCF_STA | I2C_PCF_ACK)

checkpatch is wrong here, this is less readable than before.