]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ipw2x00: Remove unnecessary parentheses
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 20 Sep 2018 20:45:49 +0000 (13:45 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 1 Oct 2018 15:30:26 +0000 (18:30 +0300)
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: warning: equality
comparison with extraneous parentheses [-Wparentheses-equality]
                if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: note: remove
extraneous parentheses around the comparison to silence this warning
                if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
                    ~                    ^               ~
drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: note: use '=' to
turn this equality comparison into an assignment
                if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
                                         ^~
                                         =
1 warning generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/134
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/ipw2x00/ipw2200.c

index 9644e7b93645f510394b1deb3accf6976fc87a78..bbdca13c5a9f8540195f693b3c45819881041f1d 100644 (file)
@@ -5652,7 +5652,7 @@ static void ipw_merge_adhoc_network(struct work_struct *work)
                }
 
                mutex_lock(&priv->mutex);
-               if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
+               if (priv->ieee->iw_mode == IW_MODE_ADHOC) {
                        IPW_DEBUG_MERGE("remove network %*pE\n",
                                        priv->essid_len, priv->essid);
                        ipw_remove_current_network(priv);