From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74BF3C43381 for ; Thu, 14 Feb 2019 11:11:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 41D3F222D2 for ; Thu, 14 Feb 2019 11:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729786AbfBNLLl (ORCPT ); Thu, 14 Feb 2019 06:11:41 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41636 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbfBNLLl (ORCPT ); Thu, 14 Feb 2019 06:11:41 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 939D0EBD; Thu, 14 Feb 2019 03:11:40 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 626F23F675; Thu, 14 Feb 2019 03:11:33 -0800 (PST) Date: Thu, 14 Feb 2019 11:11:27 +0000 Message-ID: <86k1i2sjz4.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Bartosz Golaszewski Cc: Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , David Lechner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v3 32/37] ARM: davinci: cp-intc: unify error handling In-Reply-To: <20190212103835.7768-33-brgl@bgdev.pl> References: <20190212103835.7768-1-brgl@bgdev.pl> <20190212103835.7768-33-brgl@bgdev.pl> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Feb 2019 10:38:30 +0000, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > Use WARN_ON() on eny error in cp-intc initialization and drop all > custom error messages. This isn't what this patch is doing. Thanks, M. > > Signed-off-by: Bartosz Golaszewski > Reviewed-by: David Lechner > --- > arch/arm/mach-davinci/cp_intc.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c > index 25221dfe8a20..1bf11fa8be76 100644 > --- a/arch/arm/mach-davinci/cp_intc.c > +++ b/arch/arm/mach-davinci/cp_intc.c > @@ -177,8 +177,10 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config, > > davinci_cp_intc_base = ioremap(config->reg.start, > resource_size(&config->reg)); > - if (WARN_ON(!davinci_cp_intc_base)) > + if (!davinci_cp_intc_base) { > + pr_err("%s: unable to ioremap register range\n", __func__); > return -EINVAL; > + } > > davinci_cp_intc_write(0, DAVINCI_CP_INTC_GLOBAL_ENABLE); > > @@ -210,8 +212,9 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config, > > irq_base = irq_alloc_descs(-1, 0, config->num_irqs, 0); > if (irq_base < 0) { > - pr_warn("Couldn't allocate IRQ numbers\n"); > - irq_base = 0; > + pr_err("%s: unable to allocate interrupt descriptors: %d\n", > + __func__, irq_base); > + return irq_base; > } > > /* create a legacy host */ > @@ -220,7 +223,7 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config, > &davinci_cp_intc_irq_domain_ops, NULL); > > if (!davinci_cp_intc_irq_domain) { > - pr_err("cp_intc: failed to allocate irq host!\n"); > + pr_err("%s: unable to create an interrupt domain\n", __func__); > return -EINVAL; > } > > -- > 2.20.1 > -- Jazz is not dead, it just smell funny.