mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: navin patidar <navin.patidar@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	navin patidar <navin.patidar@gmail.com>
Subject: [PATCH 01/20] staging: rtl8188eu: Rework function phy_CalculateBitShift()
Date: Sat, 23 Aug 2014 19:48:22 +0530	[thread overview]
Message-ID: <1408803521-13715-1-git-send-email-navin.patidar@gmail.com> (raw)

Rename CamelCase variables and function name.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
---
 drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c |   42 ++++-------------------
 1 file changed, 6 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c
index 0f90cf4..522f185 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c
@@ -24,48 +24,18 @@
 #include <rtw_iol.h>
 #include <rtl8188e_hal.h>
 
-/*---------------------------Define Local Constant---------------------------*/
-/* Channel switch:The size of command tables for switch channel*/
 #define MAX_PRECMD_CNT 16
 #define MAX_RFDEPENDCMD_CNT 16
 #define MAX_POSTCMD_CNT 16
 
 #define MAX_DOZE_WAITING_TIMES_9x 64
 
-/*---------------------------Define Local Constant---------------------------*/
-
-
-/*------------------------Define global variable-----------------------------*/
-
-/*------------------------Define local variable------------------------------*/
-
-
-/*--------------------Define export function prototype-----------------------*/
-/*  Please refer to header file */
-/*--------------------Define export function prototype-----------------------*/
-
-/*----------------------------Function Body----------------------------------*/
-/*  */
-/*  1. BB register R/W API */
-/*  */
-
-/**
-* Function:	phy_CalculateBitShift
-*
-* OverView:	Get shifted position of the BitMask
-*
-* Input:
-*			u32		BitMask,
-*
-* Output:	none
-* Return:		u32		Return the shift bit bit position of the mask
-*/
-static	u32 phy_CalculateBitShift(u32 BitMask)
+static u32 cal_bit_shift(u32 bitmask)
 {
 	u32 i;
 
 	for (i = 0; i <= 31; i++) {
-		if (((BitMask>>i) &  0x1) == 1)
+		if (((bitmask >> i) & 0x1) == 1)
 			break;
 	}
 	return i;
@@ -95,7 +65,7 @@ rtl8188e_PHY_QueryBBReg(
 	u32 ReturnValue = 0, OriginalValue, BitShift;
 
 	OriginalValue = usb_read32(Adapter, RegAddr);
-	BitShift = phy_CalculateBitShift(BitMask);
+	BitShift = cal_bit_shift(BitMask);
 	ReturnValue = (OriginalValue & BitMask) >> BitShift;
 	return ReturnValue;
 }
@@ -125,7 +95,7 @@ void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr, u32 BitMask, u3
 
 	if (BitMask != bMaskDWord) { /* if not "double word" write */
 		OriginalValue = usb_read32(Adapter, RegAddr);
-		BitShift = phy_CalculateBitShift(BitMask);
+		BitShift = cal_bit_shift(BitMask);
 		Data = ((OriginalValue & (~BitMask)) | (Data << BitShift));
 	}
 
@@ -310,7 +280,7 @@ u32 rtl8188e_PHY_QueryRFReg(struct adapter *Adapter, enum rf_radio_path eRFPath,
 
 	Original_Value = phy_RFSerialRead(Adapter, eRFPath, RegAddr);
 
-	BitShift =  phy_CalculateBitShift(BitMask);
+	BitShift =  cal_bit_shift(BitMask);
 	Readback_Value = (Original_Value & BitMask) >> BitShift;
 	return Readback_Value;
 }
@@ -347,7 +317,7 @@ rtl8188e_PHY_SetRFReg(
 	/*  RF data is 12 bits only */
 	if (BitMask != bRFRegOffsetMask) {
 		Original_Value = phy_RFSerialRead(Adapter, eRFPath, RegAddr);
-		BitShift =  phy_CalculateBitShift(BitMask);
+		BitShift =  cal_bit_shift(BitMask);
 		Data = ((Original_Value & (~BitMask)) | (Data << BitShift));
 	}
 
-- 
1.7.10.4


             reply	other threads:[~2014-08-23 14:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-23 14:18 navin patidar [this message]
2014-08-23 14:18 ` [PATCH 02/20] staging: rtl8188eu: Remove unused wrapper function rtw_hal_read_bbreg() navin patidar
2014-08-23 14:18 ` [PATCH 03/20] staging: rtl8188eu: Rework function PHY_QueryBBReg() navin patidar
2014-08-30 20:44   ` Greg KH
2014-08-31  7:25     ` navin patidar
2014-08-23 14:18 ` [PATCH 04/20] staging: rtl8188eu: Remove unused wrapper function rtw_hal_write_bbreg() navin patidar
2014-08-23 14:18 ` [PATCH 05/20] staging: rtl8188eu: Rework function PHY_SetBBReg() navin patidar
2014-08-23 14:18 ` [PATCH 06/20] staging: rtl8188eu: Rework function phy_RFSerialRead() navin patidar
2014-08-23 14:18 ` [PATCH 07/20] staging: rtl8188eu: Rework function phy_RFSerialWrite() navin patidar
2014-08-23 14:18 ` [PATCH 08/20] staging: rtl8188eu: Rework function PHY_QueryRFReg() navin patidar
2014-08-23 14:18 ` [PATCH 09/20] staging: rtl8188eu: Rework function rtl8188e_PHY_SetRFReg() navin patidar
2014-08-23 14:18 ` [PATCH 10/20] staging: rtl8188eu: Rework function getTxPowerIndex88E() navin patidar
2014-08-23 14:18 ` [PATCH 11/20] staging: rtl8188eu: Rework function phy_PowerIndexCheck88E() navin patidar
2014-08-23 14:18 ` [PATCH 12/20] staging: rtl8188eu: Rework function _PHY_SetBWMode92C() navin patidar
2014-08-23 14:18 ` [PATCH 13/20] staging: rtl8188eu: Rework function _PHY_SwChnl8192C() navin patidar
2014-08-23 14:18 ` [PATCH 14/20] staging: rtl8188eu: Rework function PHY_SetTxPowerLevel8188E() navin patidar
2014-08-23 14:18 ` [PATCH 15/20] staging: rtl8188eu: Rework function PHY_SetBWMode8188E() navin patidar
2014-08-23 14:18 ` [PATCH 16/20] staging: rtl8188eu: Rework function PHY_SwChnl8188E() navin patidar
2014-08-23 14:18 ` [PATCH 17/20] staging: rtl8188eu: Rename rtl8188e_phycfg.c to phy.c navin patidar
2014-08-23 14:18 ` [PATCH 18/20] staging: rtl8188eu: Rename HalHWImg8188E_BB.c to bb_cfg.c navin patidar
2014-08-23 14:18 ` [PATCH 19/20] staging: rtl8188eu: Rename HalHWImg8188E_RF.c to rf_cfg.c navin patidar
2014-08-23 14:18 ` [PATCH 20/20] staging: rtl8188eu: Rename HalHWImg8188E_MAC.c to mac_cfg.c navin patidar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408803521-13715-1-git-send-email-navin.patidar@gmail.com \
    --to=navin.patidar@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®