From patchwork Tue May 9 07:26:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9717129 X-Patchwork-Delegate: kvalo@adurom.com 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 3C1BB60365 for ; Tue, 9 May 2017 07:27:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F9421FF8E for ; Tue, 9 May 2017 07:27:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 245DB20072; Tue, 9 May 2017 07:27:21 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC8091FF8E for ; Tue, 9 May 2017 07:27:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752597AbdEIH1F (ORCPT ); Tue, 9 May 2017 03:27:05 -0400 Received: from mout.web.de ([212.227.17.11]:52911 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbdEIH07 (ORCPT ); Tue, 9 May 2017 03:26:59 -0400 Received: from [192.168.1.3] ([77.182.123.147]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MGRVU-1dCNFS2rh2-00DKm9; Tue, 09 May 2017 09:26:50 +0200 Subject: [PATCH 1/3] ath9k: Reduce function calls for sequence output in read_file_dma() From: SF Markus Elfring To: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: LKML , kernel-janitors@vger.kernel.org References: <03575993-754d-924c-9736-2a8d19e98fa5@users.sourceforge.net> Message-ID: <2bae9fbe-a5a7-f2bb-0769-0d035738650c@users.sourceforge.net> Date: Tue, 9 May 2017 09:26:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <03575993-754d-924c-9736-2a8d19e98fa5@users.sourceforge.net> Content-Language: en-US X-Provags-ID: V03:K0:9v7Lseb1SQl2VtXOF5M7dIGwXp2Q1C3wjJOuZqLYKXFDO9D9l1m QQ5NPEYR6wjkY6H21h6JoHyCJfIvVkt/Q74FnwhBsIEC1/xutQeVhzElUL4Im0W3D6cjYf1 x9L7ppj97gx/EHoHkc0rCNWcM2RhF6CX36qIlOhDBueWShG0MveZIlmy+VEmCZuNJt76wYC nPeinXNoYJxh3lGVHaoyg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Qq0fPHpFnZc=:8v98nNUhmHDAtmfTH7rR7J LzCaPuedx8U7pXaUMqjl41jERF5bvYvcZi+VjMn1gJVl5aQBNEXYHnFm+gsKO96YwB+rcH84n 6OdIXiAdkzChZh/BYSmKj7WltA+NbboQ9A3Cdrs1EHqw3po30KNUC1/XJCjXxaonvUDwAGEMi stIu5/YhHuL/LcNJPqTqzGIxAvavJsiTZjaxCBmK2Af32AN9sTZXekbPOTBl6kv8cvEXI2LR2 RwLdKzxniJmNnM2/8lx1PnKGjU1GxW9F1Lvc1kOlOi3vb29MfZCwZxwlyQAI8UwsOkjnhnYZ8 yIr5qHA8iSHK2GYQYhd2j2ud2lkjyQQjkENyG9f6PG1WBX1FcHhGX5A3Hp+XxFvlOfrCKnaBZ a5A9dTMEdfe2eo6M+1CajFj+ExVm7zM8IxZlSZMjuCU7tKjsfXFG9iBZz5VKbV0h0H1RhfjCW Pdpl0HAQAZLcqYfIYmAfKk+s7uDuNFjDj0yzLnRjcnwD5eYEbA9TDWoa2w+pKbd6sezpdNrft GDAKH+OE3n1nIaGzPnZGq+KZ0o47l/UDoOqprHqbkJvKYpbBLl1yKYkXWu6Lxl/OFPWKUWFkQ QizfcISR63jmCHKnWtWa5fLmf34BqnrHYhHwbaGMFR1WlylnTmlH/AxKtgevD/HfDsP2I3CHp vunjuRfGm5dyrltXmKc0RrKuV00kQxk4/bvhSKZEmvlNJHHmzgTT+mVjqjLPsidizNrMiVnOp 2tkLKzULs7B68rqSHNw9vQwQdUjVc+egfoWvSK+UKceFwAHbWNwMPXPnCgm5rQF+z/olOTDWZ Dl7YMiE Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Mon, 8 May 2017 21:55:09 +0200 Some data were put into a sequence by separate function calls. Print the same data with two function calls less. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/ath/ath9k/debug.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index 2e64977a8ab6..981b38a1e352 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c @@ -427,9 +427,7 @@ static int read_file_dma(struct seq_file *file, void *data) seq_printf(file, "%d: %08x ", i, val[i]); } - seq_puts(file, "\n\n"); - seq_puts(file, "Num QCU: chain_st fsp_ok fsp_st DCU: chain_st\n"); - + seq_puts(file, "\n\nNum QCU: chain_st fsp_ok fsp_st DCU: chain_st\n"); for (i = 0; i < ATH9K_NUM_QUEUES; i++, qcuOffset += 4, dcuOffset += 5) { if (i == 8) { qcuOffset = 0; @@ -448,9 +446,8 @@ static int read_file_dma(struct seq_file *file, void *data) (*dcuBase & (0x1f << dcuOffset)) >> dcuOffset); } - seq_puts(file, "\n"); - - seq_printf(file, "qcu_stitch state: %2x qcu_fetch state: %2x\n", + seq_printf(file, + "\nqcu_stitch state: %2x qcu_fetch state: %2x\n", (val[3] & 0x003c0000) >> 18, (val[3] & 0x03c00000) >> 22); seq_printf(file, "qcu_complete state: %2x dcu_complete state: %2x\n", (val[3] & 0x1c000000) >> 26, (val[6] & 0x3));