staging: vt6655: replace camel case by snake case
PATCH 1/1 staging: vt6655: replace camel case by snake case
Replace formal arguments of few functions and local variables of camel case by snake case. Issue found by checkpatch
--- drivers/staging/vt6655/srom.c | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-)
drivers/staging/vt6655/srom.c +24 -24
@@ -59,36 +59,36 @@unsigned char SROMbyReadEmbedded (void __iomem *iobase,unsigned char byContntOffset) { -unsigned short wDelay, wNoACK; -unsigned char byWait; -unsigned char byData; -unsigned char byOrg; +unsigned short wdelay, wnoack; +unsigned char bywait; +unsigned char bydata; +unsigned char byorg; - byData =0xFF ; - byOrg =ioread8 (iobase +MAC_REG_I2MCFG ); + bydata =0xFF ; + byorg =ioread8 (iobase +MAC_REG_I2MCFG );/* turn off hardware retry for getting NACK */ -iowrite8 (byOrg & (~I2MCFG_NORETRY ), iobase +MAC_REG_I2MCFG ); -for (wNoACK =0 ; wNoACK <W_MAX_I2CRETRY ; wNoACK++) { +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 );/* issue read command */ iowrite8 (I2MCSR_EEMR , iobase +MAC_REG_I2MCSR );/* wait DONE be set */ -for (wDelay =0 ; wDelay <W_MAX_TIMEOUT ; wDelay++) { - byWait =ioread8 (iobase +MAC_REG_I2MCSR ); -if (byWait & (I2MCSR_DONE |I2MCSR_NACK )) +for (wdelay =0 ; wdelay <W_MAX_TIMEOUT ; wdelay++) { + bywait =ioread8 (iobase +MAC_REG_I2MCSR ); +if (bywait & (I2MCSR_DONE |I2MCSR_NACK ))break ;udelay (CB_DELAY_LOOP_WAIT ); } -if ((wDelay <W_MAX_TIMEOUT ) && - (!(byWait &I2MCSR_NACK ))) { +if ((wdelay <W_MAX_TIMEOUT ) && + (!(bywait &I2MCSR_NACK ))) {break ; } } - byData =ioread8 (iobase +MAC_REG_I2MDIPT ); -iowrite8 (byOrg, iobase +MAC_REG_I2MCFG ); -return byData; + bydata =ioread8 (iobase +MAC_REG_I2MDIPT ); +iowrite8 (byorg, iobase +MAC_REG_I2MCFG ); +return bydata; }/*
@@ -98,20 +98,20 @@ unsigned char SROMbyReadEmbedded(void __iomem *iobase,* In: * iobase - I/O base address * Out: -* pbyEepromRegs - EEPROM content Buffer +* pbyeepromregs - EEPROM content Buffer * * Return Value: none * */ -void SROMvReadAllContents (void __iomem *iobase,unsigned char *pbyEepromRegs) +void SROMvReadAllContents (void __iomem *iobase,unsigned char *pbyeepromregs) {int ii;/* ii = Rom Address */ for (ii =0 ; ii <EEP_MAX_CONTEXT_SIZE ; ii++) { - *pbyEepromRegs =SROMbyReadEmbedded (iobase, + *pbyeepromregs =SROMbyReadEmbedded (iobase, (unsigned char )ii); - pbyEepromRegs++; + pbyeepromregs++; } }
@@ -122,19 +122,19 @@ void SROMvReadAllContents(void __iomem *iobase, unsigned char *pbyEepromRegs)* In: * iobase - I/O base address * Out: -* pbyEtherAddress - Ethernet Address buffer +* pbyetheraddress - Ethernet Address buffer * * Return Value: none * */ void SROMvReadEtherAddress (void __iomem *iobase, -unsigned char *pbyEtherAddress) +unsigned char *pbyetheraddress) {unsigned char ii;/* ii = Rom Address */ for (ii =0 ; ii <ETH_ALEN ; ii++) { - *pbyEtherAddress =SROMbyReadEmbedded (iobase, ii); - pbyEtherAddress++; + *pbyetheraddress =SROMbyReadEmbedded (iobase, ii); + pbyetheraddress++; } }
Signature · 1 line
2.34.1
Quoted 14 lines · Pavan Bobba
Replace formal arguments of few functions and local variables of camel case by snake case. Issue found by checkpatch
Signed-off-by Pavan Bobba <[email protected]>--- drivers/staging/vt6655/srom.c | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-)drivers/staging/vt6655/srom.c +0
-0@@ -59,36 +59,36 @@ unsigned char SROMbyReadEmbedded(void __iomem *iobase,
drivers/staging/vt6655/srom.c line 65
Quoted 10 lines
drivers/staging/vt6655/srom.c +4
-4unsigned char byContntOffset) { -unsigned short wDelay, wNoACK; -unsigned char byWait; -unsigned char byData; -unsigned char byOrg; +unsigned short wdelay, wnoack; +unsigned char bywait; +unsigned char bydata; +unsigned char byorg;
This raises the same problem as in your previous patch. Here there is w for word, by for byte, and later there is p for pointer. All of these encodings of type information should be dropped.
julia
Quoted 95 lines
drivers/staging/vt6655/srom.c +20
-21- byData =0xFF ; - byOrg =ioread8 (iobase +MAC_REG_I2MCFG ); + bydata =0xFF ; + byorg =ioread8 (iobase +MAC_REG_I2MCFG );/* turn off hardware retry for getting NACK */ -iowrite8 (byOrg & (~I2MCFG_NORETRY ), iobase +MAC_REG_I2MCFG ); -for (wNoACK =0 ; wNoACK <W_MAX_I2CRETRY ; wNoACK++) { +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 );/* issue read command */ iowrite8 (I2MCSR_EEMR , iobase +MAC_REG_I2MCSR );/* wait DONE be set */ -for (wDelay =0 ; wDelay <W_MAX_TIMEOUT ; wDelay++) { - byWait =ioread8 (iobase +MAC_REG_I2MCSR ); -if (byWait & (I2MCSR_DONE |I2MCSR_NACK )) +for (wdelay =0 ; wdelay <W_MAX_TIMEOUT ; wdelay++) { + bywait =ioread8 (iobase +MAC_REG_I2MCSR ); +if (bywait & (I2MCSR_DONE |I2MCSR_NACK ))break ;udelay (CB_DELAY_LOOP_WAIT ); } -if ((wDelay <W_MAX_TIMEOUT ) && - (!(byWait &I2MCSR_NACK ))) { +if ((wdelay <W_MAX_TIMEOUT ) && + (!(bywait &I2MCSR_NACK ))) {break ; } } - byData =ioread8 (iobase +MAC_REG_I2MDIPT ); -iowrite8 (byOrg, iobase +MAC_REG_I2MCFG ); -return byData; + bydata =ioread8 (iobase +MAC_REG_I2MDIPT ); +iowrite8 (byorg, iobase +MAC_REG_I2MCFG ); +return bydata; }/* @@ -98,20 +98,20 @@ unsigned char SROMbyReadEmbedded(void __iomem *iobase,* In: * iobase - I/O base address * Out: -* pbyEepromRegs - EEPROM content Buffer +* pbyeepromregs - EEPROM content Buffer * * Return Value: none * */ -void SROMvReadAllContents (void __iomem *iobase,unsigned char *pbyEepromRegs) +void SROMvReadAllContents (void __iomem *iobase,unsigned char *pbyeepromregs) {int ii;/* ii = Rom Address */ for (ii =0 ; ii <EEP_MAX_CONTEXT_SIZE ; ii++) { - *pbyEepromRegs =SROMbyReadEmbedded (iobase, + *pbyeepromregs =SROMbyReadEmbedded (iobase, (unsigned char )ii); - pbyEepromRegs++; + pbyeepromregs++; } }@@ -122,19 +122,19 @@ void SROMvReadAllContents(void __iomem *iobase, unsigned char *pbyEepromRegs)* In: * iobase - I/O base address * Out: -* pbyEtherAddress - Ethernet Address buffer +* pbyetheraddress - Ethernet Address buffer * * Return Value: none * */ void SROMvReadEtherAddress (void __iomem *iobase, -unsigned char *pbyEtherAddress) +unsigned char *pbyetheraddress) {unsigned char ii;/* ii = Rom Address */ for (ii =0 ; ii <ETH_ALEN ; ii++) { - *pbyEtherAddress =SROMbyReadEmbedded (iobase, ii); - pbyEtherAddress++; + *pbyetheraddress =SROMbyReadEmbedded (iobase, ii); + pbyetheraddress++; } } --2.34.1
Quoted 4 lines · Pavan Bobba
Replace formal arguments of few functions and local variables of camel case by snake case. Issue found by checkpatch
Signed-off-by Pavan Bobba<[email protected]>
Hi,
please find a unique subject so that we see it is something new.
Thanks
Bye Philipp
Quoted 6 lines · Philipp Hortmann
Quoted 4 lines · Pavan Bobba
Replace formal arguments of few functions and local variables of camel case by snake case. Issue found by checkpatch
Signed-off-by Pavan Bobba<[email protected]>
Quoted 7 lines
Hi,
please find a unique subject so that we see it is something new.
Thanks
Bye Philipp
Thank you Philipp.i have updated my patch description in next patch