All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himadri Pandya <himadri18.07@gmail.com>
To: adham.abozaeid@microchip.com, ajay.kathat@microchip.com,
	gregkh@linuxfoundation.org
Cc: outreachy-kernel@googlegroups.com,
	Himadri Pandya <himadri18.07@gmail.com>
Subject: [PATCH v2] staging: wilc1000: remove unnecessary variable result
Date: Sat,  9 Mar 2019 16:05:16 +0530	[thread overview]
Message-ID: <20190309103516.39919-1-himadri18.07@gmail.com> (raw)
In-Reply-To: <20190309094840.38154-1-himadri18.07@gmail.com>

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

 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



      parent reply	other threads:[~2019-03-09 10:35 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
2019-03-09 13:34   ` [Outreachy kernel] " Julia Lawall
2019-03-09 10:35 ` Himadri Pandya [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=20190309103516.39919-1-himadri18.07@gmail.com \
    --to=himadri18.07@gmail.com \
    --cc=adham.abozaeid@microchip.com \
    --cc=ajay.kathat@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.