From: Ajay Singh <ajay.kathat@microchip.com>
To: Claudiu Beznea <Claudiu.Beznea@microchip.com>
Cc: <linux-wireless@vger.kernel.org>, <devel@driverdev.osuosl.org>,
<gregkh@linuxfoundation.org>, <ganesh.krishna@microchip.com>,
<venkateswara.kaja@microchip.com>, <aditya.shankar@microchip.com>,
<adham.abozaeid@Microchip.com>
Subject: Re: [PATCH 05/30] staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info()
Date: Thu, 10 May 2018 00:29:50 +0530 [thread overview]
Message-ID: <20180510002950.16b475d9@ajaysk-VirtualBox> (raw)
In-Reply-To: <e7165eb4-584d-370c-7d5d-cca93ab34fc7@microchip.com>
On Wed, 9 May 2018 16:44:38 +0300
Claudiu Beznea <Claudiu.Beznea@microchip.com> wrote:
> On 07.05.2018 11:43, Ajay Singh wrote:
> > Fix line over 80 characters issue reported by checkpatch.pl in
> > host_int_parse_assoc_resp_info().
> >
> > Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
> > ---
> > drivers/staging/wilc1000/host_interface.c | 37
> > ++++++++++++++++++------------- 1 file changed, 21 insertions(+),
> > 16 deletions(-)
> >
> > diff --git a/drivers/staging/wilc1000/host_interface.c
> > b/drivers/staging/wilc1000/host_interface.c index 55a61d5..a341ff1
> > 100644 --- a/drivers/staging/wilc1000/host_interface.c
> > +++ b/drivers/staging/wilc1000/host_interface.c
> > @@ -1293,6 +1293,23 @@ static inline void
> > host_int_free_user_conn_req(struct host_if_drv *hif_drv)
> > hif_drv->usr_conn_req.ies = NULL; }
> >
> > +static void host_int_copy_conn_info(struct connect_resp_info
> > *conn_resp_info,
> > + struct connect_info *conn_info)
> > +{
> > + conn_info->status = conn_resp_info->status;
> > +
> > + if (conn_info->status == SUCCESSFUL_STATUSCODE &&
> > conn_resp_info->ies) {
> > + conn_info->resp_ies = kmemdup(conn_resp_info->ies,
> > +
> > conn_resp_info->ies_len,
> > + GFP_KERNEL);
> > + if (conn_info->resp_ies)
> > + conn_info->resp_ies_len =
> > conn_resp_info->ies_len;
> > + }
> > +
> > + kfree(conn_resp_info->ies);
> > + kfree(conn_resp_info);
> > +}
> > +
>
> Instead of adding new function why not using
> wilc_parse_assoc_resp_info() to return you the conn_info that you are
> copying it here? The connect_resp_info object that you are passing to
> wilc_parse_assoc_resp_info() is not used anywhere in
> host_int_parse_assoc_resp_info() it is used only to copy again from
> it to conn_info object.
Yes, there are different function because the purpose is different.
Primarily wilc_parse_assoc_resp_info() is to take care of parsing and
filing the response info and later connect_resp_info is used to fill
conn_info values. The elements in conn_info and connect_resp_info are
different, but now most of the fields are not used in connect_resp_info.
Returning 'conn_info' from wilc_parse_assoc_resp_info() might not be
correct. I will check if we can go away with connect_resp_info
structure itself as most of the field are not used in it.
>
> Also, in wilc_parse_assoc_resp_info() you can get rid of these lines:
> connect_resp_info->capability = get_assoc_resp_cap_info(buffer);
> connect_resp_info->assoc_id = get_asoc_id(buffer);
>
With above changes it can be taken care.
>
> > static inline void host_int_parse_assoc_resp_info(struct wilc_vif
> > *vif, u8 mac_status)
> > {
> > @@ -1316,25 +1333,13 @@ static inline void
> > host_int_parse_assoc_resp_info(struct wilc_vif *vif,
> > err =
> > wilc_parse_assoc_resp_info(rcv_assoc_resp,
> > rcvd_assoc_resp_info_len, &connect_resp_info);
> > - if (err) {
> > + if (err)
> > netdev_err(vif->ndev,
> > "wilc_parse_assoc_resp_info()
> > returned error %d\n", err);
> > - } else {
> > - conn_info.status =
> > connect_resp_info->status; -
> > - if (conn_info.status ==
> > SUCCESSFUL_STATUSCODE &&
> > - connect_resp_info->ies) {
> > - conn_info.resp_ies =
> > kmemdup(connect_resp_info->ies,
> > -
> > connect_resp_info->ies_len,
> > -
> > GFP_KERNEL);
> > - if (conn_info.resp_ies)
> > -
> > conn_info.resp_ies_len = connect_resp_info->ies_len;
> > - }
> > -
> > - kfree(connect_resp_info->ies);
> > - kfree(connect_resp_info);
> > - }
> > + else
> > +
> > host_int_copy_conn_info(connect_resp_info,
> > +
> > &conn_info); }
> > }
> >
> >
next prev parent reply other threads:[~2018-05-09 19:02 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 8:43 [PATCH 00/30] staging: wilc1000: checkpatch fixes and code cleanup Ajay Singh
2018-05-07 8:43 ` [PATCH 01/30] staging: wilc1000: added complete() call for error scenario in handle_key() Ajay Singh
2018-05-07 8:43 ` [PATCH 02/30] staging: wilc1000: remove 'ret' variable " Ajay Singh
2018-05-07 8:43 ` [PATCH 03/30] staging: wilc1000: fix line over 80 chars " Ajay Singh
2018-05-09 13:44 ` Claudiu Beznea
2018-05-09 18:36 ` Ajay Singh
2018-05-10 5:21 ` Claudiu Beznea
2018-05-15 8:22 ` Dan Carpenter
2018-05-07 8:43 ` [PATCH 04/30] staging: wilc1000: fix line over 80 characters issue in handle_connect() Ajay Singh
2018-05-07 8:43 ` [PATCH 05/30] staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info() Ajay Singh
2018-05-09 13:44 ` Claudiu Beznea
2018-05-09 18:59 ` Ajay Singh [this message]
2018-05-07 8:43 ` [PATCH 06/30] staging: wilc1000: fix line over 80 chars issue in host_int_handle_disconnect() Ajay Singh
2018-05-09 13:44 ` Claudiu Beznea
2018-05-09 18:33 ` Ajay Singh
2018-05-07 8:43 ` [PATCH 07/30] staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param() Ajay Singh
2018-05-09 13:43 ` Claudiu Beznea
2018-05-09 18:41 ` Ajay Singh
2018-05-07 8:43 ` [PATCH 08/30] staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info() Ajay Singh
2018-05-09 13:43 ` Claudiu Beznea
2018-05-09 18:41 ` Ajay Singh
2018-05-07 8:43 ` [PATCH 09/30] staging: wilc1000: rename kmalloc with kmemdup() in handle_connect_timeout() Ajay Singh
2018-05-07 8:43 ` [PATCH 10/30] staging: wilc1000: fix line over 80 chars in linux_mon Ajay Singh
2018-05-07 8:43 ` [PATCH 11/30] staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc() Ajay Singh
2018-05-07 8:43 ` [PATCH 12/30] staging: wilc1000: use kmalloc(sizeof(*mgmt_tx)...) in mgmt_tx() Ajay Singh
2018-05-07 8:43 ` [PATCH 13/30] staging: wilc1000: rename clear_duringIP() to avoid camelCase issue Ajay Singh
2018-05-09 13:43 ` Claudiu Beznea
2018-05-07 8:43 ` [PATCH 14/30] staging: wilc1000: fix line over 80 chars in add_network_to_shadow() Ajay Singh
2018-05-09 13:43 ` Claudiu Beznea
2018-05-09 18:42 ` Ajay Singh
2018-05-10 5:27 ` Claudiu Beznea
2018-05-14 8:57 ` Claudiu Beznea
2018-05-14 11:18 ` Ajay Singh
2018-05-07 8:43 ` [PATCH 15/30] staging: wilc1000: use kmemdup instead of kmalloc " Ajay Singh
2018-05-09 13:42 ` Claudiu Beznea
2018-05-09 19:17 ` Ajay Singh
2018-05-10 5:35 ` Claudiu Beznea
2018-05-10 7:47 ` Ajay Singh
2018-05-07 8:43 ` [PATCH 16/30] staging: wilc1000: fix line over 80 charas in wilc_wfi_remain_on_channel_expired() Ajay Singh
2018-05-07 8:43 ` [PATCH 17/30] staging: wilc1000: fix line over 80 chars in wilc_wfi_cfg_tx_vendor_spec() Ajay Singh
2018-05-09 13:42 ` Claudiu Beznea
2018-05-09 18:44 ` Ajay Singh
2018-05-07 8:43 ` [PATCH 18/30] staging: wilc1000: fix line over 80 chars in get_station() Ajay Singh
2018-05-07 8:43 ` [PATCH 19/30] staging: wilc1000: fix line over 80 chars in wilc_create_wiphy() declaration Ajay Singh
2018-05-07 8:43 ` [PATCH 20/30] staging: wilc1000: fix line over 80 characters in add_key() Ajay Singh
2018-05-07 8:43 ` [PATCH 21/30] staging: wilc1000: fix line over 80 chars in scan() Ajay Singh
2018-05-07 8:43 ` [PATCH 22/30] staging: wilc1000: fix line over 80 chars issue in connect() Ajay Singh
2018-05-07 8:43 ` [PATCH 23/30] staging: wilc1000: rename u8security to avoid datatype in variable name Ajay Singh
2018-05-07 8:43 ` [PATCH 24/30] staging: wilc1000: refactor del_station() to avoid parenthesis misalignment Ajay Singh
2018-05-15 9:01 ` Dan Carpenter
2018-05-15 11:46 ` Ajay Singh
2018-05-07 8:43 ` [PATCH 25/30] staging: wilc1000: fix line over 80 chars in wilc_sdio struct Ajay Singh
2018-05-07 8:43 ` [PATCH 26/30] staging: wilc1000: added #define for setting radiotap header Ajay Singh
2018-05-07 8:43 ` [PATCH 27/30] staging: wilc1000: remove 'flag' argument from wilc_mac_indicate() Ajay Singh
2018-05-07 8:43 ` [PATCH 28/30] staging: wilc1000: added comments for mutex and spinlock_t Ajay Singh
2018-05-09 13:42 ` Claudiu Beznea
2018-05-07 8:43 ` [PATCH 29/30] staging: wilc1000: remove unused 'lock' varible in 'wilc_priv' structure Ajay Singh
2018-05-07 8:43 ` [PATCH 30/30] staging: wilc1000: rename s8idxarray to avoid datatype in variable name Ajay Singh
2018-05-09 13:42 ` Claudiu Beznea
2018-05-09 18:44 ` Ajay Singh
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=20180510002950.16b475d9@ajaysk-VirtualBox \
--to=ajay.kathat@microchip.com \
--cc=Claudiu.Beznea@microchip.com \
--cc=adham.abozaeid@Microchip.com \
--cc=aditya.shankar@microchip.com \
--cc=devel@driverdev.osuosl.org \
--cc=ganesh.krishna@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-wireless@vger.kernel.org \
--cc=venkateswara.kaja@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).