Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2019504ybc; Wed, 20 Nov 2019 07:42:46 -0800 (PST) X-Google-Smtp-Source: APXvYqyHqlUkY97Y34PwMIamD2GaTIw0DImyRMM6pfgqkzq/9taHjTcFuNJl3O6x/8Z2qQWDbUgT X-Received: by 2002:adf:e506:: with SMTP id j6mr4276859wrm.19.1574264566074; Wed, 20 Nov 2019 07:42:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574264566; cv=none; d=google.com; s=arc-20160816; b=jB6XPaX7MPypPk6PHYmhn3umuUJ3Z6+3XO7SAF8PL5ZdEd63D4fhFDt6m6AiwJbugP EA5tsf+W8tnaDEGoFMcJ/zlA5MlYCwhrYGRo8lY2pZkvROuau9cLtmpFUEW2zJjTsykm dvcIRh6CMyV+aeZTpMvNwa88phB1O6953j40vYT6ymI6c2BmCz1jjze3kR0BO9CyIWUg bQA410G9V7204Fzva2aBC8g2gvKBd5kc+iJHRqPuU3YbsZ9fqUhi+OHSdvWWveO7DAiq M9QadUMtFbbFQ6cIoRYp7D0DCmOjP3umFrkcgrvsQWLOTMhnWsnU1wnBQamTWrXFD8a7 4fmA== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=cUuODUkhkpYTuS/oLkndd5NWjcLUycvLfQ9Pwk5o7+o=; b=bbyApVOKYKDitBY5ocsD6TIye0bFMVdNo38Gn5avdlv+NOHDX6JhcIJyBXb2iy58Kz 22rkCD9ounVAm0H68wCBzt3kFjBfnaLc/d+vSHsMnZ6s+ffJUaJC+uTXaQDhF+LIlSOM QbERyn3O3HYRBlgsT5v4j4PMWAjpU/BblIkx2r1Y+V+gLeE/qaFcQRu+shuQZqp4q0Ge QLN7+DbJHCJULdoiqYZyU1ttlbUHcrLXkXAbPUmnjh6EG2B/2nkFZi/FsZKJjwSt753q t0a2Y2qD7BeR4/VdrRS5iVqaX75pzoRaL5wj0Y/nSCMKzuN8wTxAVp7MF9R4dQWCuTQW 4Q0w== ARC-Authentication-Results: i=1; mx.google.com; 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 g7si17996244edg.66.2019.11.20.07.42.22; Wed, 20 Nov 2019 07:42:46 -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; 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 S1730498AbfKTNXM (ORCPT + 99 others); Wed, 20 Nov 2019 08:23:12 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:56690 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730148AbfKTNVK (ORCPT ); Wed, 20 Nov 2019 08:21:10 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iXPuo-00075q-9x; Wed, 20 Nov 2019 14:21:02 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id E6D2E1C19FE; Wed, 20 Nov 2019 14:21:01 +0100 (CET) Date: Wed, 20 Nov 2019 13:21:01 -0000 From: "tip-bot2 for Markus Elfring" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/ti-sci-inta: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Cc: Markus Elfring , Marc Zyngier , Lokesh Vutla , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <776b7135-26af-df7d-c3a9-4339f7bf1f15@web.de> References: <776b7135-26af-df7d-c3a9-4339f7bf1f15@web.de> MIME-Version: 1.0 Message-ID: <157425606182.12247.5210659654791287522.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 761becb29183c4e2ad9ff5f63933170c8fffd544 Gitweb: https://git.kernel.org/tip/761becb29183c4e2ad9ff5f63933170c8fffd544 Author: Markus Elfring AuthorDate: Tue, 05 Nov 2019 12:19:39 +01:00 Committer: Marc Zyngier CommitterDate: Mon, 11 Nov 2019 10:19:06 irqchip/ti-sci-inta: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) A coccicheck run provided information like the following. drivers/irqchip/irq-ti-sci-inta.c:250:9-16: WARNING: ERR_CAST can be used with vint_desc. Generated by: scripts/coccinelle/api/err_cast.cocci Thus adjust the exception handling in one if branch. Signed-off-by: Markus Elfring Signed-off-by: Marc Zyngier Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/776b7135-26af-df7d-c3a9-4339f7bf1f15@web.de --- drivers/irqchip/irq-ti-sci-inta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-ti-sci-inta.c b/drivers/irqchip/irq-ti-sci-inta.c index ef4d625..8f6e6b0 100644 --- a/drivers/irqchip/irq-ti-sci-inta.c +++ b/drivers/irqchip/irq-ti-sci-inta.c @@ -246,8 +246,8 @@ static struct ti_sci_inta_event_desc *ti_sci_inta_alloc_irq(struct irq_domain *d /* No free bits available. Allocate a new vint */ vint_desc = ti_sci_inta_alloc_parent_irq(domain); if (IS_ERR(vint_desc)) { - mutex_unlock(&inta->vint_mutex); - return ERR_PTR(PTR_ERR(vint_desc)); + event_desc = ERR_CAST(vint_desc); + goto unlock; } free_bit = find_first_zero_bit(vint_desc->event_map, @@ -259,6 +259,7 @@ alloc_event: if (IS_ERR(event_desc)) clear_bit(free_bit, vint_desc->event_map); +unlock: mutex_unlock(&inta->vint_mutex); return event_desc; }