Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7142855imu; Thu, 31 Jan 2019 05:45:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN4MCuQpf5BCY9pX1T7iO3S4tLwRgUhFRawfmsZANQRoF0W1dTzamruvJKQWAeZXUNFNcJ1I X-Received: by 2002:a63:4f20:: with SMTP id d32mr31401979pgb.47.1548942333121; Thu, 31 Jan 2019 05:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548942333; cv=none; d=google.com; s=arc-20160816; b=ltk7eQuhBcr+1gR8L/DHwBACrOTzx8s7g57lTqKcJ9YgpB5lW2IHMPK9eTOU8bCQUK 1IRQut0nlVCvhCIJwXI4RJVs3SR5QeJmNI8+89amj2TC2uLxanGdnVVFNO2egiZOkgru cOKwdjwkHavj/JesxQN+9caeG1XsNnPs8IbNf2MurNuVtsE9BrGJOe23LY8p8tbjSfUB cQPUu8QHxNxiQ7zB9xoUv23YVVtK/tmBOBMjX5Oq1Fu1txGxBWoBoUMkqGMQnuQJfxJ+ /XuOn1jkD5Vxtt5tOIts0QDK02H1ptqvNbujkTZVvocnrjmInhNxsxInd0Dq9JDYNpq5 2QJQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vxfm0fKbkuL8SE9c4CrhCSFAKt2dnHDzKJRVV3w+UdE=; b=ASNx9cfItJ4Xl/WfVUxEQUxSUYhfGPZ+t2SCRVWgOJVB7H1k49YauM0sE45IFqo0FB yRVG7IM91m2sgk3wckdP1EMzlB3/R+vzcja3mUXWBCK36zhMRLMEBLuCKAfPpbqKUETC iFVvCCALH9JonZuzPxfSWb1nA6aRGNalPA1nRq+gXQlahHAgdWXBopLK242De+i4X+al CE0KuIQju+63f9yRRSDV1M+ibumFOUmxu3qogsRFvQpuQ+6hwIEO+crt89M8moq+Emr7 ovo8p8udgC1W9y9pIO2Mqh2zQe1R2HdZ/yAQ6ONhfX7ioPbD/VZDN4LCKpjQFUt3v5/o Mm1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Oi5dsV1I; 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 r17si4590222pls.380.2019.01.31.05.45.17; Thu, 31 Jan 2019 05:45:33 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Oi5dsV1I; 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 S1732228AbfAaNlK (ORCPT + 99 others); Thu, 31 Jan 2019 08:41:10 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53473 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387773AbfAaNkP (ORCPT ); Thu, 31 Jan 2019 08:40:15 -0500 Received: by mail-wm1-f65.google.com with SMTP id d15so2546244wmb.3 for ; Thu, 31 Jan 2019 05:40:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vxfm0fKbkuL8SE9c4CrhCSFAKt2dnHDzKJRVV3w+UdE=; b=Oi5dsV1IH5FhJX8S3ZuGU/CN53LrP0QqDD+FHNkMaT8NdpywplaK4XK29ZsbTcf30N NPHpXD4GACwqZ0XycIeop3T1/yvW0AshHTXnLy45JKjS+cV9V7ORtLHtYMxBEJ4/ZBXQ LASQpuFU48Mqfh0dxqq9+NMoxgPOwoklOGYjd7t+BBqeqUs8gqFCjR/HU8eaCCV5TZ96 4fTNGdBCGy00uFZ9U4NJigu6JvMWdjGUqu8U26XmSdXAL7WIrtaRPc6a0serPHoGdy0E 1uIcXs8Rm0Lh1EFK/rttuZ8EuOQjU7HCcGx4w34EJhMrGBBSFdfWZAW64tn3MYRYAv7S 1+IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vxfm0fKbkuL8SE9c4CrhCSFAKt2dnHDzKJRVV3w+UdE=; b=HXjS5zGR0XXswjSHzGfOKfBqmGwmvDzD1WebU0hpF4XIZWF5sxxHqjFpN8quLe401X 7OyQt+v3TBHiu0T3NZbMxYzd2ikuY71BlNj+XglvwNDjGkbrWv1/A2D8LkxUX3+0DezW xvCT8UJgywuVSk1XEU38z3gV88mbBhZJwVyk+ONhAYW/quPGbTjgW/P8VjAMo5g8kMLn EaLVZpzW/wzzTvu3vRFFc1dqR+gxIHAdcky2D5gLNyT1RrTlUmgQZ41EBH52y2bPxpln 3PHynE4KOC+ushPPwy39Sgsiga/1KXXws/9KV8JE3H35bGbHA4Mao8cLfZvaXAhLqvN7 8v0w== X-Gm-Message-State: AHQUAuZwwR4p3PzVbFAhH7lUNto7SubI3ZCq06hSwM1g0y6T4ROgnZXX g7s8RYfLJvDOE0V2Iytro/TWeA== X-Received: by 2002:a7b:c1d7:: with SMTP id a23mr1297394wmj.48.1548942013583; Thu, 31 Jan 2019 05:40:13 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id h10sm5479768wmf.44.2019.01.31.05.40.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 05:40:12 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 27/35] ARM: davinci: cp-intc: unify error handling Date: Thu, 31 Jan 2019 14:39:20 +0100 Message-Id: <20190131133928.17985-28-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190131133928.17985-1-brgl@bgdev.pl> References: <20190131133928.17985-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Use WARN_ON() on eny error in cp-intc initialization and drop all custom error messages. Signed-off-by: Bartosz Golaszewski --- 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 4cd515b507f4..8d751318682d 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c @@ -187,20 +187,16 @@ davinci_cp_intc_do_init(const struct davinci_cp_intc_config *config, DAVINCI_CP_INTC_CHAN_MAP(offset)); 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; - } + if (WARN_ON(irq_base < 0)) + return irq_base; /* create a legacy host */ davinci_cp_intc_irq_domain = 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); -- 2.20.1