From patchwork Tue May 31 10:56:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9144319 X-Patchwork-Delegate: geert@linux-m68k.org 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 6A31960761 for ; Tue, 31 May 2016 10:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DB2527B89 for ; Tue, 31 May 2016 10:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5269828188; Tue, 31 May 2016 10:58:03 +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=ham 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 058F827B89 for ; Tue, 31 May 2016 10:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752144AbcEaK6C (ORCPT ); Tue, 31 May 2016 06:58:02 -0400 Received: from sauhun.de ([89.238.76.85]:42012 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751708AbcEaK6B (ORCPT ); Tue, 31 May 2016 06:58:01 -0400 Received: from dslb-188-103-104-142.188.103.pools.vodafone-ip.de ([188.103.104.142]:57482 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1b7hN1-0002Lm-NJ; Tue, 31 May 2016 12:58:00 +0200 From: Wolfram Sang To: driverdev-devel@linuxdriverproject.org Cc: Wolfram Sang , linux-renesas-soc@vger.kernel.org Subject: [PATCH V2 30/31] staging: ks7010: drop counting sd errors Date: Tue, 31 May 2016 12:56:42 +0200 Message-Id: <1464692203-4180-31-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464692203-4180-1-git-send-email-wsa@the-dreams.de> References: <1464692203-4180-1-git-send-email-wsa@the-dreams.de> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wolfram Sang They were counted but never really used anywhere. Also change the printk to a debug print, since it mostly shows on the expected -ENOMEDIUM on card removal. Signed-off-by: Wolfram Sang --- drivers/staging/ks7010/ks7010_sdio.c | 20 ++++++-------------- drivers/staging/ks7010/ks_wlan.h | 2 -- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index a8a14f928d421b..c166022b652e3a 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -234,8 +234,8 @@ int ks_wlan_hw_power_save(struct ks_wlan_private *priv) static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address, unsigned char *buffer, int length) { - int rc = -1; struct ks_sdio_card *card; + int rc; card = priv->ks_wlan_hw.sdio_card; @@ -244,12 +244,8 @@ static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address, else /* CMD53 multi-block transfer */ rc = sdio_memcpy_fromio(card->func, buffer, address, length); - if (rc != 0) { - printk("sdio error erorr=%d size=%d\n", rc, length); - ++priv->sdio_error_count; - } else { - priv->sdio_error_count = 0; - } + if (rc != 0) + DPRINTK(1, "sdio error=%d size=%d\n", rc, length); return rc; } @@ -257,8 +253,8 @@ static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address, static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address, unsigned char *buffer, int length) { - int rc = -1; struct ks_sdio_card *card; + int rc; card = priv->ks_wlan_hw.sdio_card; @@ -268,12 +264,8 @@ static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address, rc = sdio_memcpy_toio(card->func, (unsigned int)address, buffer, length); - if (rc != 0) { - printk("sdio error erorr=%d size=%d\n", rc, length); - ++priv->sdio_error_count; - } else { - priv->sdio_error_count = 0; - } + if (rc != 0) + DPRINTK(1, "sdio error=%d size=%d\n", rc, length); return rc; } diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h index f0f9f8ef7d6185..a2126c2e728d2d 100644 --- a/drivers/staging/ks7010/ks_wlan.h +++ b/drivers/staging/ks7010/ks_wlan.h @@ -500,9 +500,7 @@ struct ks_wlan_private { unsigned long last_doze; unsigned long last_wakeup; - uint sdio_error_count; /* SDIO error */ uint wakeup_count; /* for detect wakeup loop */ - }; #endif /* _KS_WLAN_H */