staging: rtl8723bs: hal: Remove camelcase
PATCH 1/1 staging: rtl8723bs: hal: Remove camelcase
Remove camelcase. Issue detected by checkpatch.pl. For now, change only names of static functions in order to not break the driver's code.
--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 44 ++++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +22 -22
@@ -19,7 +19,7 @@/* */ /* Creadted by Roger, 2011.01.31. */ /* */ -static void HalSdioGetCmdAddr8723BSdio( +static void hal_sdio_get_cmd_addr_8723b_sdio( struct adapter *adapter, u8 device_id, u32 addr,
@@ -97,7 +97,7 @@ static u8 get_deviceid(u32 addr)/* * Ref: -*HalSdioGetCmdAddr8723BSdio() +*hal_sdio_get_cmd_addr_8723b_sdio() */ static u32 _cvrt2ftaddr (const u32 addr,u8 *pdevice_id,u16 *poffset) {
@@ -426,7 +426,7 @@ static u32 sdio_read_port( psdio = &adapter_to_dvobj (adapter)->intf_data; hal =GET_HAL_DATA (adapter); -HalSdioGetCmdAddr8723BSdio (adapter, addr, hal->SdioRxFIFOCnt++, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter, addr, hal->SdioRxFIFOCnt++, &addr);if (cnt > psdio->block_transfer_len) cnt =_RND (cnt, psdio->block_transfer_len);
@@ -475,7 +475,7 @@ static u32 sdio_write_port( } cnt =round_up (cnt,4 ); -HalSdioGetCmdAddr8723BSdio (adapter, addr, cnt >>2 , &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter, addr, cnt >>2 , &addr);if (cnt > psdio->block_transfer_len) cnt =_RND (cnt, psdio->block_transfer_len);
@@ -528,7 +528,7 @@ static s32 _sdio_local_read( intfhdl = &adapter->iopriv.intf; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);rtw_hal_get_hwreg (adapter,HW_VAR_APFM_ON_MAC , &mac_pwr_ctrl_on);if (!mac_pwr_ctrl_on)
@@ -566,7 +566,7 @@ s32 sdio_local_read( intfhdl = &adapter->iopriv.intf; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);rtw_hal_get_hwreg (adapter,HW_VAR_APFM_ON_MAC , &mac_pwr_ctrl_on); if (
@@ -612,7 +612,7 @@ s32 sdio_local_write( intfhdl = &adapter->iopriv.intf; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);rtw_hal_get_hwreg (adapter,HW_VAR_APFM_ON_MAC , &mac_pwr_ctrl_on); if (
@@ -639,24 +639,24 @@ u8 SdioLocalCmd52Read1Byte(struct adapter *adapter, u32 addr)u8 val =0 ;struct intf_hdl *intfhdl = &adapter->iopriv.intf; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);sd_cmd52_read (intfhdl, addr,1 , &val);return val; } -static u16 SdioLocalCmd52Read2Byte (struct adapter *adapter,u32 addr) +static u16 sdio_local_cmd52_read2byte (struct adapter *adapter,u32 addr) {__le16 val =0 ;struct intf_hdl *intfhdl = &adapter->iopriv.intf; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);sd_cmd52_read (intfhdl, addr,2 , (u8 *)&val);return le16_to_cpu (val); } -static u32 SdioLocalCmd53Read4Byte (struct adapter *adapter,u32 addr) +static u32 sdio_local_cmd53_read4byte (struct adapter *adapter,u32 addr) {u8 mac_pwr_ctrl_on;
@@ -664,7 +664,7 @@ static u32 SdioLocalCmd53Read4Byte(struct adapter *adapter, u32 addr)struct intf_hdl *intfhdl = &adapter->iopriv.intf;__le32 le_tmp; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);rtw_hal_get_hwreg (adapter,HW_VAR_APFM_ON_MAC , &mac_pwr_ctrl_on);if (!mac_pwr_ctrl_on ||adapter_to_pwrctl (adapter)->bFwCurrentInPSMode) {sd_cmd52_read (intfhdl, addr,4 , (u8 *)&le_tmp);
@@ -679,21 +679,21 @@ void SdioLocalCmd52Write1Byte(struct adapter *adapter, u32 addr, u8 v) {struct intf_hdl *intfhdl = &adapter->iopriv.intf; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);sd_cmd52_write (intfhdl, addr,1 , &v); } -static void SdioLocalCmd52Write4Byte (struct adapter *adapter,u32 addr,u32 v) +static void sdio_local_cmd52_write4byte (struct adapter *adapter,u32 addr,u32 v) {struct intf_hdl *intfhdl = &adapter->iopriv.intf;__le32 le_tmp; -HalSdioGetCmdAddr8723BSdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr); le_tmp =cpu_to_le32 (v);sd_cmd52_write (intfhdl, addr,4 , (u8 *)&le_tmp); } -static s32 ReadInterrupt8723BSdio (struct adapter *adapter,u32 *phisr) +static s32 read_interrupt_8723b_sdio (struct adapter *adapter,u32 *phisr) {u32 hisr, himr;u8 val8, hisr_len;
@@ -935,7 +935,7 @@ void sd_int_dpc(struct adapter *adapter) status =rtw_malloc (4 );if (status) { addr =REG_TXDMA_STATUS ; -HalSdioGetCmdAddr8723BSdio (adapter,WLAN_IOREG_DEVICE_ID , addr, &addr); +hal_sdio_get_cmd_addr_8723b_sdio (adapter,WLAN_IOREG_DEVICE_ID , addr, &addr);_sd_read (intfhdl, addr,4 , status);_sd_write (intfhdl, addr,4 , status);DBG_8192C ("%s: SDIO_HISR_TXERR (0x%08x)\n" , __func__,le32_to_cpu (*(u32 *)status));
@@ -986,7 +986,7 @@ void sd_int_dpc(struct adapter *adapter) hal->sdio_hisr ^=SDIO_HISR_RX_REQUEST ; do { - hal->SdioRxFIFOSize = SdioLocalCmd52Read2Byte(adapter, SDIO_REG_RX0_REQ_LEN); + hal->SdioRxFIFOSize = sdio_local_cmd52_read2byte(adapter, SDIO_REG_RX0_REQ_LEN); if (hal->SdioRxFIFOSize != 0) { recvbuf = sd_recv_rxfifo(adapter, hal->SdioRxFIFOSize); if (recvbuf)
@@ -1002,7 +1002,7 @@ void sd_int_dpc(struct adapter *adapter)break ; hisr =0 ; -ReadInterrupt8723BSdio (adapter, &hisr); +read_interrupt_8723b_sdio (adapter, &hisr); hisr &=SDIO_HISR_RX_REQUEST ;if (!hisr)break ;
@@ -1026,7 +1026,7 @@ void sd_int_hdl(struct adapter *adapter) hal =GET_HAL_DATA (adapter); hal->sdio_hisr =0 ; -ReadInterrupt8723BSdio (adapter, &hal->sdio_hisr); +read_interrupt_8723b_sdio (adapter, &hal->sdio_hisr);if (hal->sdio_hisr & hal->sdio_himr) {u32 v32;
@@ -1036,7 +1036,7 @@ void sd_int_hdl(struct adapter *adapter)/* clear HISR */ v32 = hal->sdio_hisr &MASK_SDIO_HISR_CLEAR ;if (v32) -SdioLocalCmd52Write4Byte (adapter,SDIO_REG_HISR , v32); +sdio_local_cmd52_write4byte (adapter,SDIO_REG_HISR , v32);sd_int_dpc (adapter); }
@@ -1059,7 +1059,7 @@ u8 HalQueryTxBufferStatus8723BSdio(struct adapter *adapter) hal =GET_HAL_DATA (adapter); - numof_free_page =SdioLocalCmd53Read4Byte (adapter,SDIO_REG_FREE_TXPG ); + numof_free_page =sdio_local_cmd53_read4byte (adapter,SDIO_REG_FREE_TXPG );memcpy (hal->SdioTxFIFOFreePage, &numof_free_page,4 );
Signature · 1 line
2.30.2
Greg KH
maintainerQuoted 22 lines · Fabio M. De Francesco
Remove camelcase. Issue detected by checkpatch.pl. For now, change only names of static functions in order to not break the driver's code.
Signed-off-by Fabio M. De Francesco <[email protected]>--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 44 ++++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-)drivers/staging/rtl8723bs/hal/sdio_ops.c +1
-1@@ -19,7 +19,7 @@/* */ /* Creadted by Roger, 2011.01.31. */ /* */ -static void HalSdioGetCmdAddr8723BSdio( +static void hal_sdio_get_cmd_addr_8723b_sdio( struct adapter *adapter, u8 device_id, u32 addr,
drivers/staging/rtl8723bs/hal/sdio_ops.c static u8 get_deviceid(u32 addr) · line 100
Quoted 5 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1
-1@@ -97,7 +97,7 @@ static u8 get_deviceid(u32 addr)/* * Ref: -*HalSdioGetCmdAddr8723BSdio() +*hal_sdio_get_cmd_addr_8723b_sdio()
What does this comment even mean?
I think you can delete it.
But really, that's a crazy function name length, can you make it any shorter?
thanks,
greg k-h
Quoted 24 lines · CEST Greg KH
Quoted 23 lines · Fabio M. De Francesco
Remove camelcase. Issue detected by checkpatch.pl. For now, change only names of static functions in order to not break the driver's code.
Signed-off-by Fabio M. De Francesco <[email protected]>--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 44 ++++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-)drivers/staging/rtl8723bs/hal/sdio_ops.c +1
-1@@ -19,7 +19,7 @@/* */ /* Creadted by Roger, 2011.01.31. */ /* */ -static void HalSdioGetCmdAddr8723BSdio( +static void hal_sdio_get_cmd_addr_8723b_sdio( struct adapter *adapter, u8 device_id, u32 addr,@@ -97,7 +97,7 @@ static u8 get_deviceid(u32 addr)
Quoted 6 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c static u8 get_deviceid(u32 addr) · line 100
Quoted 4 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1
-1/* * Ref: -*HalSdioGetCmdAddr8723BSdio() +*hal_sdio_get_cmd_addr_8723b_sdio() What does this comment even mean?
Who can tell? Maybe we should ask the author :(
Quoted 3 lines
I think you can delete it.
Mission accomplished. I'm about to send a new patch.
Quoted 2 lines
But really, that's a crazy function name length, can you make it any shorter?
Device drivers developers have their own "style": functions names must have 25 characters or more!
Quoted 4 lines
thanks,
greg k-h