Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5705824ybx; Sun, 10 Nov 2019 19:39:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxyn5qoBTBKGg0vkyhYFZTby2Z/4JntT00gdj1IJPmeETKVNPXQjpahaMPqeROJbQH/zC/P X-Received: by 2002:a17:907:1102:: with SMTP id qu2mr20417954ejb.300.1573443562333; Sun, 10 Nov 2019 19:39:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573443562; cv=none; d=google.com; s=arc-20160816; b=FVKam2shtoh/8FjO0x6BAOhuuXc1lmGYB0jUch3ckUPTI2BR3KuiaD9UuYK/1mffOn fE4ucrCIEeO0H+4DUn2DyZX9rVLdl8j1ThlmnoZqursyq5kk7K7C5nnCYDsoYR46Rqc+ FcJAS3v/Xcxx0ohN+QTyFFg7AUkV+3mo6mqdOr4Ueg5PwPrFLJE4iLbET2Y1YmFDH5Zv 5zJsDlr9v7oZzWGRD2/KKDDK/DBk1NVXuKRrBp25oYLVyNzlx0kZyKz05VTvC1y9MiSt omXNY/2/s7YBSYiZTbx0b8EwVhVCh2viuyLquibSWQCiLJy9KQsQvVhpZglfsQResxVH t4lQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=NGl+cjCsJiM7+yT+llqpQfLL+t0dbhH4tKRXyQlZxFw=; b=xK8AIwasOF5jVE5N89LE33hux+CZtIOhTzjrsIYmeq0cidOfx9R5h4itj800dBKJj6 Uo1QogbvDQwx1sjYKEs2SS+6pVHudaCJQPyr01KcIgfE5uA+Nwhd6Dkcl5M0itKDPhSc vYi6esqXaxltk1XCYEHicnp4sxpQJ2QfnCyegfTwnuTGheg1rxSkLM1aJUm3Wx76hfW7 T7Lkx5s+DOzBRwB5iU/NNJrp4BgwQyjk3e90X5J2d9FUrR7KQhPpxRC3jp7sGCp8w6Ib rsRI4Ec7HpePCpYn/sKYypQKYSHpT7uNqP2IZ/PHYrXTF+SEVRC8KtPix4SCRondibz9 eGCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=eRv4wHEj; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r9si292167ejx.416.2019.11.10.19.38.58; Sun, 10 Nov 2019 19:39:22 -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=@ti.com header.s=ti-com-17Q1 header.b=eRv4wHEj; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbfKKDg6 (ORCPT + 99 others); Sun, 10 Nov 2019 22:36:58 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:54222 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbfKKDg6 (ORCPT ); Sun, 10 Nov 2019 22:36:58 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAB3abTv129761; Sun, 10 Nov 2019 21:36:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573443397; bh=NGl+cjCsJiM7+yT+llqpQfLL+t0dbhH4tKRXyQlZxFw=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=eRv4wHEjc1UMBodvQhvEME/+xNSPrDEWxqUQk+Bx3eHbzo5anuwt9WKRN1TQ8ibgN dzR9rhp5ePYMHT1zSfPrAE0RY10ZAsCps22mcIlPlkOptnQY7Y1FYnCPz3io3PVV83 B6XEc7zL0ArYYiQU0v6CuqNPPIEKMoXCIj7rXx6U= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAB3aaYP114012 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 10 Nov 2019 21:36:36 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Sun, 10 Nov 2019 21:36:19 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Sun, 10 Nov 2019 21:36:19 -0600 Received: from [172.24.190.117] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAB3aXhA043092; Sun, 10 Nov 2019 21:36:33 -0600 Subject: Re: [PATCH] irqchip/ti-sci-inta: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) To: Markus Elfring , , Jason Cooper , Marc Zyngier , Nishanth Menon , Santosh Shilimkar , Tero Kristo , Thomas Gleixner CC: LKML , References: <776b7135-26af-df7d-c3a9-4339f7bf1f15@web.de> From: Lokesh Vutla Message-ID: <670cd9a2-2083-bb5e-7bfc-58d5c90ec756@ti.com> Date: Mon, 11 Nov 2019 09:05:39 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <776b7135-26af-df7d-c3a9-4339f7bf1f15@web.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/11/19 5:00 PM, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 5 Nov 2019 12:19:39 +0100 > > 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. > > Fixes: 9f1463b86c13277d0bd88d5ee359577ef40f4da7 ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver") Fixes: 9f1463b86c13 ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver") With this: Reviewed-by: Lokesh Vutla Thanks and regards, Lokesh > Signed-off-by: Markus Elfring > --- > 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 ef4d625d2d80..8f6e6b08eadf 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 @@ static struct ti_sci_inta_event_desc *ti_sci_inta_alloc_irq(struct irq_domain *d > if (IS_ERR(event_desc)) > clear_bit(free_bit, vint_desc->event_map); > > +unlock: > mutex_unlock(&inta->vint_mutex); > return event_desc; > } > -- > 2.23.0 >