2020-07-26 08:03:29

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
.../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
@@ -50,7 +50,7 @@ u32 BitMask

void
PHY_SetRFReg_8723B(
-struct adapter * Adapter,
+struct adapter *Adapter,
u8 eRFPath,
u32 RegAddr,
u32 BitMask,
@@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);

void
PHY_SetTxPowerIndex(
-struct adapter * Adapter,
+struct adapter *Adapter,
u32 PowerIndex,
u8 RFPath,
u8 Rate
@@ -74,7 +74,7 @@ u8 Rate

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


2020-07-26 08:27:41

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors

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 <[email protected]>
> ---
> .../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

2020-07-26 09:26:28

by Aditya Jain

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors

On Sun, Jul 26, 2020 at 1:56 PM Greg KH <[email protected]> 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 <[email protected]>
> > ---
> > .../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

2020-07-26 10:54:53

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
.../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_92S 63
-#define Reset_Cnt_Limit 3
-
-#define MAX_AGGR_NUM 0x07
+#define Reset_Cnt_Limit 3

+#define MAX_AGGR_NUM 0x07

/*--------------------------Define Parameters End-------------------------------*/

-
/*------------------------------Define structure----------------------------*/

/*------------------------------Define structure End----------------------------*/

/*--------------------------Exported Function prototype---------------------*/
-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
- );
+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,
-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 */
-);
+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

2020-07-26 11:00:31

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2] staging: rtl8723bs: include: Fix coding style issues

On Sun, Jul 26, 2020 at 04:23:02PM +0530, Aditya Jain wrote:
> Cleaning messy function declartions and fixing code style
> errors in hal_phy_cfg.h as reported by checkpatch.pl
>
> Signed-off-by: Aditya Jain <[email protected]>
> ---
> .../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_92S 63
> -#define Reset_Cnt_Limit 3
> -
> -#define MAX_AGGR_NUM 0x07
> +#define Reset_Cnt_Limit 3
>
> +#define MAX_AGGR_NUM 0x07
>
> /*--------------------------Define Parameters End-------------------------------*/
>
> -
> /*------------------------------Define structure----------------------------*/
>
> /*------------------------------Define structure End----------------------------*/
>
> /*--------------------------Exported Function prototype---------------------*/
> -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
> - );
> +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,
> -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 */
> -);
> +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
>
> _______________________________________________
> devel mailing list
> [email protected]
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
to review. All Linux kernel patches need to only do one thing at a
time. If you need to do multiple things (such as clean up all coding
style issues in a file/driver), do it in a sequence of patches, each
one doing only one thing. This will make it easier to review the
patches to ensure that they are correct, and to help alleviate any
merge issues that larger patches can cause.

- You did not specify a description of why the patch is needed, or
possibly, any description at all, in the email body. Please read the
section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what is needed in order to
properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
and everyone else, to know what this patch is all about. Please read
the section entitled "The canonical patch format" in the kernel file,
Documentation/SubmittingPatches for what a proper Subject: line should
look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

2020-07-26 14:20:38

by Aditya Jain

[permalink] [raw]
Subject: 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

2020-07-26 14:21:37

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
.../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,
u32 RegAddr,
u32 BitMask
@@ -50,7 +50,7 @@ u32 BitMask

void
PHY_SetRFReg_8723B(
-struct adapter * Adapter,
+struct adapter *Adapter,
u8 eRFPath,
u32 RegAddr,
u32 BitMask,
@@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);

void
PHY_SetTxPowerIndex(
-struct adapter * Adapter,
+struct adapter *Adapter,
u32 PowerIndex,
u8 RFPath,
u8 Rate
@@ -74,7 +74,7 @@ u8 Rate

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

2020-07-26 14:23:42

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
.../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,
-u32 RegAddr,
-u32 BitMask
- );
+u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask);

-void
-PHY_SetBBReg_8723B(
-struct adapter *Adapter,
-u32 RegAddr,
-u32 BitMask,
-u32 Data
- );
+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
- );
+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
- );
+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,
-u32 PowerIndex,
-u8 RFPath,
-u8 Rate
- );
+void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
+ u8 RFPath, u8 Rate);

u8
PHY_GetTxPowerIndex(
--
2.25.1

2020-07-26 14:24:41

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
.../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

2020-07-26 14:25:21

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
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_92S 63
-#define Reset_Cnt_Limit 3
+#define Reset_Cnt_Limit 3

#define MAX_AGGR_NUM 0x07

--
2.25.1

2020-07-26 15:03:36

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations

On Sun, Jul 26, 2020 at 07:50:12PM +0530, Aditya Jain wrote:
> Cleaning up messy multiline function declarations in hal_phy_cfg.h
>
> This patch is a continuation of patch "Clean up function declarations"

This should be merged with that patch, no reason to make it separate.

>
> Signed-off-by: Aditya Jain <[email protected]>
> ---
> .../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 */

Those comments should go at the top of the function declaration, in
kernel doc format.

thanks

greg k-h

2020-07-26 17:16:48

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations

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
[]
> > -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.


2020-07-26 18:06:29

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: include: Fix coding style errors

On 7/26/20 3:40 AM, Aditya Jain wrote:
> On Sun, Jul 26, 2020 at 1:56 PM Greg KH <[email protected]> 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 <[email protected]>
>>> ---
>>> .../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.

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.

Larry

2020-07-26 18:16:25

by Aditya Jain

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations

On Sun, Jul 26, 2020 at 10:45 PM Joe Perches <[email protected]> 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

2020-07-26 18:33:24

by Aditya Jain

[permalink] [raw]
Subject: 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 <[email protected]>
>> 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 <[email protected]>
>>>> ---
>>>>   .../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

2020-07-28 20:05:59

by Aditya Jain

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] staging: rtl8723bs: include: Further clean up function declarations

On Sun, Jul 26, 2020 at 11:45 PM Aditya Jain
<[email protected]> wrote:
>
> On Sun, Jul 26, 2020 at 10:45 PM Joe Perches <[email protected]> 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

2020-07-29 19:22:41

by Aditya Jain

[permalink] [raw]
Subject: [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

2020-07-29 19:23:12

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
.../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,
u32 RegAddr,
u32 BitMask
@@ -50,7 +50,7 @@ u32 BitMask

void
PHY_SetRFReg_8723B(
-struct adapter * Adapter,
+struct adapter *Adapter,
u8 eRFPath,
u32 RegAddr,
u32 BitMask,
@@ -66,7 +66,7 @@ s32 PHY_MACConfig8723B(struct adapter *padapter);

void
PHY_SetTxPowerIndex(
-struct adapter * Adapter,
+struct adapter *Adapter,
u32 PowerIndex,
u8 RFPath,
u8 Rate
@@ -74,7 +74,7 @@ u8 Rate

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

2020-07-29 19:23:43

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
.../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,
-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
- );
+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,
-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 */
-);
-
-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

2020-07-29 19:25:11

by Aditya Jain

[permalink] [raw]
Subject: [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 <[email protected]>
---
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_92S 63
-#define Reset_Cnt_Limit 3
+#define Reset_Cnt_Limit 3

#define MAX_AGGR_NUM 0x07

--
2.25.1