Skip to contentSkip to conversation

staging: vt6655: Change camel case variables to snake case

PATCH Superseded Mingzai Sun 2 participants 5 messages Aug 5, 2023 – Aug 11, 2023 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6655: Change camel case variables to snake case

Change camel case to snake case.
Issue found by checkpatch.

---
 drivers/staging/vt6655/srom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6655/srom.c +3 -3
index ee5ca4db74dc..812964ab68c5 100644
@@ -49,7 +49,7 @@
  * Parameters:
  *  In:
  *      iobase          - I/O base address
- *      byContntOffset  - address of EEPROM
+ *      by_contnt_offset  - address of EEPROM
  *  Out:
  *      none
  *
@@ -57,7 +57,7 @@
  *
  */
 unsigned char SROMbyReadEmbedded(void __iomem *iobase,
-				 unsigned char byContntOffset)
+				 unsigned char by_contnt_offset)
 {
 	unsigned short wDelay, wNoACK;
 	unsigned char byWait;
@@ -70,7 +70,7 @@ unsigned char SROMbyReadEmbedded(void __iomem *iobase,
 	iowrite8(byOrg & (~I2MCFG_NORETRY), iobase + MAC_REG_I2MCFG);
 	for (wNoACK = 0; wNoACK < W_MAX_I2CRETRY; wNoACK++) {
 		iowrite8(EEP_I2C_DEV_ID, iobase + MAC_REG_I2MTGID);
-		iowrite8(byContntOffset, iobase + MAC_REG_I2MTGAD);
+		iowrite8(by_contnt_offset, iobase + MAC_REG_I2MTGAD);
 
 		/* issue read command */
 		iowrite8(I2MCSR_EEMR, iobase + MAC_REG_I2MCSR);
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 13 lines · Mingzai Sun

Change camel case to snake case.
Issue found by checkpatch.

---
 drivers/staging/vt6655/srom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6655/srom.c +0 -0
index ee5ca4db74dc..812964ab68c5 100644

drivers/staging/vt6655/srom.c line 52

Quoted 5 lines
drivers/staging/vt6655/srom.c +1 -1
@@ -49,7 +49,7 @@
  * Parameters:
  *  In:
  *      iobase          - I/O base address
- *      byContntOffset  - address of EEPROM
+ *      by_contnt_offset  - address of EEPROM

Why did you keep the unneeded "by" prefix?

thanks,

greg k-h

author
#2 lore raw
Quoted 23 lines · Greg KH <[email protected]> 于2023年8月9日周三 20:21写道:
Quoted 13 lines · Mingzai Sun

Change camel case to snake case.
Issue found by checkpatch.

---
 drivers/staging/vt6655/srom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6655/srom.c +0 -0
index ee5ca4db74dc..812964ab68c5 100644

drivers/staging/vt6655/srom.c line 52

Quoted 5 lines
drivers/staging/vt6655/srom.c +1 -1
@@ -49,7 +49,7 @@
  * Parameters:
  *  In:
  *      iobase          - I/O base address
- *      byContntOffset  - address of EEPROM
+ *      by_contnt_offset  - address of EEPROM

Why did you keep the unneeded "by" prefix?

Quoted 3 lines

thanks,

greg k-h

OK, I will remove the "by" prefix in the second patch.

#3 lore raw

PATCH v2 1/1 staging: vt6655: Change camel case variables to snake case

In reply to Mingzai Sun

Remove the unneeded "by" prefix.

---
Changes in v2:
- Change "by_contnt_offset" to "contnt_offset".

---
 drivers/staging/vt6655/srom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6655/srom.c +3 -3
index 812964ab68c5..1b89d401a7eb 100644
@@ -49,7 +49,7 @@
  * Parameters:
  *  In:
  *      iobase          - I/O base address
- *      by_contnt_offset  - address of EEPROM
+ *      contnt_offset  - address of EEPROM
  *  Out:
  *      none
  *
@@ -57,7 +57,7 @@
  *
  */
 unsigned char SROMbyReadEmbedded(void __iomem *iobase,
-				 unsigned char by_contnt_offset)
+				 unsigned char contnt_offset)
 {
 	unsigned short wDelay, wNoACK;
 	unsigned char byWait;
@@ -70,7 +70,7 @@ unsigned char SROMbyReadEmbedded(void __iomem *iobase,
 	iowrite8(byOrg & (~I2MCFG_NORETRY), iobase + MAC_REG_I2MCFG);
 	for (wNoACK = 0; wNoACK < W_MAX_I2CRETRY; wNoACK++) {
 		iowrite8(EEP_I2C_DEV_ID, iobase + MAC_REG_I2MTGID);
-		iowrite8(by_contnt_offset, iobase + MAC_REG_I2MTGAD);
+		iowrite8(contnt_offset, iobase + MAC_REG_I2MTGAD);
 
 		/* issue read command */
 		iowrite8(I2MCSR_EEMR, iobase + MAC_REG_I2MCSR);
Signature · 1 line
2.34.1
maintainer
#4 lore raw
Quoted 45 lines · Mingzai Sun

Remove the unneeded "by" prefix.

---
Changes in v2:
- Change "by_contnt_offset" to "contnt_offset".

---
 drivers/staging/vt6655/srom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6655/srom.c +3 -3
index 812964ab68c5..1b89d401a7eb 100644
@@ -49,7 +49,7 @@
  * Parameters:
  *  In:
  *      iobase          - I/O base address
- *      by_contnt_offset  - address of EEPROM
+ *      contnt_offset  - address of EEPROM
  *  Out:
  *      none
  *
@@ -57,7 +57,7 @@
  *
  */
 unsigned char SROMbyReadEmbedded(void __iomem *iobase,
-				 unsigned char by_contnt_offset)
+				 unsigned char contnt_offset)
 {
 	unsigned short wDelay, wNoACK;
 	unsigned char byWait;
@@ -70,7 +70,7 @@ unsigned char SROMbyReadEmbedded(void __iomem *iobase,
 	iowrite8(byOrg & (~I2MCFG_NORETRY), iobase + MAC_REG_I2MCFG);
 	for (wNoACK = 0; wNoACK < W_MAX_I2CRETRY; wNoACK++) {
 		iowrite8(EEP_I2C_DEV_ID, iobase + MAC_REG_I2MTGID);
-		iowrite8(by_contnt_offset, iobase + MAC_REG_I2MTGAD);
+		iowrite8(contnt_offset, iobase + MAC_REG_I2MTGAD);
 
 		/* issue read command */
 		iowrite8(I2MCSR_EEMR, iobase + MAC_REG_I2MCSR);
Signature · 1 line
2.34.1

This patch does not apply to my tree at all :(