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: 8187211 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 50931BEEE5 for ; Tue, 2 Feb 2016 07:15:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E3692022D for ; Tue, 2 Feb 2016 07:15:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE61A20221 for ; Tue, 2 Feb 2016 07:15:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753031AbcBBHOt (ORCPT ); Tue, 2 Feb 2016 02:14:49 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34744 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750913AbcBBHOs (ORCPT ); Tue, 2 Feb 2016 02:14:48 -0500 Received: by mail-pa0-f51.google.com with SMTP id uo6so98170134pac.1; Mon, 01 Feb 2016 23:14:47 -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=UrkDCAUpy+Hne/6hoq/HIYsNFHUwfzVGfRju6oyFw4WGTsTZ1/E7mp3bI4wUWB1D/5 Z8gJNAzHDH3Pnhp8vSO9cCQ/zZ+VerbWWHN6mmfJiPD/iDg3hV50afU3QLToFMJVpgbz F3UgYEprW7Ml05M2t/0QFTXkeMpC01etx4iosXETYdKLhlJFLB38FmKqzi8BaxvY8y0h f8xY5NX/C/P9mqhtOgv1vQKDtpFOgmttzcjVA2wMc81zJ5EXEcpJnS+VueldXP+HEv5g tnVaIRXQi2cd+zRfeMm8Jswevb20zlx/gYCGxEtO0igCTwmmOY4wkHfLtD7b3RI5SEEu O5EQ== X-Gm-Message-State: AG10YOTcN9vCzLHe2qE4/V8ZrAGfZ5ydENl+QuxLTwgIXmTRdrLBz0W+N/CMvOMCpO1RRg== 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 Cc: linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 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: 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));