From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH 1/2] OMAP2+: IOMMU: change OMAP2+ error message to dev_dbg() Date: Tue, 15 Feb 2011 16:56:04 +0300 Message-ID: <4D5A85F4.5060103@ru.mvista.com> References: <1297776033-8579-1-git-send-email-dacohen@gmail.com> <1297776033-8579-2-git-send-email-dacohen@gmail.com> <4D5A81D8.2080800@ru.mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-bw0-f46.google.com ([209.85.214.46]:50940 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654Ab1BON5W (ORCPT ); Tue, 15 Feb 2011 08:57:22 -0500 Received: by bwz15 with SMTP id 15so455505bwz.19 for ; Tue, 15 Feb 2011 05:57:21 -0800 (PST) In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: David Cohen Cc: Sergei Shtylyov , Hiroshi.DOYU@nokia.com, tony@atomide.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org On 15-02-2011 16:44, David Cohen wrote: >>> IOMMU upper layer is already printing error message. OMAP2+ specific >>> layer may print error message only for debug purpose. >>> Signed-off-by: David Cohen >>> --- >>> arch/arm/mach-omap2/iommu2.c | 6 +++--- >>> 1 files changed, 3 insertions(+), 3 deletions(-) >>> diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c >>> index 14ee686..4244a07 100644 >>> --- a/arch/arm/mach-omap2/iommu2.c >>> +++ b/arch/arm/mach-omap2/iommu2.c >>> @@ -163,13 +163,13 @@ static u32 omap2_iommu_fault_isr(struct iommu *obj, >>> u32 *ra) >>> da = iommu_read_reg(obj, MMU_FAULT_AD); >>> *ra = da; >>> >>> - dev_err(obj->dev, "%s:\tda:%08x ", __func__, da); >>> + dev_dbg(obj->dev, "%s:\tda:%08x ", __func__, da); >> Note that dev_dbg() will only print something if either DEBUG or >> CONFIG_DYNAMIC_DEBUG are defined... > That's my plan. >>> for (i = 0; i < ARRAY_SIZE(err_msg); i++) { >>> if (stat& (1<< i)) >>> - printk("%s ", err_msg[i]); >>> + printk(KERN_DEBUG "%s ", err_msg[i]); >> ... unlike printk(KERN_DEBUG...). You probably want to use pr_debug() >> instead. >>> } >>> - printk("\n"); >>> + printk(KERN_DEBUG "\n"); >> Here too... Although wait, it should be KERN_CONT instead! Debug levels >> are only attributed to the whole lines. > But your observation is correct. I'll resend it with KERN_CONT instead. This won't play out correctly anyway. If DEBUG is not #define'd, the beginning of line won't be printed but the continuations will. You just can't do it correctly with dev_dbg(), unless you break the single line into several ones. > Regards, > David WBR, Sergei