Skip to contentSkip to conversation

staging: wilc1000: Enhance code formatting

PATCH Superseded Tamara Diaconita 2 participants 4 messages Mar 10, 2017 Staging

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: wilc1000: Enhance code formatting

This trims line size at 80 characters by shortening the names of variables.

It makes code easier to read.

Problem found with checkpatch.pl

---
Changes since v2:
*Shorten variables name.
*Separate the patch from a patch set.

Changes since v1:
*Put the pacth in a set.

 drivers/staging/wilc1000/coreconfigurator.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/coreconfigurator.h +1 -1
index 10101f8..45563b9 100644
@@ -123,7 +123,7 @@ struct disconnect_info {
 s32 wilc_parse_network_info(u8 *msg_buffer,
 			    struct network_info **ret_network_info);
 s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
-			       struct connect_resp_info **ret_connect_resp_info);
+			       struct resp_info **ret_resp_info);
 void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
 				 u32 u32Length);
 void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
Signature · 1 line
2.9.3
#1 lore raw
Quoted 24 lines · Tamara Diaconita

This trims line size at 80 characters by shortening the names of variables.

It makes code easier to read.

Problem found with checkpatch.pl

---
Changes since v2:
*Shorten variables name.
*Separate the patch from a patch set.

Changes since v1:
*Put the pacth in a set.

 drivers/staging/wilc1000/coreconfigurator.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/coreconfigurator.h +0 -0
index 10101f8..45563b9 100644

drivers/staging/wilc1000/coreconfigurator.h struct disconnect_info { · line 126

Quoted 5 lines
drivers/staging/wilc1000/coreconfigurator.h +1 -1
@@ -123,7 +123,7 @@ struct disconnect_info {
 s32 wilc_parse_network_info(u8 *msg_buffer,
 			    struct network_info **ret_network_info);
 s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
-			       struct connect_resp_info **ret_connect_resp_info);
+			       struct resp_info **ret_resp_info);

I don't think you can change the name of a type in only one place. You would have to change the declaration of the type and all of the other uses. Did you compile any file that includes this code? Changing a header file is tricky, because you can't compile it directly. You have to find a .c file that contains it.

julia

Quoted 13 lines
drivers/staging/wilc1000/coreconfigurator.h +0 -1
 void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
 				 u32 u32Length);
 void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
--

2.9.3

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170310091221.7109-1-diaconita.tamara%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw

I compiled the code and I understand what you said. I modified the files related to the one I changed in the first place.
Do I need to make a patch set with all the files I have changed?

vineri, 10 martie 2017, 11:18:11 UTC+2, Julia Lawall a scris:

Quoted 64 lines · Tamara Diaconita
Quoted 14 lines

This trims line size at 80 characters by shortening the names of variables.

It makes code easier to read.

Problem found with checkpatch.pl

Signed-off-by Tamara Diaconita <[email protected] <javascript:>>

---
Changes since v2:
*Shorten variables name.
*Separate the patch from a patch set.

Review

Quoted 7 lines

Changes since v1:
*Put the pacth in a set.

 drivers/staging/wilc1000/coreconfigurator.h | 2 +- 
 1 file changed, 1 insertion(+), 1 deletion(-) 
(quoted diff) +0 -0

b/drivers/staging/wilc1000/coreconfigurator.h

drivers/staging/wilc1000/coreconfigurator.h struct disconnect_info { · line 126

Quoted 8 lines

index 10101f8..45563b9 100644

drivers/staging/wilc1000/coreconfigurator.h +0 -1
@@ -123,7 +123,7 @@ struct disconnect_info { 
 s32 wilc_parse_network_info(u8 *msg_buffer, 
                             struct network_info **ret_network_info); 
 s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len, 
-                               struct connect_resp_info 

**ret_connect_resp_info);

drivers/staging/wilc1000/coreconfigurator.h struct disconnect_info { · line 126

Quoted 1 line
drivers/staging/wilc1000/coreconfigurator.h +1 -0
+                               struct resp_info **ret_resp_info); 

I don't think you can change the name of a type in only one place. You would have to change the declaration of the type and all of the other uses. Did you compile any file that includes this code? Changing a header file is tricky, because you can't compile it directly. You have to find a .c file that contains it.

julia

Quoted 8 lines
drivers/staging/wilc1000/coreconfigurator.h +0 -0
 void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer, 
                                  u32 u32Length); 
 void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer, 
Signature · 4 lines
2.9.3 

-- 
You received this message because you are subscribed to the Google 

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected] <javascript:>.

Quoted 1 line

To post to this group, send email to [email protected]

<javascript:>.

Quoted 1 line

To view this discussion on the web visit

https://groups.google.com/d/msgid/outreachy-kernel/20170310091221.7109-1-diaconita.tamara%40gmail.com.

Quoted 2 lines

For more options, visit https://groups.google.com/d/optout.

#3 lore raw
Quoted 3 lines · Tamara Diaconita

I compiled the code and I understand what you said. I modified the files related to the one I changed in the first place.
Do I need to make a patch set with all the files I have changed?

Every patch must result in a kernel that compiles. So you need to make one or more patches that satisfy that property.

julia

Quoted 84 lines

vineri, 10 martie 2017, 11:18:11 UTC+2, Julia Lawall a scris:

On Fri, 10 Mar 2017, Tamara Diaconita wrote:

> This trims line size at 80 characters by shortening the names of
> variables.
>
> It makes code easier to read.
>
> Problem found with checkpatch.pl
>
> Signed-off-by: Tamara Diaconita <[email protected]> > ---
> Changes since v2:
> *Shorten variables name.
> *Separate the patch from a patch set.
>
> Changes since v1:
> *Put the pacth in a set.
>
>  drivers/staging/wilc1000/coreconfigurator.h | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
> index 10101f8..45563b9 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.h > +++ b/drivers/staging/wilc1000/coreconfigurator.h > @@ -123,7 +123,7 @@ struct disconnect_info {
>  s32 wilc_parse_network_info(u8 *msg_buffer,
>                              struct network_info **ret_network_info);
>  s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len, > -                               struct connect_resp_info **ret_connect_resp_info);
> +                               struct resp_info **ret_resp_info);

I don't think you can change the name of a type in only one place.  You
would have to change the declaration of the type and all of the other
uses.  Did you compile any file that includes this code? Changing a
header file is tricky, because you can't compile it directly. You have to
find a .c file that contains it.

julia

>  void wilc_scan_complete_received(struct wilc *wilc, u8
*pu8Buffer,
>                                   u32 u32Length);
>  void wilc_network_info_received(struct wilc *wilc, u8
*pu8Buffer,
> --
> 2.9.3
>
> --
> You received this message because you are subscribed to the
Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected].
> To post to this group, send email to
[email protected].
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20170310091221.7109-1-di aconita.tamara%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/7d6aece5-b445-4b82-b7d7- e948c81fb36d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.