From patchwork Tue Mar 10 08:46:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 5975651 Return-Path: X-Original-To: patchwork-dmaengine@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 0F2EC9F318 for ; Tue, 10 Mar 2015 08:47:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4761C2012E for ; Tue, 10 Mar 2015 08:47:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D5EE201D3 for ; Tue, 10 Mar 2015 08:47:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752723AbbCJIrO (ORCPT ); Tue, 10 Mar 2015 04:47:14 -0400 Received: from mga14.intel.com ([192.55.52.115]:34843 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490AbbCJIrL (ORCPT ); Tue, 10 Mar 2015 04:47:11 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 10 Mar 2015 01:41:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,373,1422950400"; d="scan'208";a="465059595" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.156]) by FMSMGA003.fm.intel.com with ESMTP; 10 Mar 2015 01:40:16 -0700 From: Jarkko Nikula To: dmaengine@vger.kernel.org Cc: Vinod Koul , Viresh Kumar , Andy Shevchenko , Jarkko Nikula Subject: [PATCH] dmaengine: dw: Make error prints unique Date: Tue, 10 Mar 2015 10:46:50 +0200 Message-Id: <1425977210-19745-1-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.1.4 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 The same error message is printed from different functions and another from different switch cases. Add a function name and DMA direction to these cases in order to make it easier to grep sources from the error log. Signed-off-by: Jarkko Nikula --- drivers/dma/dw/core.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index a8ad05291b27..ed765e819b0f 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -230,7 +230,8 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first) /* ASSERT: channel is idle */ if (dma_readl(dw, CH_EN) & dwc->mask) { dev_err(chan2dev(&dwc->chan), - "BUG: Attempted to start non-idle channel\n"); + "BUG: Attempted to start non-idle channel in %s()\n", + __func__); dwc_dump_chan_regs(dwc); /* The tasklet will hopefully advance the queue... */ @@ -816,7 +817,8 @@ slave_sg_todev_fill_desc: desc = dwc_desc_get(dwc); if (!desc) { dev_err(chan2dev(chan), - "not enough descriptors available\n"); + "not enough descriptors available. Dir %d\n", + direction); goto err_desc_get; } @@ -876,7 +878,8 @@ slave_sg_fromdev_fill_desc: desc = dwc_desc_get(dwc); if (!desc) { dev_err(chan2dev(chan), - "not enough descriptors available\n"); + "not enough descriptors available. Dir %d\n", + direction); goto err_desc_get; } @@ -1261,7 +1264,8 @@ int dw_dma_cyclic_start(struct dma_chan *chan) /* Assert channel is idle */ if (dma_readl(dw, CH_EN) & dwc->mask) { dev_err(chan2dev(&dwc->chan), - "BUG: Attempted to start non-idle channel\n"); + "BUG: Attempted to start non-idle channel in %s()\n", + __func__); dwc_dump_chan_regs(dwc); spin_unlock_irqrestore(&dwc->lock, flags); return -EBUSY;