From: Arnd Bergmann <arnd@arndb.de>
To: Binoy Jayan <binoy.jayan@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] rtl8192u: Replace semaphore rf_sem with mutex
Date: Thu, 02 Jun 2016 09:46:45 +0200 [thread overview]
Message-ID: <3160394.ryVW7iLUlP@wuerfel> (raw)
In-Reply-To: <1464843475-4870-5-git-send-email-binoy.jayan@linaro.org>
On Thursday, June 2, 2016 10:27:55 AM CEST Binoy Jayan wrote:
> diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
> index 2780838..7b921d4 100644
> --- a/drivers/staging/rtl8192u/r8192U.h
> +++ b/drivers/staging/rtl8192u/r8192U.h
> @@ -880,7 +880,7 @@ typedef struct r8192_priv {
> short crcmon;
>
> struct mutex wx_mutex;
> - struct semaphore rf_sem; /* Used to lock rf write operation */
> + struct mutex rf_mutex; /* Used to lock rf write operation */
>
> u8 rf_type; /* 0: 1T2R, 1: 2T4R */
> RT_RF_TYPE_819xU rf_chip;
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index c6d3119..46d613a 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -2374,7 +2374,7 @@ static void rtl8192_init_priv_lock(struct r8192_priv *priv)
> spin_lock_init(&priv->tx_lock);
> spin_lock_init(&priv->irq_lock);
> mutex_init(&priv->wx_mutex);
> - sema_init(&priv->rf_sem, 1);
> + mutex_init(&priv->rf_mutex);
> mutex_init(&priv->mutex);
> }
I think this one should be done differently: as there are obviously no users of
this semaphore, there is no need to replace it with a mutex, it should just be
removed entirely.
Arnd
next prev parent reply other threads:[~2016-06-02 7:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 4:57 [PATCH 0/4] *** rtl8192u: Replace semaphores with mutexes *** Binoy Jayan
2016-06-02 4:57 ` [PATCH 1/4] rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex Binoy Jayan
2016-06-02 4:57 ` [PATCH 2/4] rtl8192u: ieee80211_device: " Binoy Jayan
2016-06-02 4:57 ` [PATCH 3/4] rtl8192u: Replace semaphore scan_sem " Binoy Jayan
2016-06-02 4:57 ` [PATCH 4/4] rtl8192u: Replace semaphore rf_sem " Binoy Jayan
2016-06-02 7:46 ` Arnd Bergmann [this message]
2016-06-02 7:52 ` [PATCH 0/4] *** rtl8192u: Replace semaphores with mutexes *** Arnd Bergmann
2016-06-02 10:52 ` [PATCH v2 " Binoy Jayan
2016-06-02 10:52 ` [PATCH v2 1/4] rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex Binoy Jayan
2016-06-02 10:53 ` [PATCH v2 2/4] rtl8192u: ieee80211_device: " Binoy Jayan
2016-06-02 10:53 ` [PATCH v2 3/4] rtl8192u: Replace semaphore scan_sem " Binoy Jayan
2016-06-02 10:53 ` [PATCH v2 4/4] rtl8192u: Remove unused semaphore rf_sem Binoy Jayan
2016-06-02 11:01 ` [PATCH v2 0/4] *** rtl8192u: Replace semaphores with mutexes *** Arnd Bergmann
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=3160394.ryVW7iLUlP@wuerfel \
--to=arnd@arndb.de \
--cc=binoy.jayan@linaro.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox