Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2570016imj; Mon, 11 Feb 2019 05:12:36 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ1Pbe5nlsc1HaMZWZ+fGP8PgAYAeK+Sc9ggUwxHeQHK5USZaVJhqCmJsDR5/vDE7hc+6g6 X-Received: by 2002:a17:902:7782:: with SMTP id o2mr12543409pll.315.1549890756765; Mon, 11 Feb 2019 05:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549890756; cv=none; d=google.com; s=arc-20160816; b=zOVebb0RHbydZWQZsB9vP4o+9b8pf3OWq0kD7sPb8tbKsODsAYe31tQxfYrFo9vJry PcHKvabIcjid+LcC3LxnPn31eQVwgsk6WXmrGn6YvXpRmYlgepU6Bv//ayy+dzpUjnzy alSEh4t3VCmJtTtr7yzRuyZJdBzVLmGTJ6nOq2EXyN0YBr1F8ClFwz786ZsPzJqXSp2z I8ao6maPI7GM6V7VqkijNZ8e7v3HKGgaCmIoiQ6uIkMoQa1xbPjEuJXI8C5qUhlTnx0u YdLzq9KOjrTfqe5dbagclSbKPlRwpPopT71gNzChH9qsmmOAoIaLKiCRX3VsKppbDx1S JN7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=w50+3ASKiEiTs8l6R7PImkIxaHDwdrCXPI3EEoULF/Q=; b=bc6er2sK+MkT8R5kS9ZzpG8ax3UhgUn9v1zgNn5XwmqOT9dnswwiGcIfjiaxYEseav QEYUXp/U5uHTqUuMTDGHZ6K0skEnY+KwRtibwzFkgMcTUB25w3uAW7rwnxBz+KD0umMT BHnlbbvrBopLzGLQ3hgadukMl+29FL5rXsFYw8dx+QbaDXTHVUdEsb5pbWysVjD7XclP kTGJqwENNtHgTz2sZU3RFmZ/afXP63AK/fimvgzyYSjcBQWLi1LGuO2TFB4x2GI/hohw vshfclX+jF0Ybdfs4ZWQxavcAAlkv9yAak5HNAydQWDmG/bNRI4kpyK9Vf7N7Bngz4Z0 wXig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ylLZUh+E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si9930360plo.319.2019.02.11.05.12.21; Mon, 11 Feb 2019 05:12:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ylLZUh+E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727794AbfBKNKl (ORCPT + 99 others); Mon, 11 Feb 2019 08:10:41 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:46967 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727182AbfBKNKl (ORCPT ); Mon, 11 Feb 2019 08:10:41 -0500 Received: by mail-ot1-f68.google.com with SMTP id w25so17198648otm.13 for ; Mon, 11 Feb 2019 05:10:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=w50+3ASKiEiTs8l6R7PImkIxaHDwdrCXPI3EEoULF/Q=; b=ylLZUh+EAxAKOvZ0r2I6S/s8TRR94avJkN9ghhtt3Crrkt9ZWha5yk8jAT8+XAFXN8 h02rjoHEgAixJPczMnVDg18BYrGuO2GMxN2WPXGKWpMm3XdeG9Ls+MDwt4Ysprkn3lN4 xzOkXbXZdJOfy6foDnuhGkd6SvTqJsnxgkLVe5usUgwzPclJVuovVbxEiOl63yZBq9eM vUWo/QgYeBlTfnpiAFK6Vn6524Vgi+eHJI2xiLuvZH+UF1H1vpcNFmutTjcbAjj0HiH/ DWTf9P3av4B3k8f6NwMKFVsw9qPrJP4RdAqhyDLVxawu4R3RuwKaQqtMNG6HpVtJvPKq 89wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=w50+3ASKiEiTs8l6R7PImkIxaHDwdrCXPI3EEoULF/Q=; b=dN29IpSNJP6J+vr1l1hvtN9oJAd0O/T1k+96RPpijp8rySVwbQDaUU21gsHi/FRJeu dDGdTXZTtQ9RDgUX7/NjEUmeLUFtpnmOV35P/CZTtWRB4QIN+QceE4xedZyOt6FcGv6M WT//L/YV8PsF2ME+qESGxUQPy8oXZhqa74ddZqx1PuMW2JTxOtiDyGrz/979NmQOtH3E 7w4KIQVbOXVZQ39pB69ehHJEmYnUpdBr4bIFbej8NJvwOi9dYOmdrO6kQrwiHkh9WcR1 m5k7hYxlIYrp3Gs07RWjVpPUgDqvBFt+q+voFjhlSLZApl5Zeg2UIKHh1jaff194K91h pMLA== X-Gm-Message-State: AHQUAubS1znlr+pEVQrb5SJjJMOizXJoFqaN1h5AShlgTQiFrqbumauH h9jA0BzR84I/eIoajuM6iNxSBsQgIogCBveBIQ9fTH73 X-Received: by 2002:a9d:4595:: with SMTP id x21mr18606097ote.234.1549890640607; Mon, 11 Feb 2019 05:10:40 -0800 (PST) MIME-Version: 1.0 References: <20190211122606.8662-1-brgl@bgdev.pl> <20190211122606.8662-29-brgl@bgdev.pl> <7b494951-7b37-3ee5-5ece-f486b7a566fe@arm.com> In-Reply-To: <7b494951-7b37-3ee5-5ece-f486b7a566fe@arm.com> From: Bartosz Golaszewski Date: Mon, 11 Feb 2019 14:10:29 +0100 Message-ID: Subject: Re: [RESEND PATCH v2 28/33] ARM: davinci: cp-intc: unify error handling To: Marc Zyngier Cc: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , David Lechner , arm-soc , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pon., 11 lut 2019 o 14:08 Marc Zyngier napisa=C5=82(= a): > > On 11/02/2019 12:26, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > Use WARN_ON() on eny error in cp-intc initialization and drop all > > custom error messages. > > > > Signed-off-by: Bartosz Golaszewski > > Reviewed-by: David Lechner > > --- > > arch/arm/mach-davinci/cp_intc.c | 10 +++------- > > 1 file changed, 3 insertions(+), 7 deletions(-) > > > > diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp= _intc.c > > index f3787ae4cdbd..c1efb9390655 100644 > > --- a/arch/arm/mach-davinci/cp_intc.c > > +++ b/arch/arm/mach-davinci/cp_intc.c > > @@ -200,20 +200,16 @@ davinci_cp_intc_do_init(const struct davinci_cp_i= ntc_config *config, > > DAVINCI_CP_INTC_CHAN_MAP(offset)); > > > > irq_base =3D irq_alloc_descs(-1, 0, config->num_irqs, 0); > > - if (irq_base < 0) { > > - pr_warn("Couldn't allocate IRQ numbers\n"); > > - irq_base =3D 0; > > - } > > + if (WARN_ON(irq_base < 0)) > > + return irq_base; > > > > /* create a legacy host */ > > davinci_cp_intc_irq_domain =3D irq_domain_add_legacy( > > node, config->num_irqs, irq_base,= 0, > > &davinci_cp_intc_irq_domain_ops, = NULL); > > > > - if (!davinci_cp_intc_irq_domain) { > > - pr_err("cp_intc: failed to allocate irq host!\n"); > > + if (WARN_ON(!davinci_cp_intc_irq_domain)) > > return -EINVAL; > > - } > > > > set_handle_irq(davinci_cp_intc_handle_irq); > > > > > > I'm sorry, but how is turning an explicit message into a long stack > trace really useful? > If any of these calls fails, the system is fried. I assumed that a stack trace will point users straight to the offending line. Bart