From patchwork Tue Feb 12 10:38:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10807633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDE8813A4 for ; Tue, 12 Feb 2019 10:45:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9B272B410 for ; Tue, 12 Feb 2019 10:45:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C7CA2B3F4; Tue, 12 Feb 2019 10:45:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D3762B3F4 for ; Tue, 12 Feb 2019 10:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t3PvnBbeMBfAaBbhKYD8dXrDggvKjgK6PCxcEzWo/uM=; b=BQDrsTjVKMMgl0 MwZ3EuTh+qtYouMZ3H+4Tc26Ck0iB7/cWVH7Xmia8qzjsweJHBYxrTHrr+lvEU59bQ9hfYzDCF1Tn +v3PgqdkcfSeXYkRzga2m6XG/nCJG/JEeCMFmgyPvD54o6tDW7R64E+UGyON+xU3cdBka7kNucFLC X+7gc11uOkPfrlxW4UgA1q7bWXxOfPv+gvkUR2IvQYAnxbPupgb6JzhJl6y2dLY9VASQN2IV69kJY hGnKSoAot/AYOInI52fj/xcd6/FZaYS+ILlBwaFSWIUfNmn90mzG/w0UZpH6TO1T3zgQcyghmhhiK diFSOwz+UgYOtAaiEHUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtVYn-0004H9-E6; Tue, 12 Feb 2019 10:45:05 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtVTS-0006Rn-QP for linux-arm-kernel@lists.infradead.org; Tue, 12 Feb 2019 10:40:07 +0000 Received: by mail-wm1-x342.google.com with SMTP id a62so2357007wmh.4 for ; Tue, 12 Feb 2019 02:39:34 -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=9Az3ypPlBn0rnU2jjDB+ljZF9C7NpKC51dYPhKPb90M=; b=ut2KDGaFqx2JElLvv0qXtMjhy7PxTPnUpAp19rewP5PShINHfjufkeLLE4uWSpGrS/ 1i4fUTBWWH6rfUk66wLHWqQy6+7ymTQ9ItdG9mf5MrCrwSFWgI3DWbvWPERmfWP//9Yk nL8B0g10IXSO0007xLVYp+FGKJfr5n5TyaTBJeDnUru08JMNNItMJ11NciuexLtQzuK8 bdnKTw+NOx2h1hyQ5ELBgy0oUGFirYn2+o8p1ZvPLqIwssCk1V3AFKY059MVomtZOUcm NlFS7pECMQyta2na5o1QfStWAMUutuwJxQJS/11VdNiJL9X31JeiKXlJQli1vu78aDVh Sy2w== 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=9Az3ypPlBn0rnU2jjDB+ljZF9C7NpKC51dYPhKPb90M=; b=LeFuDqpjGxlQsCfm934kv7Qt+S0JV8FulwXp/H8qhOx4IfOFhiTqVKDN4twPev0qva sY2v/SQ/R3i+VqQWM/4sVdDF0nxJTHomH4jQCvuEZhOBdrh5rBGYsytDT0a5g/zR3POG 6i2PvS4swvzkUSfFnLKmLY4V8cmYEoFBhiMPmT+4LMTbWWC14jag6eFZowxgwIztUejm gIudqdrdSe3tCJyIY3QRfXUHVMJ28OgenaWpkNN8k5DXjFINkvn/59gARoa6txbxFp10 fGKFlnTIQPqjA2LkqZrEt62omg6eKTTijtkLTvyiCEijKCKtRqgwDUVdjluABH0Ukp82 UJBw== X-Gm-Message-State: AHQUAuZjT+PnpXC6kGD7wrz7CG0/0rUNO2JRUkDxzWvDcd48bXVezldF TXI6T90Gz+nXP0LJTkHmqr61XKVioWI= X-Google-Smtp-Source: AHgI3Ib38aMEIKjPS3Tv599kkTUJeEgHHJGyXWmZ2QhFfcO1fZjrdlJ17qEnA/o9KcMOIJcUd/Vabw== X-Received: by 2002:a1c:6a16:: with SMTP id f22mr2357484wmc.25.1549967973561; Tue, 12 Feb 2019 02:39:33 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-38-32.w90-86.abo.wanadoo.fr. [90.86.93.32]) by smtp.gmail.com with ESMTPSA id c14sm3708656wrn.12.2019.02.12.02.39.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 02:39:32 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , Marc Zyngier , David Lechner Subject: [PATCH v3 32/37] ARM: davinci: cp-intc: unify error handling Date: Tue, 12 Feb 2019 11:38:30 +0100 Message-Id: <20190212103835.7768-33-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190212103835.7768-1-brgl@bgdev.pl> References: <20190212103835.7768-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190212_023935_239156_ED3DA8E4 X-CRM114-Status: GOOD ( 13.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 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; }