mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, <kbuild@lists.01.org>
Cc: <lkp@intel.com>, Dan Carpenter <error27@gmail.com>,
	<kbuild-all@lists.01.org>, <linux-kernel@vger.kernel.org>,
	Marc Zyngier <maz@kernel.org>
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)'
Date: Thu, 3 Sep 2020 17:56:24 +0530	[thread overview]
Message-ID: <ed83e54c-1216-5c02-6f1f-a3c94e67bb68@ti.com> (raw)
In-Reply-To: <20200903122159.GE8299@kadam>

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 <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> 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


      reply	other threads:[~2020-09-03 15:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 12:21 Dan Carpenter
2020-09-03 12:26 ` Lokesh Vutla [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed83e54c-1216-5c02-6f1f-a3c94e67bb68@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=dan.carpenter@oracle.com \
    --cc=error27@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=maz@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®