From: Greg KH <gregkh@linuxfoundation.org>
To: Himadri Pandya <himadri18.07@gmail.com>
Cc: adham.abozaeid@microchip.com, ajay.kathat@microchip.com,
outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v2] staging: wilc1000: remove unnecessary variable result
Date: Sat, 9 Mar 2019 11:29:36 +0100 [thread overview]
Message-ID: <20190309102936.GA18149@kroah.com> (raw)
In-Reply-To: <20190309101610.39595-1-himadri18.07@gmail.com>
On Sat, Mar 09, 2019 at 03:46:10PM +0530, Himadri Pandya wrote:
> Remove unnecessary local variable "result" and its assignments from
> function wilc_set_pmkid_info. Suggested by Coccinelle.
>
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
> Changes in V2:
> - Arrange the function arguments to the right of "(" in function
> call in the return statement
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 4dd9a20f6a0b..fa0e1bd9f836 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -1358,17 +1358,15 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
> int wilc_set_pmkid_info(struct wilc_vif *vif, struct wilc_pmkid_attr *pmkid)
> {
> struct wid wid;
> - int result;
>
> wid.id = WID_PMKID_INFO;
> wid.type = WID_STR;
> wid.size = (pmkid->numpmkid * sizeof(struct wilc_pmkid)) + 1;
> wid.val = (u8 *)pmkid;
>
> - result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
> - wilc_get_vif_idx(vif));
> + return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
> + wilc_get_vif_idx(vif));
>
> - return result;
> }
>
> int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr)
> ---
> drivers/staging/wilc1000/host_interface.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 4dd9a20f6a0b..fa0e1bd9f836 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -1358,17 +1358,15 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
> int wilc_set_pmkid_info(struct wilc_vif *vif, struct wilc_pmkid_attr *pmkid)
> {
> struct wid wid;
> - int result;
>
> wid.id = WID_PMKID_INFO;
> wid.type = WID_STR;
> wid.size = (pmkid->numpmkid * sizeof(struct wilc_pmkid)) + 1;
> wid.val = (u8 *)pmkid;
>
> - result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
> - wilc_get_vif_idx(vif));
> + return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
> + wilc_get_vif_idx(vif));
>
> - return result;
> }
>
> int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr)
> --
> 2.17.1
>
The same patch is included in this email twice :(
That's not going to go well when I try to apply it, please fix up and
resend.
thanks,
greg k-h
next prev parent reply other threads:[~2019-03-09 10:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-09 9:48 [PATCH] staging: wilc1000: remove unnecessary variable result Himadri Pandya
2019-03-09 9:53 ` [Outreachy kernel] " Julia Lawall
2019-03-09 10:23 ` Himadri Pandya
2019-03-09 10:16 ` [PATCH v2] " Himadri Pandya
2019-03-09 10:27 ` Himadri Pandya
2019-03-09 10:29 ` Greg KH [this message]
2019-03-09 13:34 ` [Outreachy kernel] " Julia Lawall
2019-03-09 10:35 ` Himadri Pandya
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=20190309102936.GA18149@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=adham.abozaeid@microchip.com \
--cc=ajay.kathat@microchip.com \
--cc=himadri18.07@gmail.com \
--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.