Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp496357pxk; Thu, 3 Sep 2020 05:33:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7Qac7n2EG9sqjO+t/NPGfcdzsx3TVv69tmXFR8Bu4/Sg487CyStwUppiXyKq7e3wf11d1 X-Received: by 2002:a50:ee15:: with SMTP id g21mr2834085eds.47.1599136390215; Thu, 03 Sep 2020 05:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599136390; cv=none; d=google.com; s=arc-20160816; b=HaKC7bUHPBSa6aBVtxuyB7oMGLS8wipvFD+jKXR86YR24VLbqaL12CFw0ngME4bKfa 46FHZR1H5CFKz2uR8eauOmELRM+jpnNKJ4yBi6aQt6ReANbeO33hE/5DMuWfDC2XOJYL 5EJ8dCN5ARvbO7SPFYlIEW1H2ptQPmopdFDlUBeFeC9b14gndt5xciuO8nHtwhdkFP6A mPZzrrVz+7fCt6O/6akyiR+X2s3RAFFH3J0vdtHKVe4y/xulBZizF+ODiPff6mZPRHjd 5UklS9ln8/eoHtq7RffapOlPJQEo+5I0jtJZjboI4V8LnHIhb6k0OFukUfGmDEsK+1eh b/vA== 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=C49cVGMfysASvBZN8YfOnPiHqifti4v0fpFLtpuvDFo=; b=VvFRPaHfqcLOHxJOdXzuRjR9ZosCOUDpW4/UwhFR0EVTSZVeqaFNLIRgOGSRerPW9r dGF5tx0Lqcnhu1+Slz/fM3o7kowo1z2uA39sJlR9imuHXGqY2dHn9GJVB0yKDtFJws+V e39E7nimPTuYGUtdNZBZH8l2coUbyiTqQnbdMJNlyLr9m6+8Y2zl2PNOjGNf6Fye2uA0 n2rxbPhQ7v+4nVADxrm8lUKEMRFSCenFD/yNVZuUdRoUdSx/ZbIvbnBNySR8sXWdkEPY tGjSUi4SnC1zAPA6xe1u+quzJnNUfNBVtgVjruQk04+BhN5B0gleeqU4qT25p6LYg8+B yWbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=keDETmcG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h22si1685475ejf.574.2020.09.03.05.32.46; Thu, 03 Sep 2020 05:33:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=keDETmcG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728852AbgICM2j (ORCPT + 99 others); Thu, 3 Sep 2020 08:28:39 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:60812 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728771AbgICM0k (ORCPT ); Thu, 3 Sep 2020 08:26:40 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 083CQTM5033898; Thu, 3 Sep 2020 07:26:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1599135989; bh=C49cVGMfysASvBZN8YfOnPiHqifti4v0fpFLtpuvDFo=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=keDETmcGnT3787siHhYTvjmFIuGTIwrvkyy99J2Nzz5opdLU/qfvdMgdttMdj1C+B J9iL3nvcFRw084oHqm/2EXmCra4YBrRsF/65ylCQZxrtFOd1XPyTRajpWxZwtRbQx4 Fa8Y7QldEhSsm7TcFZ8OdXXh3xR8jQeleVJ/RB4o= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 083CQTZf106490 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 3 Sep 2020 07:26:29 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 3 Sep 2020 07:26:28 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 3 Sep 2020 07:26:28 -0500 Received: from [10.24.69.20] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 083CQOpb038856; Thu, 3 Sep 2020 07:26:26 -0500 Subject: Re: drivers/irqchip/irq-ti-sci-intr.c:148 ti_sci_intr_alloc_parent_irq() warn: impossible condition '(p_hwirq < 0) => (0-u16max < 0)' To: Dan Carpenter , CC: , Dan Carpenter , , , Marc Zyngier References: <20200903122159.GE8299@kadam> From: Lokesh Vutla Message-ID: Date: Thu, 3 Sep 2020 17:56:24 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200903122159.GE8299@kadam> Content-Type: text/plain; charset="windows-1252" 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 Hi Dan, On 03/09/20 5:51 pm, Dan Carpenter wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: fc3abb53250a90ba2150eebd182137c136f4d25a > commit: a5b659bd4bc7518a8e45fda5256c5e5e8d3b7c49 irqchip/ti-sci-intr: Add support for INTR being a parent to INTR > config: arm64-randconfig-m031-20200902 (attached as .config) > compiler: aarch64-linux-gcc (GCC) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > Reported-by: Dan Carpenter > > smatch warnings: > drivers/irqchip/irq-ti-sci-intr.c:148 ti_sci_intr_alloc_parent_irq() warn: impossible condition '(p_hwirq < 0) => (0-u16max < 0)' > > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5b659bd4bc7518a8e45fda5256c5e5e8d3b7c49 > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git fetch --no-tags linus master > git checkout a5b659bd4bc7518a8e45fda5256c5e5e8d3b7c49 > vim +148 drivers/irqchip/irq-ti-sci-intr.c > > a5b659bd4bc751 Lokesh Vutla 2020-08-06 134 static int ti_sci_intr_alloc_parent_irq(struct irq_domain *domain, > cd844b0715ceda Lokesh Vutla 2019-04-30 135 unsigned int virq, u32 hwirq) > cd844b0715ceda Lokesh Vutla 2019-04-30 136 { > cd844b0715ceda Lokesh Vutla 2019-04-30 137 struct ti_sci_intr_irq_domain *intr = domain->host_data; > a5b659bd4bc751 Lokesh Vutla 2020-08-06 138 struct device_node *parent_node; > cd844b0715ceda Lokesh Vutla 2019-04-30 139 struct irq_fwspec fwspec; > a5b659bd4bc751 Lokesh Vutla 2020-08-06 140 u16 out_irq, p_hwirq; > ^^^ ^^^^^^^ > > a5b659bd4bc751 Lokesh Vutla 2020-08-06 141 int err = 0; > cd844b0715ceda Lokesh Vutla 2019-04-30 142 > a5b659bd4bc751 Lokesh Vutla 2020-08-06 143 out_irq = ti_sci_get_free_resource(intr->out_irqs); > a5b659bd4bc751 Lokesh Vutla 2020-08-06 144 if (out_irq == TI_SCI_RESOURCE_NULL) > cd844b0715ceda Lokesh Vutla 2019-04-30 145 return -EINVAL; > cd844b0715ceda Lokesh Vutla 2019-04-30 146 > a5b659bd4bc751 Lokesh Vutla 2020-08-06 147 p_hwirq = ti_sci_intr_xlate_irq(intr, out_irq); > a5b659bd4bc751 Lokesh Vutla 2020-08-06 @148 if (p_hwirq < 0) > ^^^^^^^^^^^ > Impossible This is already fixed by https://patchwork.kernel.org/patch/11737169/ Thanks and regards, Lokesh