All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Adham.Abozaeid@microchip.com>
To: <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
	<Ganesh.Krishna@microchip.com>, <Aditya.Shankar@microchip.com>,
	<johannes@sipsolutions.net>
Subject: [PATCH v3 4/4] staging: wilc1000: Remove unused mutex cfg_values_lock
Date: Tue, 6 Nov 2018 00:01:19 +0000	[thread overview]
Message-ID: <20181106000109.6178-5-adham.abozaeid@microchip.com> (raw)
In-Reply-To: <20181106000109.6178-1-adham.abozaeid@microchip.com>

From: Adham Abozaeid <adham.abozaeid@micochip.com>

After removing cfg_values member, cfg_values_lock that was used to protect
it can also be removed.

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
---
 drivers/staging/wilc1000/host_interface.c | 9 ---------
 drivers/staging/wilc1000/host_interface.h | 2 --
 2 files changed, 11 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 8d1142776310..2bf91df1ded1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -369,11 +369,8 @@ static void handle_cfg_param(struct work_struct *work)
 	struct cfg_param_attr *param = &msg->body.cfg_info;
 	int ret;
 	struct wid wid_list[32];
-	struct host_if_drv *hif_drv = vif->hif_drv;
 	int i = 0;
 
-	mutex_lock(&hif_drv->cfg_values_lock);
-
 	if (param->flag & RETRY_SHORT) {
 		wid_list[i].id = WID_SHORT_RETRY_LIMIT;
 		wid_list[i].val = (s8 *)&param->short_retry_limit;
@@ -409,7 +406,6 @@ static void handle_cfg_param(struct work_struct *work)
 	if (ret)
 		netdev_err(vif->ndev, "Error in setting CFG params\n");
 
-	mutex_unlock(&hif_drv->cfg_values_lock);
 	kfree(msg);
 }
 
@@ -3240,15 +3236,10 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 	timer_setup(&hif_drv->connect_timer, timer_connect_cb, 0);
 	timer_setup(&hif_drv->remain_on_ch_timer, listen_timer_cb, 0);
 
-	mutex_init(&hif_drv->cfg_values_lock);
-	mutex_lock(&hif_drv->cfg_values_lock);
-
 	hif_drv->hif_state = HOST_IF_IDLE;
 
 	hif_drv->p2p_timeout = 0;
 
-	mutex_unlock(&hif_drv->cfg_values_lock);
-
 	wilc->clients_count++;
 
 	return 0;
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 1e2e50e91f76..523b46bfb488 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -293,8 +293,6 @@ struct host_if_drv {
 	enum host_if_state hif_state;
 
 	u8 assoc_bssid[ETH_ALEN];
-	/*lock to protect concurrent setting of cfg params*/
-	struct mutex cfg_values_lock;
 
 	struct timer_list scan_timer;
 	struct wilc_vif *scan_timer_vif;
-- 
2.17.1


  parent reply	other threads:[~2018-11-06  0:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06  0:01 [PATCH v3 0/4] staging: wilc1000: validate input to set_wiphy_param and return proper errors Adham.Abozaeid
2018-11-06  0:01 ` [PATCH v3 1/4] staging: wilc1000: remove unused flags in handle_cfg_param() Adham.Abozaeid
2018-11-06  0:01 ` [PATCH v3 2/4] staging: wilc1000: validate cfg parameters before scheduling the work Adham.Abozaeid
2018-11-07  8:46   ` kbuild test robot
2018-11-08 11:22   ` Greg KH
2018-11-08 16:27     ` Adham.Abozaeid
2018-11-06  0:01 ` Adham.Abozaeid [this message]
2018-11-06  0:01 ` [PATCH v3 3/4] staging: wilc1000: Don't keep a copy of wiphy parameters in the driver Adham.Abozaeid

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=20181106000109.6178-5-adham.abozaeid@microchip.com \
    --to=adham.abozaeid@microchip.com \
    --cc=Aditya.Shankar@microchip.com \
    --cc=Ganesh.Krishna@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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.