From patchwork Wed Feb 20 08:53:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 15004 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B32FE23F72 for ; Wed, 20 Feb 2013 08:53:55 +0000 (UTC) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by fiordland.canonical.com (Postfix) with ESMTP id 265F5A1855A for ; Wed, 20 Feb 2013 08:53:55 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id ox1so6695336veb.13 for ; Wed, 20 Feb 2013 00:53:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=bMQCzpkpViGX/ygQsXeXntE5pXmNEg7LESW3NhUgKKU=; b=HoyW7U767zoxDE9NdUK9jOEI63qDyazJ9XUB+XXjH2EyKUY9IWMRLS+Yw1ULjxrLX3 yCcWZ+h2TpQyYHoDMhyxmnlpIb8f7atCzGqCcluVKUy/3WC5B2ax5qmJBdTe/uBVcap0 Y6nP+e0FUj6Yvl1uGbwlsCEoINvSDifQHVJSm+Op5khkTCxGDntTMkw47qQTlWbtv9Bz U5jY/I/ik6bLu/kCc6kgeF/9HlL8yhJIyLVY4JFS+LX8Z2EO9Fx1igFkGAby4B734byt UusgLWrgIk5Z9FL6a1lsZGPmUIyiuHmBuTkuhEIyf4eQehwqXoKwaQbmRLQGsoh9pNtq aglQ== X-Received: by 10.52.29.18 with SMTP id f18mr16921951vdh.57.1361350434630; Wed, 20 Feb 2013 00:53:54 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp186324veb; Wed, 20 Feb 2013 00:53:53 -0800 (PST) X-Received: by 10.14.202.71 with SMTP id c47mr66215407eeo.39.1361350433394; Wed, 20 Feb 2013 00:53:53 -0800 (PST) Received: from mail-ee0-f42.google.com (mail-ee0-f42.google.com [74.125.83.42]) by mx.google.com with ESMTPS id g8si44410100eem.59.2013.02.20.00.53.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Feb 2013 00:53:53 -0800 (PST) Received-SPF: neutral (google.com: 74.125.83.42 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=74.125.83.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.42 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) smtp.mail=fabio.baltieri@linaro.org Received: by mail-ee0-f42.google.com with SMTP id b47so3930304eek.1 for ; Wed, 20 Feb 2013 00:53:52 -0800 (PST) X-Received: by 10.14.3.133 with SMTP id 5mr66197333eeh.43.1361350432420; Wed, 20 Feb 2013 00:53:52 -0800 (PST) Received: from localhost ([2a01:2003:1:1e91:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPS id l8sm74021066een.10.2013.02.20.00.53.48 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 20 Feb 2013 00:53:51 -0800 (PST) From: Fabio Baltieri To: Felipe Balbi Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Fabio Baltieri Subject: [PATCH] usb: musb: drop dangling CONFIG_USB_MUSB_DEBUG Date: Wed, 20 Feb 2013 09:53:39 +0100 Message-Id: <1361350419-7678-1-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.7.12.1 X-Gm-Message-State: ALoCoQm50ouhS0uDbrCiLPYHWq3BgmTvU/+BVXCPPijz0NRKMkAS7WsDHm+x3/NzLSoo9+s8U5Jr CONFIG_USB_MUSB_DEBUG option was removed in 5c8a86e usb: musb: drop unneeded musb_debug trickery to cleanup the code from driver specific debug facilities. This patch drops the last references to the musb debug config option, unconditionally enabling all debug code paths, thus letting that code being dropped at compile time if not needed. Signed-off-by: Fabio Baltieri --- Hello Felipe, this looks like a leftover from the debug code cleanup. Some code in cppi_dma was constantly compiled out, and that included some dead _dbg_level() references. All debug printks are already declared as pr_debug or dev_dbg so it should be ok to keep the code compiled in. Compiled tested only. Fabio drivers/usb/musb/cppi_dma.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c index f522000..9db211e 100644 --- a/drivers/usb/musb/cppi_dma.c +++ b/drivers/usb/musb/cppi_dma.c @@ -435,7 +435,6 @@ cppi_rndis_update(struct cppi_channel *c, int is_rx, } } -#ifdef CONFIG_USB_MUSB_DEBUG static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd) { pr_debug("RXBD/%s %08x: " @@ -444,21 +443,16 @@ static void cppi_dump_rxbd(const char *tag, struct cppi_descriptor *bd) bd->hw_next, bd->hw_bufp, bd->hw_off_len, bd->hw_options); } -#endif static void cppi_dump_rxq(int level, const char *tag, struct cppi_channel *rx) { -#ifdef CONFIG_USB_MUSB_DEBUG struct cppi_descriptor *bd; - if (!_dbg_level(level)) - return; cppi_dump_rx(level, rx, tag); if (rx->last_processed) cppi_dump_rxbd("last", rx->last_processed); for (bd = rx->head; bd; bd = bd->next) cppi_dump_rxbd("active", bd); -#endif } @@ -784,6 +778,7 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket) void __iomem *tibase = musb->ctrl_base; int is_rndis = 0; struct cppi_rx_stateram __iomem *rx_ram = rx->state_ram; + struct cppi_descriptor *d; if (onepacket) { /* almost every USB driver, host or peripheral side */ @@ -897,14 +892,8 @@ cppi_next_rx_segment(struct musb *musb, struct cppi_channel *rx, int onepacket) bd->hw_options |= CPPI_SOP_SET; tail->hw_options |= CPPI_EOP_SET; -#ifdef CONFIG_USB_MUSB_DEBUG - if (_dbg_level(5)) { - struct cppi_descriptor *d; - - for (d = rx->head; d; d = d->next) - cppi_dump_rxbd("S", d); - } -#endif + for (d = rx->head; d; d = d->next) + cppi_dump_rxbd("S", d); /* in case the preceding transfer left some state... */ tail = rx->last_processed;