From patchwork Tue Feb 2 07:14:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 8187231 Return-Path: X-Original-To: patchwork-ath10k@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 C6237BEEE5 for ; Tue, 2 Feb 2016 07:15:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0229E2024C for ; Tue, 2 Feb 2016 07:15:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3480E2022D for ; Tue, 2 Feb 2016 07:15:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQVBA-00065e-05; Tue, 02 Feb 2016 07:15:12 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQVB7-0004sF-G1 for ath10k@lists.infradead.org; Tue, 02 Feb 2016 07:15:10 +0000 Received: by mail-pa0-x233.google.com with SMTP id yy13so96250306pab.3 for ; Mon, 01 Feb 2016 23:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=IvxN9zNQWM5kincjXwRyFSuIf24QOeupgOUn8UcMltQ=; b=wDzCodIgZJo3KUeoS4JwXo9hbzXvzpA+JnNtcTGaUDuqs0zKCCJEMbSSHrmsS90i0E zfcfq2ko1PldYeTYoUYej6gcld6v1cPhMwdIP2jlz38XXVkHxDxl3HIF9vGnImVAxf1u k25FKUL3nBqQeo3vlSuNJ7EbR/eDLc/UtjiaNVJ7yfF4Dt4myYwD2aNe+7pWdpJUus4R H+v3uVHnhYtwgTxl1/Tw+PF38PSjZW00sTaLkAAJNj3GVJeQaC4hJtOo3PQqTAE4C0A3 zSNMMoVrhNa4NHaCkjj2DGplgUmjmKBD4d5rZbRjjrRPUjNyCmd8yg6RZiWraQQzeHne 63ew== 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; bh=IvxN9zNQWM5kincjXwRyFSuIf24QOeupgOUn8UcMltQ=; b=dnSVrUwSB/OFbBNdZI4akW55vz83EShZHNA8f9paN3eHLCtPoIaI2AuV9MA7rC9WzL jwJpq3PQd93kzhhRog0K7bnzh/GNXrtTp7kuG5tIelv6UZjJ4PB3UiKweDtMKeWybP66 GXFksKH+Zniixgj7M7N9cW8GvcyY9StZXWupaaZcfV2AlHvD91FOjRuFVf2kIEXk2Oyj n5t5l2c+FOEMLrEJoMIQ1D0n2BUxeZiJyMAh58ZZuQy96Brg7/P1hlc8+xJ2EH+2RerK DvhRSP/p0NgUyeLVPIvlJ4lAE7l1CnyWNJBh2CXEc3NdglodtbT1KiA1AG36Hn4afZmI +zog== X-Gm-Message-State: AG10YOQk+C+4oFU6nwQUGmWQKAyKic8AwCGMjewBRIjeOIGMQQn/Y3w8Nym8r/Z2/Z8Emw== X-Received: by 10.66.149.7 with SMTP id tw7mr45316523pab.72.1454397287662; Mon, 01 Feb 2016 23:14:47 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([183.82.228.136]) by smtp.gmail.com with ESMTPSA id y86sm23199pfa.26.2016.02.01.23.14.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 23:14:47 -0800 (PST) From: Sudip Mukherjee To: Kalle Valo Subject: [PATCH] ath10k: remove impossible code Date: Tue, 2 Feb 2016 12:44:40 +0530 Message-Id: <1454397280-4758-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160201_231509_656268_29B16237 X-CRM114-Status: UNSURE ( 7.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, 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: Sudip Mukherjee len has been initialized with a value of 0 and buf_len with 4096. There is no way that this condition (len > buf_len) can be true now. Signed-off-by: Sudip Mukherjee --- drivers/net/wireless/ath/ath10k/debug.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 2bdf540..8b187e0 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -2176,9 +2176,6 @@ static ssize_t ath10k_debug_fw_checksums_read(struct file *file, mutex_lock(&ar->conf_mutex); - if (len > buf_len) - len = buf_len; - len += scnprintf(buf + len, buf_len - len, "firmware-N.bin\t\t%08x\n", crc32_le(0, ar->firmware->data, ar->firmware->size));