[PATCH 1/2] OMAP2+: IOMMU: change OMAP2+ error message to dev_dbg()
From: David Cohen <hidden>
Date: 2011-02-15 14:01:35
Also in:
linux-omap
On Tue, Feb 15, 2011 at 3:56 PM, Sergei Shtylyov [off-list ref] wrote:
On 15-02-2011 16:44, David Cohen wrote:quoted
quoted
quoted
IOMMU upper layer is already printing error message. OMAP2+ specific layer may print error message only for debug purpose.quoted
quoted
quoted
Signed-off-by: David Cohen<redacted> --- ?arch/arm/mach-omap2/iommu2.c | ? ?6 +++--- ?1 files changed, 3 insertions(+), 3 deletions(-)quoted
quoted
quoted
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);quoted
quoted
? Note that dev_dbg() will only print something if either DEBUG or CONFIG_DYNAMIC_DEBUG are defined...quoted
That's my plan.quoted
quoted
quoted
? ? ? ?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]);quoted
quoted
? ... unlike printk(KERN_DEBUG...). You probably want to use pr_debug() instead.quoted
quoted
quoted
? ? ? ?} - ? ? ? printk("\n"); + ? ? ? printk(KERN_DEBUG "\n");quoted
quoted
? Here too... Although wait, it should be KERN_CONT instead! Debug levels are only attributed to the whole lines.quoted
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.
Yes, I got this situation. I'm coming with a proper solution on next version. Br, David
quoted
Regards,quoted
DavidWBR, Sergei