From patchwork Fri Sep 21 09:48:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10609513 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DADDA6CB for ; Fri, 21 Sep 2018 09:49:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB7C92DC8B for ; Fri, 21 Sep 2018 09:49:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF34B2DC9B; Fri, 21 Sep 2018 09:49:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBDC62DC8B for ; Fri, 21 Sep 2018 09:49:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389583AbeIUPhK (ORCPT ); Fri, 21 Sep 2018 11:37:10 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50970 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbeIUPhK (ORCPT ); Fri, 21 Sep 2018 11:37:10 -0400 Received: by mail-wm1-f67.google.com with SMTP id s12-v6so2405031wmc.0; Fri, 21 Sep 2018 02:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q72Ia64O0Hj+jtCZ2mc6urtTqPRevPjtrB0L5cIiYPg=; b=NM+qVdobtIfq/q5x6B3Dtmn19wbQFKjhbqjS15dB1J3fDirStMeFB3xj4UmekCDHqk UNIHBVi/vE4OrSEbbbQ3R5no/6YG1b5t2sdpj10dZmWEfc7Zka92Eh8JLtbj7L0GdJTH hDgdTjcOSwOgnO8qBbEPaSHMTSzgi1RQ5tRYlXHIunF6XrRwR2ZVb/DWWBHYl3D+Essx 4zhLkwLKdME3lDCrTsR5HhRHSQy7nVfIYL1B0RnCNvTpyA7K+B9FyFgE+eQpB263vVxi xiyOFMu+UHpmkZZdhTQSTBSIVhomDV+i0wdm85KnbRzY+ntbWBXG7FQAoiO2ZCGvmwCN gm4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q72Ia64O0Hj+jtCZ2mc6urtTqPRevPjtrB0L5cIiYPg=; b=aXIZFc6n1If78G6TK7Qb1Hg5dqD6u1yODRg94VVxlcnF+ZQrkZlYg8SEz/FY5O8j76 IztdvInDReWRPjh3sZExia8WMqXsHj+Wfl77CqAtzPjJzaIS0PqMwjUFJtZQ7/hVTJ29 bDopiT8jPB1MysJvT5fYGj0k5OQMrDCz8n7m5einn+5GSukyAHWlHae73jIh6Vc/qlVm dN7YKdloZ32xJCpwCVjHJtrBaaNUoOHUndsZRgrh2QIfsKaVyAshy7PxPbqzEYN1DWvu 2kDDHh/FHm6v4m5wy41Xh89IkSRiSrbSLoJiizy+1VTgKmMeNBW94a2yd5ryanmmq1ZI gjMA== X-Gm-Message-State: APzg51CIOrwnU6M1n2DoThCEHIP4WPU+YDjouMxupYIq/UKpUPnby3HR LEvZui9+Jo+wD3jh+iVd8kGlkDWko3sfdg== X-Google-Smtp-Source: ACcGV62uRE3V/IrKK4lj+wG0duZyTmAB6h1PXhBzHBDcCAKlwPF/PV6dok7C+gMr7ORFlJPnQc74fA== X-Received: by 2002:a7b:c04c:: with SMTP id u12-v6mr6568435wmc.24.1537523344836; Fri, 21 Sep 2018 02:49:04 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id 88-v6sm25030740wrf.95.2018.09.21.02.49.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 02:49:04 -0700 (PDT) From: Nathan Chancellor To: Kalle Valo Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH] rsi: Remove unnecessary boolean condition Date: Fri, 21 Sep 2018 02:48:29 -0700 Message-Id: <20180921094828.16976-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clang warns that the address of a pointer will always evaluated as true in a boolean context. drivers/net/wireless/rsi/rsi_91x_mac80211.c:927:50: warning: address of array 'key->key' will always evaluate to 'true' [-Wpointer-bool-conversion] if (vif->type == NL80211_IFTYPE_STATION && key->key && ~~ ~~~~~^~~ 1 warning generated. Link: https://github.com/ClangBuiltLinux/linux/issues/136 Signed-off-by: Nathan Chancellor --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 4e510cbe0a89..e56fc83faf0e 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -924,7 +924,7 @@ static int rsi_hal_key_config(struct ieee80211_hw *hw, if (status) return status; - if (vif->type == NL80211_IFTYPE_STATION && key->key && + if (vif->type == NL80211_IFTYPE_STATION && (key->cipher == WLAN_CIPHER_SUITE_WEP104 || key->cipher == WLAN_CIPHER_SUITE_WEP40)) { if (!rsi_send_block_unblock_frame(adapter->priv, false))