From patchwork Sat Oct 14 09:41:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christos Gkekas X-Patchwork-Id: 10006337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 50045601E9 for ; Sat, 14 Oct 2017 09:41:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46581291C6 for ; Sat, 14 Oct 2017 09:41:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AF99291CA; Sat, 14 Oct 2017 09:41:51 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CE116291C6 for ; Sat, 14 Oct 2017 09:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=FIld+0tTxDQu2h7AkSezdGVktAAJu4QbxCBjr//yCl4=; b=YkZ tdQ/PLovttslhF4w/TEqPsgNs4OHfr/mXMdP1ZDdE8QW5RLAz+uravl2+0vTLmbCVxpU4z2dpmj3g jBisHKpGQaSnA0oVm9JOm8txupsvVC8tj0fgipfJXvDNxEsEA7ppY3QWNIK7rSvwc4SXrSBRzKFAO u3wAcIy7rxMmNkiB/FWBzjGQ11cJpQPfpbAO+Hg9anxMDUwEBHRZ24mnnRPTwOEK3MslCHS5UCErc sDZ2DxwLYKph9Y0IZlVxm3jLHi0uek97seqj6m5Moq/6DSIVUYxuHEvv29p98M4zIZ/lAijkj8I59 0QOK9cdz7ebAKfBCklWS6SsBdR3bMHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e3Iwy-0003Aj-1t; Sat, 14 Oct 2017 09:41:44 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e3Iwu-00039N-VZ for ath10k@lists.infradead.org; Sat, 14 Oct 2017 09:41:42 +0000 Received: by mail-wm0-x242.google.com with SMTP id t69so25298148wmt.2 for ; Sat, 14 Oct 2017 02:41:19 -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; bh=9k6VCgJJrS8yLKUh69fX0lCmFqTTU9+W5DsEfVH/h0g=; b=DOUE0J34EY6Bu+rWh9DB0NlwFLH+3GUWSi1y0qXMPkzarfUg5t3uV8pukpPP0WnKbZ 5gxaniaI1dsWHVm2Dars5ICFlSKCeaiqDu80biRpNQjEZNwyWEf13cCfSi0Y/pwSmPtw 7+R/R7JzrgvaRgfDtUz/p6D7huCX2rSBBpehdIJRHwpxN7gxokYuXsjMf+sg0SlQGumW 5ehFgUF0ZzXQXTKcfReAg7E++g97S8iDGbJKidIQWeOnJ0mfDJxeHF7huAnUXdcfCHYH 2JnVfkQ/8XqTXjxcOSWyNmxrPObwr8yrZazCojqXTj1RasKp+CJNi+dfWAa1iYhz58AF nBCw== 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; bh=9k6VCgJJrS8yLKUh69fX0lCmFqTTU9+W5DsEfVH/h0g=; b=F6czQ8ZJQORq65N9UjZPcbRXMghekWlylGl7vrKY4VlHq4WkT1P1DMYinZ5Q9K7UAk LzF8Qljt+UkU+cdY87ngANFvS7IYNE+4FhUszpr1ySgPiUruXwr2IxyZ87bxJrEBOXS6 eyGKp3DVzhN/sSIUQcS2u6vsHpacZdEipcBTlpns+ZacCJmTwwuMayEoMxI7poG2UOD+ kpuRwDcNcKpS8CosBZImB9rP5HgxM7bhaKRlpvajVXCRzbdG+nKYKwSlcLt6NWhCdlKf 3h/nQgOr2AR0slZzzG3YFs+YlsPLvx4p1/+pJuw4qP223tB8aiPlt97/ee/XmrrR1XA8 9dBQ== X-Gm-Message-State: AMCzsaVw4JI0WMrUi1eMHp3CT+58oh+yVEa8Ljg77MzVtwYdLVVahXtX vp10Nd4ez0nhQtISXsx4T1E= X-Google-Smtp-Source: ABhQp+Quju4GO/QVAwd4Yf42jzfrfibJT417ZeoV6cG6/aBLUE7VoUCgAC1kS7I1zw2EY6yjqOBBWQ== X-Received: by 10.28.169.21 with SMTP id s21mr3078213wme.87.1507974078572; Sat, 14 Oct 2017 02:41:18 -0700 (PDT) Received: from inspiron ([2a02:c7d:5e0c:c300:4c41:282:53db:800d]) by smtp.gmail.com with ESMTPSA id w126sm2810084wme.25.2017.10.14.02.41.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Oct 2017 02:41:17 -0700 (PDT) From: Christos Gkekas To: Kalle Valo , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ath10k: spectral: Remove redundant check Date: Sat, 14 Oct 2017 10:41:15 +0100 Message-Id: <1507974075-6987-1-git-send-email-chris.gekas@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171014_024141_178778_E0A23BBC X-CRM114-Status: UNSURE ( 7.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christos Gkekas MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Variable val is unsigned, so checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas --- drivers/net/wireless/ath/ath10k/spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/spectral.c b/drivers/net/wireless/ath/ath10k/spectral.c index dd9cc09..2048b1e 100644 --- a/drivers/net/wireless/ath/ath10k/spectral.c +++ b/drivers/net/wireless/ath/ath10k/spectral.c @@ -406,7 +406,7 @@ static ssize_t write_file_spectral_count(struct file *file, if (kstrtoul(buf, 0, &val)) return -EINVAL; - if (val < 0 || val > 255) + if (val > 255) return -EINVAL; mutex_lock(&ar->conf_mutex);