From patchwork Fri Oct 2 05:22:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7312791 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 7A023BEEA4 for ; Fri, 2 Oct 2015 05:22:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ADDB320872 for ; Fri, 2 Oct 2015 05:22:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCB7920835 for ; Fri, 2 Oct 2015 05:22:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751288AbbJBFWz (ORCPT ); Fri, 2 Oct 2015 01:22:55 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:9738 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbbJBFWy (ORCPT ); Fri, 2 Oct 2015 01:22:54 -0400 Received: from tony-itx.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Fri, 2 Oct 2015 07:22:47 +0200 From: Tony Cho To: CC: , , , , , , , , , , , Subject: [PATCH 04/10] staging: wilc1000: Delete undefined DEBUG_MODE and it's related codes Date: Fri, 2 Oct 2015 14:22:06 +0900 Message-ID: <1443763332-7330-4-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443763332-7330-1-git-send-email-tony.cho@atmel.com> References: <1443763332-7330-1-git-send-email-tony.cho@atmel.com> MIME-Version: 1.0 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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: Glen Lee This patch removes undefined DEBUG_MODE and it's related codes. We won't use this at the moment. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 63 ----------------------------------- 1 file changed, 63 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index c2e528f..c4915d3 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -128,60 +128,6 @@ static const struct net_device_ops wilc_netdev_ops = { }; -#ifdef DEBUG_MODE - -extern volatile int timeNo; - -#define DEGUG_BUFFER_LENGTH 1000 -volatile int WatchDogdebuggerCounter; -char DebugBuffer[DEGUG_BUFFER_LENGTH + 20] = {0}; -static char *ps8current = DebugBuffer; - -void printk_later(const char *format, ...) -{ - va_list args; - - va_start(args, format); - ps8current += vsprintf(ps8current, format, args); - va_end(args); - if ((ps8current - DebugBuffer) > DEGUG_BUFFER_LENGTH) - ps8current = DebugBuffer; - -} - -void dump_logs(void) -{ - if (DebugBuffer[0]) { - DebugBuffer[DEGUG_BUFFER_LENGTH] = 0; - PRINT_INFO(GENERIC_DBG, "early printed\n"); - PRINT_D(GENERIC_DBG, ps8current + 1); - ps8current[1] = 0; - PRINT_INFO(GENERIC_DBG, "latest printed\n"); - PRINT_D(GENERIC_DBG, DebugBuffer); - DebugBuffer[0] = 0; - ps8current = DebugBuffer; - } -} - -void Reset_WatchDogdebugger(void) -{ - WatchDogdebuggerCounter = 0; -} - -static int DebuggingThreadTask(void *vp) -{ - while (1) { - while (!WatchDogdebuggerCounter) { - PRINT_D(GENERIC_DBG, "Debug Thread Running %d\n", timeNo); - WatchDogdebuggerCounter = 1; - msleep(10000); - } - dump_logs(); - WatchDogdebuggerCounter = 0; - } -} -#endif - static int dev_state_ev_handler(struct notifier_block *this, unsigned long event, void *ptr) { struct in_ifaddr *dev_iface = (struct in_ifaddr *)ptr; @@ -1072,15 +1018,6 @@ int wlan_initialize_threads(perInterface_wlan_t *nic) ret = -ENOBUFS; goto _fail_2; } -#ifdef DEBUG_MODE - PRINT_D(INIT_DBG, "Creating kthread for Debugging\n"); - g_linux_wlan->txq_thread = kthread_run(DebuggingThreadTask, (void *)g_linux_wlan, "DebugThread"); - if (g_linux_wlan->txq_thread == 0) { - PRINT_ER("couldn't create TXQ thread\n"); - ret = -ENOBUFS; - goto _fail_2; - } -#endif /* wait for TXQ task to start. */ down(&g_linux_wlan->txq_thread_started);