[v1,0/4] staging: r8188eu: trivial code cleanup patches

Message ID cover.1666021212.git.drv@mailo.com
Headers
Series staging: r8188eu: trivial code cleanup patches |

Message

Deepak R Varma Oct. 17, 2022, 3:56 p.m. UTC
  Address different kinds of checkpatch complains for the staging/r8188eu module.
The patches are required to be applied in sequence.

Changes in v1:
   1. Improve language / grammar for the patch descriptions
   2. Further improve code reformatting

Deepak R Varma (4):
  staging: r8188eu: use Linux kernel variable naming convention
  staging: r8188eu: reformat long computation lines
  staging: r8188eu: remove {} for single statement blocks
  staging: r8188eu: use htons macro instead of __constant_htons

 drivers/staging/r8188eu/core/rtw_br_ext.c | 122 +++++++++++-----------
 1 file changed, 62 insertions(+), 60 deletions(-)

--
2.30.2
  

Comments

Philipp Hortmann Oct. 17, 2022, 9:06 p.m. UTC | #1
On 10/17/22 17:56, Deepak R Varma wrote:
> Address different kinds of checkpatch complains for the staging/r8188eu module.
> The patches are required to be applied in sequence.
> 
> Changes in v1:
>     1. Improve language / grammar for the patch descriptions
>     2. Further improve code reformatting
> 
> Deepak R Varma (4):
>    staging: r8188eu: use Linux kernel variable naming convention
>    staging: r8188eu: reformat long computation lines
>    staging: r8188eu: remove {} for single statement blocks
>    staging: r8188eu: use htons macro instead of __constant_htons
> 
>   drivers/staging/r8188eu/core/rtw_br_ext.c | 122 +++++++++++-----------
>   1 file changed, 62 insertions(+), 60 deletions(-)
> 
> --
> 2.30.2
> 
> 
> 
> 

I think this patch series should be v2 as the first one was a v1. The 
next one should be the v3.

Please do variable changes driver wide and not only limited to a file.
Example:
This line contains the old variable:
void *scdb_findEntry(struct adapter *priv, unsigned char *ipAddr);

But in this line you have already changed ip_addr.
void *scdb_findEntry(struct adapter *priv, unsigned char *ip_addr)
{
	unsigned char network_addr[MAX_NETWORK_ADDR_LEN];
	struct nat25_network_db_entry *db;
	int hash;
...


Please change all networkAddr and not only some.

Is it possible to changing __constant_htons as well in the entire driver?

Driver can be applied and compiled.
Tested device.

Thanks

Bye Philipp
  
Deepak R Varma Oct. 17, 2022, 9:27 p.m. UTC | #2
On Mon, Oct 17, 2022 at 11:06:19PM +0200, Philipp Hortmann wrote:
> On 10/17/22 17:56, Deepak R Varma wrote:
> > Address different kinds of checkpatch complains for the staging/r8188eu module.
> > The patches are required to be applied in sequence.
> >
> > Changes in v1:
> >     1. Improve language / grammar for the patch descriptions
> >     2. Further improve code reformatting
> >
> > Deepak R Varma (4):
> >    staging: r8188eu: use Linux kernel variable naming convention
> >    staging: r8188eu: reformat long computation lines
> >    staging: r8188eu: remove {} for single statement blocks
> >    staging: r8188eu: use htons macro instead of __constant_htons
> >
> >   drivers/staging/r8188eu/core/rtw_br_ext.c | 122 +++++++++++-----------
> >   1 file changed, 62 insertions(+), 60 deletions(-)
> >
> > --
> > 2.30.2
> >
> >
> >
> >

Hello Philipp,
Thank you for testing the patch set and the following feedback. Much appreciate.

>
> I think this patch series should be v2 as the first one was a v1. The next
> one should be the v3.

Okay. I will switch it to v3 if there is opportunity for another revision of
this patch set.

>
> Please do variable changes driver wide and not only limited to a file.
> Example:
> This line contains the old variable:
> void *scdb_findEntry(struct adapter *priv, unsigned char *ipAddr);
>
> But in this line you have already changed ip_addr.
> void *scdb_findEntry(struct adapter *priv, unsigned char *ip_addr)
> {
> 	unsigned char network_addr[MAX_NETWORK_ADDR_LEN];
> 	struct nat25_network_db_entry *db;
> 	int hash;
> ...

Since this is my first patch set, I wanted to be small and manageable. I also
made changes only to function parameters and local variable. I am now
comfortable to make similar change for the other files and symbols such as
functions and structures. I will send in a separate patch set for the remaining
files of this driver.

>
>
> Please change all networkAddr and not only some.

For this file, I changed all networkAddr definitions except those that are part
of global structure definition. I will include those changes in the next patch
set.

>
> Is it possible to changing __constant_htons as well in the entire driver?

Sure, in the next patch set.

>
> Driver can be applied and compiled.
> Tested device.
Thank you again.

./drv

>
> Thanks
>
> Bye Philipp
>
>