From: Alison Schofield <amsfield22@gmail.com>
To: Tamara Diaconita <diaconitatamara@gmail.com>
Cc: aditya.shankar@microchip.com, ganesh.krishna@microchip.com,
gregkh@linuxfoundation.org, outreachy-kernel@googlegroups.com,
Tamara Diaconita <diaconita.tamara@gmail.com>
Subject: Re: [Outreachy kernel] [PATCH v4] staging: wilc1000: Enhance code formatting
Date: Fri, 10 Mar 2017 10:04:19 -0800 [thread overview]
Message-ID: <20170310180418.GA19658@d830.WORKGROUP> (raw)
In-Reply-To: <20170310102031.32314-1-diaconita.tamara@gmail.com>
On Fri, Mar 10, 2017 at 12:20:31PM +0200, Tamara Diaconita wrote:
> Trims line size at 80 characters in coreconfigurator.h file by
> shortening the name of variables.
>
> Problem found with checkpatch.pl.
>
> Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
> ---
Hi Tamara,
This patch is good and succinct. It does one thing well.
(It did not give me patch review fatigue ;))
I'd like to see you reflect that focus in your subject line &
log message.
Since subject should say what it does, let's be more specific
and rather than saying "Enhance code formatting" say something
like "rename struct connect_resp_info to resp_info".
Then in your log message you can go on and say why you how
shortened the name and it's related assignments. (It allowed
you to trim line sizes to 80 and enhance readability.)
So - v5 it!
thanks,
alisons
> Changes since v3:
> *Changed the variables name I modified in coreconfigurator.h in other related files: corecofigurator.c and host_interface.c.
>
> Changes since v2:
> *Shorten variables name.
> *Separate the patch from a patch set.
>
> Changes since v1:
> *Put the patch in a patch set.
>
> drivers/staging/wilc1000/coreconfigurator.c | 26 +++++++++++++-------------
> drivers/staging/wilc1000/coreconfigurator.h | 4 ++--
> drivers/staging/wilc1000/host_interface.c | 2 +-
> 3 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
> index 6229947..572a077 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -350,38 +350,38 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
> }
>
> 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)
> {
> - struct connect_resp_info *connect_resp_info = NULL;
> + struct resp_info *resp_info = NULL;
> u16 assoc_resp_len = 0;
> u8 *ies = NULL;
> u16 ies_len = 0;
>
> - connect_resp_info = kzalloc(sizeof(*connect_resp_info), GFP_KERNEL);
> - if (!connect_resp_info)
> + resp_info = kzalloc(sizeof(*resp_info), GFP_KERNEL);
> + if (!resp_info)
> return -ENOMEM;
>
> assoc_resp_len = (u16)buffer_len;
>
> - connect_resp_info->status = get_asoc_status(buffer);
> - if (connect_resp_info->status == SUCCESSFUL_STATUSCODE) {
> - connect_resp_info->capability = get_assoc_resp_cap_info(buffer);
> - connect_resp_info->assoc_id = get_asoc_id(buffer);
> + resp_info->status = get_asoc_status(buffer);
> + if (resp_info->status == SUCCESSFUL_STATUSCODE) {
> + resp_info->capability = get_assoc_resp_cap_info(buffer);
> + resp_info->assoc_id = get_asoc_id(buffer);
>
> ies = &buffer[CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN];
> ies_len = assoc_resp_len - (CAP_INFO_LEN + STATUS_CODE_LEN +
> AID_LEN);
>
> - connect_resp_info->ies = kmemdup(ies, ies_len, GFP_KERNEL);
> - if (!connect_resp_info->ies) {
> - kfree(connect_resp_info);
> + resp_info->ies = kmemdup(ies, ies_len, GFP_KERNEL);
> + if (!resp_info->ies) {
> + kfree(resp_info);
> return -ENOMEM;
> }
>
> - connect_resp_info->ies_len = ies_len;
> + resp_info->ies_len = ies_len;
> }
>
> - *ret_connect_resp_info = connect_resp_info;
> + *ret_resp_info = resp_info;
>
> return 0;
> }
> diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
> index 10101f8..f40d6f2 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.h
> +++ b/drivers/staging/wilc1000/coreconfigurator.h
> @@ -97,7 +97,7 @@ struct network_info {
> u64 tsf_hi;
> };
>
> -struct connect_resp_info {
> +struct resp_info {
> u16 capability;
> u16 status;
> u16 assoc_id;
> @@ -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,
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 2429c85..baed80d 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -1336,7 +1336,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
> u8MacStatusAdditionalInfo = pstrRcvdGnrlAsyncInfo->buffer[9];
> if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
> u32 u32RcvdAssocRespInfoLen = 0;
> - struct connect_resp_info *pstrConnectRespInfo = NULL;
> + struct resp_info *pstrConnectRespInfo = NULL;
>
> memset(&strConnectInfo, 0, sizeof(struct connect_info));
>
> --
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170310102031.32314-1-diaconita.tamara%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
prev parent reply other threads:[~2017-03-10 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 10:20 [PATCH v4] staging: wilc1000: Enhance code formatting Tamara Diaconita
2017-03-10 18:04 ` Alison Schofield [this message]
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=20170310180418.GA19658@d830.WORKGROUP \
--to=amsfield22@gmail.com \
--cc=aditya.shankar@microchip.com \
--cc=diaconita.tamara@gmail.com \
--cc=diaconitatamara@gmail.com \
--cc=ganesh.krishna@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=outreachy-kernel@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.