From patchwork Fri Mar 18 02:16:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Calaby X-Patchwork-Id: 8615721 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A6F33C0553 for ; Fri, 18 Mar 2016 02:16:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE32A20279 for ; Fri, 18 Mar 2016 02:16:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAF872026F for ; Fri, 18 Mar 2016 02:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752546AbcCRCQg (ORCPT ); Thu, 17 Mar 2016 22:16:36 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:36074 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751465AbcCRCQe (ORCPT ); Thu, 17 Mar 2016 22:16:34 -0400 Received: by mail-pf0-f173.google.com with SMTP id u190so145883717pfb.3 for ; Thu, 17 Mar 2016 19:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+KgFYmmVTcJ1RloNXkH8Yv8VU25PtOAAoQPHBRSeLCo=; b=FVWoCoMX1hCsDsCaJzSgQOKr17NmQ7uyb/86DzJhnr8nrHjfTJakfz9tWacr+gRIFn fDffBAH7hRBRNb0VgbIEUUctbqk+H/CnHvDML7Csdl2sjgyN4MQBDu+58Av6g57RV3hC V87MCfbV7oEqzKkB3yanc6U8YP3lttlGLgsduEv8BvLXeyUUSdaoDZZ5MsqevvgYinH8 n6c5aa11DkdEiTK2BVQvvXC1PLH20D5wEkxbnDM2+arkJhTC5lGTcnQ5JGbw7K/gXj2A zmlqq5tD+pHV7ha+TMeCtLxTJe3sHCDiCjdEEC34azCU9O0ZK+888tgUUzTnFjSBj6Xs JueA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+KgFYmmVTcJ1RloNXkH8Yv8VU25PtOAAoQPHBRSeLCo=; b=QDGldOrqszPbs25MV3jKpyU6oz6DcDygx6Aj26iBxYaTMWq5sdVGSl5LTDyuRRQTd1 dhNNY2biyKeB9Hj7Xm44hMIhnqDL7o0ojS6TiUh77nok3auOMPj6i66Co6CElQzzDdxo Hcgxofgh9fXDPpidP1weoE8FGNgyCl5UWsviuF5Oqhv7rBaYnTscntXApc42TfdeqwUV smvKp392d1hamye/OuxQDYQlKfdpz+F6uWUIwULuYnKyNAgBttGUtXMZamiZvdwGRfJZ +QGj6arDBJAvChCiUHpoT6mYPGLsrBk1LcIpFBJG3i9FtSXmObbQQG2JUT2Of+lX7hv3 rlpw== X-Gm-Message-State: AD7BkJKd0ljM7NyY0sW1L4wi/R1YCE06lrVQTsgPtZm6i9zHzt/21EtA1uk+2ZfUDdTOLg== X-Received: by 10.98.69.84 with SMTP id s81mr19581076pfa.125.1458267393971; Thu, 17 Mar 2016 19:16:33 -0700 (PDT) Received: from multimedia.lan (C-59-101-14-180.hay.connect.net.au. [59.101.14.180]) by smtp.gmail.com with ESMTPSA id r203sm16364389pfr.22.2016.03.17.19.16.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Mar 2016 19:16:33 -0700 (PDT) From: Julian Calaby To: Kalle Valo Cc: QCA ath9k Development , Ivan Safonov , Miaoqing Pan , linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org Subject: [PATCH 01/19] ath9k: Remove unnecessary ?: operator Date: Fri, 18 Mar 2016 13:16:26 +1100 Message-Id: <61d140e53a590054c5981788ed12fdda9ef4c0bb.1458262312.git.julian.calaby@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: References: 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 From: Ivan Safonov "(thermometer < 0) ? 0 : (thermometer == X)" is equivalent to "thermometer == X" for X >= 0. Signed-off-by: Ivan Safonov [Updated commit message] Signed-off-by: Julian Calaby --- 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 54ed2f7..a049f8d 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); }