From patchwork Mon Dec 28 13:48:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Safonov X-Patchwork-Id: 7926101 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DEA609F349 for ; Mon, 28 Dec 2015 13:47:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 106D720263 for ; Mon, 28 Dec 2015 13:47:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F6DC20253 for ; Mon, 28 Dec 2015 13:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752232AbbL1Nq6 (ORCPT ); Mon, 28 Dec 2015 08:46:58 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:34432 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbbL1Nq4 (ORCPT ); Mon, 28 Dec 2015 08:46:56 -0500 Received: by mail-lf0-f50.google.com with SMTP id y184so198268815lfc.1; Mon, 28 Dec 2015 05:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=Ca8fs4sqCzjI6KsJow9rTZiwnxImdveUQJCtqKgbV7Y=; b=N0SZF3ALxw9EbnsLhHuBLoBwAOlvAxc2j2PEX9MYsJGHoELXSY0GVMyI+Lv7JXZXWJ nd5opYTUP+yoc3nmEHIKuLi6lpqD9Japl46hA2+/11Mu5AAD/p1naY27BZKvx7ifMclD T9UrrxX0EX+oWDsDLcpFG3rS9DS3JlZmwu/h8MPIMxUC57yRqvxTUb24zT95Lc7EX2Ov FEqgXvRlhrQ7fF9fU5yRD/OKAmFEIr86AOk+GmS3Osi4txt3NA9gSjGEsch+OIiNnBf+ iDF+vjfkhkC9Orqeyg0X5mZWbz/ryCffZq1fTEwLCFZ3wZ2/BOtW5YdmF/TEiHjincpC cjxQ== X-Received: by 10.25.143.14 with SMTP id r14mr19213738lfd.71.1451310414882; Mon, 28 Dec 2015 05:46:54 -0800 (PST) Received: from alpha ([193.218.138.55]) by smtp.gmail.com with ESMTPSA id p1sm8112799lbo.30.2015.12.28.05.46.53 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Dec 2015 05:46:54 -0800 (PST) Received: (nullmailer pid 10576 invoked by uid 1000); Mon, 28 Dec 2015 13:48:52 -0000 Date: Mon, 28 Dec 2015 20:48:52 +0700 From: Ivan Safonov To: QCA ath9k Development Cc: Kalle Valo , linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] /drivers/net/wireless/ath/ath9k remove unnecessary ?: operator Message-ID: <20151228134852.GA10572@alpha.sfu-kras.ru> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ((thermometer < 0) ? 0 : (thermometer == X)) and (thermometer == X) are equal for X >= 0. Signed-off-by: Ivan Safonov --- drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 8b4561e..35e57f7 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c @@ -4097,16 +4097,16 @@ static void ar9003_hw_thermometer_apply(struct ath_hw *ah) REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, therm_on); - therm_on = (thermometer < 0) ? 0 : (thermometer == 0); + therm_on = thermometer == 0; REG_RMW_FIELD(ah, AR_PHY_65NM_CH0_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on); if (pCap->chip_chainmask & BIT(1)) { - therm_on = (thermometer < 0) ? 0 : (thermometer == 1); + therm_on = thermometer == 1; REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on); } if (pCap->chip_chainmask & BIT(2)) { - therm_on = (thermometer < 0) ? 0 : (thermometer == 2); + therm_on = thermometer == 2; REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, therm_on); }