From patchwork Wed Apr 29 23:51:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 6299271 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 D885E9F373 for ; Wed, 29 Apr 2015 23:52:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08BBC2017D for ; Wed, 29 Apr 2015 23:52:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 338EF20160 for ; Wed, 29 Apr 2015 23:52:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbbD2XwT (ORCPT ); Wed, 29 Apr 2015 19:52:19 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:34272 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbbD2XwS (ORCPT ); Wed, 29 Apr 2015 19:52:18 -0400 Received: by iedfl3 with SMTP id fl3so62076629ied.1 for ; Wed, 29 Apr 2015 16:52:18 -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=XIVuge5DHvbyD12ZsUK3Cgiacxu0gLe2VfzntWUCbTc=; b=tU/Y+4u4QM+OM3Io2yK/ATOUnAG3GPLj3+WJIr3MwLYPl8c3lLMmyzEOH1Ly5zITX4 MJkiKWnZ7GrvYeQzIN7pA1oqI0IdKtdlV31IGqyPr0deYUGcNlt/8hzdjoTlsbzpAIlr YaE+7D5A3eQ+xmKaawfptmQi1P7Er6jBjKlK0PTANUvXn69pGspmtK3DtgD5eI9x86JU G9LTGbATKPZo4S95tSNU5U4s2ABbXB384bZRypJKIwV51B5srQAEXICpJzjhXp5JNy5d DGXEWFZU48K9T8l1F9cTvd13+F/nBvu9DZ4kKUccpZj3PJbDUsxbWF/tR7v0CK4c6l87 el/w== X-Received: by 10.50.66.172 with SMTP id g12mr179183igt.34.1430351538106; Wed, 29 Apr 2015 16:52:18 -0700 (PDT) Received: from cobra (rochester-wireless-nat.mayo.edu. [129.176.197.220]) by mx.google.com with ESMTPSA id v4sm398208ioi.40.2015.04.29.16.52.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 16:52:17 -0700 (PDT) Received: by cobra (sSMTP sendmail emulation); Wed, 29 Apr 2015 23:52:16 +0000 From: "Nick Kossifidis" To: kvalo@codeaurora.org, ath9k-devel@qca.qualcomm.com Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org, adrian.chadd@gmail.com, Nick Kossifidis Subject: [PATCH 9/11] ath9k: No need for that extra memset Date: Wed, 29 Apr 2015 23:51:20 +0000 Message-Id: <1430351482-59418-10-git-send-email-mickflemm@gmail.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1430351482-59418-1-git-send-email-mickflemm@gmail.com> References: <1430351482-59418-1-git-send-email-mickflemm@gmail.com> 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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Temp buffer is only used for fixing malformed frames, there is no need to memset it every time. Signed-off-by: Nick Kossifidis --- drivers/net/wireless/ath/ath9k/common-spectral.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c index 4ab08ed..5840b37 100644 --- a/drivers/net/wireless/ath/ath9k/common-spectral.c +++ b/drivers/net/wireless/ath/ath9k/common-spectral.c @@ -645,6 +645,8 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h fft_handler(rs, spec_priv, sample_buf, tsf, freq, chan_type); + + memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN); } /* Process a normal frame */ @@ -658,7 +660,6 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h if (len <= fft_len + 2) break; - memset(sample_buf, 0, SPECTRAL_SAMPLE_MAX_LEN); sample_start = &vdata[i + 1]; /* -1 to grab sample_len -1, -2 since