[PATCH v4 1/3] staging: rtl8723bs: Fix coding style errors
Fixing ERROR: "foo *bar" should be "foo *bar" in hal_phy_cfg.h as reported by checkpatch.pl Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 419ddb0733aa..7e48abc4c760 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -42,7 +42,7 @@ u32 Data u32 PHY_QueryRFReg_8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 eRFPath, u32RegAddr, u32BitMask @@ -50,7 +50,7 @@ u32 BitMask void PHY_SetRFReg_8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 eRFPath, u32RegAddr, u32BitMask, @@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter); void PHY_SetTxPowerIndex( -struct adapter * Adapter, +struct adapter *Adapter, u32PowerIndex, u8 RFPath, u8 Rate @@ -74,7 +74,7 @@ u8Rate u8 PHY_GetTxPowerIndex( -struct adapter * padapter, +struct adapter *padapter, u8 RFPath, u8 Rate, enum CHANNEL_WIDTH BandWidth, @@ -83,19 +83,19 @@ u8 Channel void PHY_GetTxPowerLevel8723B( -struct adapter * Adapter, - s32*powerlevel +struct adapter *Adapter, + s32 *powerlevel ); void PHY_SetTxPowerLevel8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 channel ); void PHY_SetBWMode8723B( -struct adapter * Adapter, +struct adapter *Adapter, enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ unsigned char Offset /* Upper, Lower, or Don't care */ ); @@ -108,7 +108,7 @@ u8 channel void PHY_SetSwChnlBWMode8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 channel, enum CHANNEL_WIDTH Bandwidth, u8 Offset40, -- 2.25.1
[PATCH v4 0/3] Fix coding style issues in staging
Hey everyone, Following the comments received I've updated the patch. The patch cleans up coding style issues in the file drivers/staging/rtl8723bs/include/hal_phy_cfg.h Changelog: v1: Fixed ERROR: "foo * bar" should be "foo *bar" reported by checkpatch.pl v1 -> v2: Cleaned up multiline function declarations as suggested by Greg and adjusted spacing in macro definitions to align them. v2 -> v3: Broke the single patch in v2 into multiple patches with each patch doing one single task. v3 -> v4: 1. Corrected the patch subject following Larry's suggestion. 2. Merged the second and third patches into one following Greg's comment. 3. Removed comments from the PHY_SetBWMode8723B function declaration. Aditya Jain (3): staging: rtl8723bs: Fix coding style errors staging: rtl8723bs: Clean up function declations staging: rtl8723bs: Align macro definitions .../staging/rtl8723bs/include/hal_phy_cfg.h | 116 +- 1 file changed, 32 insertions(+), 84 deletions(-) -- 2.25.1
[PATCH v4 2/3] staging: rtl8723bs: Clean up function declations
Clean up multiline function declartions in hal_phy_cfg.h to improve code readablility Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h | 110 +- 1 file changed, 29 insertions(+), 81 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 7e48abc4c760..0eb3e57f4082 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -25,37 +25,16 @@ /*--Define structure End*/ /*--Exported Function prototype-*/ -u32 -PHY_QueryBBReg_8723B( -struct adapter *Adapter, -u32RegAddr, -u32BitMask - ); - -void -PHY_SetBBReg_8723B( -struct adapter *Adapter, -u32RegAddr, -u32BitMask, -u32Data - ); - -u32 -PHY_QueryRFReg_8723B( -struct adapter *Adapter, -u8 eRFPath, -u32RegAddr, -u32BitMask - ); - -void -PHY_SetRFReg_8723B( -struct adapter *Adapter, -u8 eRFPath, -u32RegAddr, -u32BitMask, -u32Data - ); +u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask); + +void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr, + u32 BitMask, u32 Data); + +u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath, +u32 RegAddr, u32 BitMask); + +void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath, + u32 RegAddr, u32 BitMask, u32 Data); /* MAC/BB/RF HAL config */ int PHY_BBConfig8723B(struct adapter *Adapter); @@ -64,56 +43,25 @@ int PHY_RFConfig8723B(struct adapter *Adapter); s32 PHY_MACConfig8723B(struct adapter *padapter); -void -PHY_SetTxPowerIndex( -struct adapter *Adapter, -u32PowerIndex, -u8 RFPath, -u8 Rate - ); - -u8 -PHY_GetTxPowerIndex( -struct adapter *padapter, -u8 RFPath, -u8 Rate, -enum CHANNEL_WIDTH BandWidth, -u8 Channel - ); - -void -PHY_GetTxPowerLevel8723B( -struct adapter *Adapter, - s32 *powerlevel - ); - -void -PHY_SetTxPowerLevel8723B( -struct adapter *Adapter, -u8 channel - ); - -void -PHY_SetBWMode8723B( -struct adapter *Adapter, -enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ -unsigned char Offset /* Upper, Lower, or Don't care */ -); - -void -PHY_SwChnl8723B(/* Call after initialization */ -struct adapter *Adapter, -u8 channel - ); - -void -PHY_SetSwChnlBWMode8723B( -struct adapter *Adapter, -u8 channel, -enum CHANNEL_WIDTH Bandwidth, -u8 Offset40, -u8 Offset80 -); +void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex, +u8 RFPath, u8 Rate); + +u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate, + enum CHANNEL_WIDTH BandWidth, u8 Channel); + +void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel); + +void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel); + +void PHY_SetBWMode8723B(struct adapter *Adapter, enum CHANNEL_WIDTH Bandwidth, + unsigned char Offset); + +/* Call after initialization */ +void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel); + +void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel, + enum CHANNEL_WIDTH Bandwidth, + u8 Offset40, u8 Offset80); /*--Exported Function prototype End-*/ -- 2.25.1
[PATCH v4 3/3] staging: rtl8723bs: Align macro definitions
Adjust spacing in macro definitions to align them and improve readbility Signed-off-by: Aditya Jain --- drivers/staging/rtl8723bs/include/hal_phy_cfg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 0eb3e57f4082..ed3488a09d79 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -8,11 +8,11 @@ #define __INC_HAL8723BPHYCFG_H__ /*--Define Parameters---*/ -#define LOOP_LIMIT 5 -#define MAX_STALL_TIME 50 /* us */ +#define LOOP_LIMIT 5 +#define MAX_STALL_TIME 50 /* us */ #define AntennaDiversityValue 0x80/* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */ #define MAX_TXPWR_IDX_NMODE_92S63 -#define Reset_Cnt_Limit3 +#define Reset_Cnt_Limit3 #define MAX_AGGR_NUM 0x07 -- 2.25.1
Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
On Sun, Jul 26, 2020 at 11:45 PM Aditya Jain wrote: > > On Sun, Jul 26, 2020 at 10:45 PM Joe Perches wrote: > > > > On Sun, 2020-07-26 at 17:02 +0200, Greg KH wrote: > > > On Sun, Jul 26, 2020 at 07:50:12PM +0530, Aditya Jain wrote: > > > > Cleaning up messy multiline function declarations in hal_phy_cfg.h > > [] > > > > diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > > > > b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > > [] > Ok, I'll merge this patch with the previous one. Had separated the two > to make the diffs smaller thinking they'll > be easier to review. But yeah, I get the point. > > > > -void > > > > -PHY_SetSwChnlBWMode8723B( > > > > -struct adapter *Adapter, > > > > -u8 channel, > > > > -enum CHANNEL_WIDTH Bandwidth, > > > > -u8 Offset40, > > > > -u8 Offset80 > > > > +void PHY_SetBWMode8723B(struct adapter *Adapter, > > > > + enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ > > > > + unsigned char Offset/* Upper, Lower, or Don't > > > > care */ > > > > > > Those comments should go at the top of the function declaration, in > > > kernel doc format. > > > > Not every external function needs kernel-doc. > > > > This is a realtek staging driver that likely it will never be > > moved out of staging. > > > > > Should I just remove the comments then? Sorry, but I'm a newbie, and > not really sure what the function is or supposed to do. > I can try looking it up if kernel-doc is required here. Hi all, Any directions on how I should continue? > > Regards, > Aditya Jain Thanks and Regards, Aditya Jain
Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors
On 26/07/20 11:33 pm, Larry Finger wrote: On 7/26/20 3:40 AM, Aditya Jain wrote: On Sun, Jul 26, 2020 at 1:56 PM Greg KH wrote: On Sun, Jul 26, 2020 at 01:32:15PM +0530, Aditya Jain wrote: Fixing ERROR: "foo * bar" should be "foo *bar" in hal_phy_cfg.h as reported by checkpatch.pl Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 419ddb0733aa..fd5f377bad4f 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -42,7 +42,7 @@ u32 Data u32 PHY_QueryRFReg_8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 eRFPath, u32 RegAddr, u32 BitMask Ick, these are all horrid. How about just making these all on a single line like most functions have them instead of this one cleanup? Same for the other changes you made in this file. thanks, greg k-h Agreed. I'll clean it up. While you are at it, drop the "include;" from the subject. For staging, the usual subject is of the form "staging: driver: thing being done". In your case "staging: rtl8723bs: Fix coding style errors". The directory of the files are not relevant. Ok, I'll take care of this and update the subject in the next version of the Patch series. I am also not in favor of the large white space between the variable type and the name, but that is probably the subject of separate patches. I think, the v3 patch series resolves this. Larry Regards, Aditya Jain
Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
On Sun, Jul 26, 2020 at 10:45 PM Joe Perches wrote: > > On Sun, 2020-07-26 at 17:02 +0200, Greg KH wrote: > > On Sun, Jul 26, 2020 at 07:50:12PM +0530, Aditya Jain wrote: > > > Cleaning up messy multiline function declarations in hal_phy_cfg.h > [] > > > diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > > > b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > [] Ok, I'll merge this patch with the previous one. Had separated the two to make the diffs smaller thinking they'll be easier to review. But yeah, I get the point. > > > -void > > > -PHY_SetSwChnlBWMode8723B( > > > -struct adapter *Adapter, > > > -u8 channel, > > > -enum CHANNEL_WIDTH Bandwidth, > > > -u8 Offset40, > > > -u8 Offset80 > > > +void PHY_SetBWMode8723B(struct adapter *Adapter, > > > + enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ > > > + unsigned char Offset/* Upper, Lower, or Don't > > > care */ > > > > Those comments should go at the top of the function declaration, in > > kernel doc format. > > Not every external function needs kernel-doc. > > This is a realtek staging driver that likely it will never be > moved out of staging. > > Should I just remove the comments then? Sorry, but I'm a newbie, and not really sure what the function is or supposed to do. I can try looking it up if kernel-doc is required here. Regards, Aditya Jain
[PATCH v3 4/4] staging: rtl8723bs: include: Align macro definitions
Adjust spacing in macro definitions to align them and improve readbility Signed-off-by: Aditya Jain --- drivers/staging/rtl8723bs/include/hal_phy_cfg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 2b059c9c7851..b3d5d24126e8 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -8,11 +8,11 @@ #define __INC_HAL8723BPHYCFG_H__ /*--Define Parameters---*/ -#define LOOP_LIMIT 5 -#define MAX_STALL_TIME 50 /* us */ +#define LOOP_LIMIT 5 +#define MAX_STALL_TIME 50 /* us */ #define AntennaDiversityValue 0x80/* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */ #define MAX_TXPWR_IDX_NMODE_92S63 -#define Reset_Cnt_Limit3 +#define Reset_Cnt_Limit3 #define MAX_AGGR_NUM 0x07 -- 2.25.1
[PATCH v3 2/4] staging: rtl8723bs: include: Clean up function declations
Clean up multiline function declartions in hal_phy_cfg.h to improve code readablility Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h | 44 --- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 7e48abc4c760..3cec06e9f359 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -25,37 +25,16 @@ /*--Define structure End*/ /*--Exported Function prototype-*/ -u32 -PHY_QueryBBReg_8723B( -struct adapter *Adapter, -u32RegAddr, -u32BitMask - ); +u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask); -void -PHY_SetBBReg_8723B( -struct adapter *Adapter, -u32RegAddr, -u32BitMask, -u32Data - ); +void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr, + u32 BitMask, u32 Data); -u32 -PHY_QueryRFReg_8723B( -struct adapter *Adapter, -u8 eRFPath, -u32RegAddr, -u32BitMask - ); +u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath, +u32 RegAddr, u32 BitMask); -void -PHY_SetRFReg_8723B( -struct adapter *Adapter, -u8 eRFPath, -u32RegAddr, -u32BitMask, -u32Data - ); +void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath, + u32 RegAddr, u32 BitMask, u32 Data); /* MAC/BB/RF HAL config */ int PHY_BBConfig8723B(struct adapter *Adapter); @@ -64,13 +43,8 @@ int PHY_RFConfig8723B(struct adapter *Adapter); s32 PHY_MACConfig8723B(struct adapter *padapter); -void -PHY_SetTxPowerIndex( -struct adapter *Adapter, -u32PowerIndex, -u8 RFPath, -u8 Rate - ); +void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex, +u8 RFPath, u8 Rate); u8 PHY_GetTxPowerIndex( -- 2.25.1
[PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations
Cleaning up messy multiline function declarations in hal_phy_cfg.h This patch is a continuation of patch "Clean up function declarations" Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h | 56 ++- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 3cec06e9f359..2b059c9c7851 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -46,49 +46,25 @@ s32 PHY_MACConfig8723B(struct adapter *padapter); void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex, u8 RFPath, u8 Rate); -u8 -PHY_GetTxPowerIndex( -struct adapter *padapter, -u8 RFPath, -u8 Rate, -enum CHANNEL_WIDTH BandWidth, -u8 Channel - ); - -void -PHY_GetTxPowerLevel8723B( -struct adapter *Adapter, - s32 *powerlevel - ); - -void -PHY_SetTxPowerLevel8723B( -struct adapter *Adapter, -u8 channel - ); - -void -PHY_SetBWMode8723B( -struct adapter *Adapter, -enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ -unsigned char Offset /* Upper, Lower, or Don't care */ -); +u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate, + enum CHANNEL_WIDTH BandWidth, u8 Channel); + +void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel); + +void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel); -void -PHY_SwChnl8723B(/* Call after initialization */ -struct adapter *Adapter, -u8 channel - ); - -void -PHY_SetSwChnlBWMode8723B( -struct adapter *Adapter, -u8 channel, -enum CHANNEL_WIDTH Bandwidth, -u8 Offset40, -u8 Offset80 +void PHY_SetBWMode8723B(struct adapter *Adapter, + enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ + unsigned char Offset/* Upper, Lower, or Don't care */ ); +/* Call after initialization */ +void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel); + +void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel, + enum CHANNEL_WIDTH Bandwidth, + u8 Offset40, u8 Offset80); + /*--Exported Function prototype End-*/ #endif -- 2.25.1
[PATCH v3 1/4] staging: rtl8723bs: include: Fix coding style errors
Fixing ERROR: "foo *bar" should be "foo *bar" in hal_phy_cfg.h as reported by checkpatch.pl Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 419ddb0733aa..7e48abc4c760 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -42,7 +42,7 @@ u32 Data u32 PHY_QueryRFReg_8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 eRFPath, u32RegAddr, u32BitMask @@ -50,7 +50,7 @@ u32 BitMask void PHY_SetRFReg_8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 eRFPath, u32RegAddr, u32BitMask, @@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter); void PHY_SetTxPowerIndex( -struct adapter * Adapter, +struct adapter *Adapter, u32PowerIndex, u8 RFPath, u8 Rate @@ -74,7 +74,7 @@ u8Rate u8 PHY_GetTxPowerIndex( -struct adapter * padapter, +struct adapter *padapter, u8 RFPath, u8 Rate, enum CHANNEL_WIDTH BandWidth, @@ -83,19 +83,19 @@ u8 Channel void PHY_GetTxPowerLevel8723B( -struct adapter * Adapter, - s32*powerlevel +struct adapter *Adapter, + s32 *powerlevel ); void PHY_SetTxPowerLevel8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 channel ); void PHY_SetBWMode8723B( -struct adapter * Adapter, +struct adapter *Adapter, enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ unsigned char Offset /* Upper, Lower, or Don't care */ ); @@ -108,7 +108,7 @@ u8 channel void PHY_SetSwChnlBWMode8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 channel, enum CHANNEL_WIDTH Bandwidth, u8 Offset40, -- 2.25.1
Fix code style issues in staging
Hi all, The following series of patches fixes code style issues in the file staging/drivers/rtl8723bs/include/hal_phy_cfg.h Regards, Aditya Jain
[PATCH v2] staging: rtl8723bs: include: Fix coding style issues
Cleaning messy function declartions and fixing code style errors in hal_phy_cfg.h as reported by checkpatch.pl Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h | 118 +- 1 file changed, 33 insertions(+), 85 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 419ddb0733aa..2f123903279c 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -8,54 +8,31 @@ #define __INC_HAL8723BPHYCFG_H__ /*--Define Parameters---*/ -#define LOOP_LIMIT 5 -#define MAX_STALL_TIME 50 /* us */ +#define LOOP_LIMIT 5 +#define MAX_STALL_TIME 50 /* us */ #define AntennaDiversityValue 0x80/* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */ #define MAX_TXPWR_IDX_NMODE_92S63 -#define Reset_Cnt_Limit3 - -#define MAX_AGGR_NUM 0x07 +#define Reset_Cnt_Limit3 +#define MAX_AGGR_NUM 0x07 /*--Define Parameters End---*/ - /*--Define structure*/ /*--Define structure End*/ /*--Exported Function prototype-*/ -u32 -PHY_QueryBBReg_8723B( -struct adapter *Adapter, -u32RegAddr, -u32BitMask - ); - -void -PHY_SetBBReg_8723B( -struct adapter *Adapter, -u32RegAddr, -u32BitMask, -u32Data - ); - -u32 -PHY_QueryRFReg_8723B( -struct adapter * Adapter, -u8 eRFPath, -u32RegAddr, -u32BitMask - ); - -void -PHY_SetRFReg_8723B( -struct adapter * Adapter, -u8 eRFPath, -u32RegAddr, -u32BitMask, -u32Data - ); +u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask); + +void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr, + u32 BitMask, u32 Data); + +u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath, +u32 RegAddr, u32 BitMask); + +void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath, + u32 RegAddr, u32 BitMask, u32 Data); /* MAC/BB/RF HAL config */ int PHY_BBConfig8723B(struct adapter *Adapter); @@ -64,57 +41,28 @@ int PHY_RFConfig8723B(struct adapter *Adapter); s32 PHY_MACConfig8723B(struct adapter *padapter); -void -PHY_SetTxPowerIndex( -struct adapter * Adapter, -u32PowerIndex, -u8 RFPath, -u8 Rate - ); - -u8 -PHY_GetTxPowerIndex( -struct adapter * padapter, -u8 RFPath, -u8 Rate, -enum CHANNEL_WIDTH BandWidth, -u8 Channel - ); - -void -PHY_GetTxPowerLevel8723B( -struct adapter * Adapter, - s32*powerlevel - ); - -void -PHY_SetTxPowerLevel8723B( -struct adapter * Adapter, -u8 channel - ); - -void -PHY_SetBWMode8723B( -struct adapter * Adapter, -enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ -unsigned char Offset /* Upper, Lower, or Don't care */ -); +void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex, +u8 RFPath, u8 Rate); -void -PHY_SwChnl8723B(/* Call after initialization */ -struct adapter *Adapter, -u8 channel - ); - -void -PHY_SetSwChnlBWMode8723B( -struct adapter * Adapter, -u8 channel, -enum CHANNEL_WIDTH Bandwidth, -u8 Offset40, -u8 Offset80 +u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate, + enum CHANNEL_WIDTH BandWidth, u8 Channel); + +void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel); + +void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel); + +void PHY_SetBWMode8723B(struct adapter *Adapter, + enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ + unsigned char Offset/* Upper, Lower, or Don't care */ ); +/* Call after initialization */ +void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel); + +void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel, + enum CHANNEL_WIDTH Bandwidth, + u8 Offset40, u8 Offset80); + /*--Exported Function prototype End-*/ #endif -- 2.25.1
Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors
On Sun, Jul 26, 2020 at 1:56 PM Greg KH wrote: > > On Sun, Jul 26, 2020 at 01:32:15PM +0530, Aditya Jain wrote: > > Fixing ERROR: "foo * bar" should be "foo *bar" in hal_phy_cfg.h > > as reported by checkpatch.pl > > > > Signed-off-by: Aditya Jain > > --- > > .../staging/rtl8723bs/include/hal_phy_cfg.h| 18 +- > > 1 file changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > > b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > > index 419ddb0733aa..fd5f377bad4f 100644 > > --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > > +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h > > @@ -42,7 +42,7 @@ u32 Data > > > > u32 > > PHY_QueryRFReg_8723B( > > -struct adapter * Adapter, > > +struct adapter *Adapter, > > u8 eRFPath, > > u32 RegAddr, > > u32 BitMask > > Ick, these are all horrid. How about just making these all on a single > line like most functions have them instead of this one cleanup? > > Same for the other changes you made in this file. > > thanks, > > greg k-h Agreed. I'll clean it up. Regards, Aditya Jain
[PATCH] staging: rtl8723bs: include: Fix coding style errors
Fixing ERROR: "foo *bar" should be "foo *bar" in hal_phy_cfg.h as reported by checkpatch.pl Signed-off-by: Aditya Jain --- .../staging/rtl8723bs/include/hal_phy_cfg.h| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h index 419ddb0733aa..fd5f377bad4f 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy_cfg.h +++ b/drivers/staging/rtl8723bs/include/hal_phy_cfg.h @@ -42,7 +42,7 @@ u32 Data u32 PHY_QueryRFReg_8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 eRFPath, u32RegAddr, u32BitMask @@ -50,7 +50,7 @@ u32 BitMask void PHY_SetRFReg_8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 eRFPath, u32RegAddr, u32BitMask, @@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter); void PHY_SetTxPowerIndex( -struct adapter * Adapter, +struct adapter *Adapter, u32PowerIndex, u8 RFPath, u8 Rate @@ -74,7 +74,7 @@ u8Rate u8 PHY_GetTxPowerIndex( -struct adapter * padapter, +struct adapter *padapter, u8 RFPath, u8 Rate, enum CHANNEL_WIDTH BandWidth, @@ -83,19 +83,19 @@ u8 Channel void PHY_GetTxPowerLevel8723B( -struct adapter * Adapter, - s32*powerlevel +struct adapter *Adapter, + s32 *powerlevel ); void PHY_SetTxPowerLevel8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 channel ); void PHY_SetBWMode8723B( -struct adapter * Adapter, +struct adapter *Adapter, enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ unsigned char Offset /* Upper, Lower, or Don't care */ ); @@ -108,7 +108,7 @@ u8 channel void PHY_SetSwChnlBWMode8723B( -struct adapter * Adapter, +struct adapter *Adapter, u8 channel, enum CHANNEL_WIDTH Bandwidth, u8 Offset40, -- 2.25.1