[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK9=C2UxD1uKCvg26xzevtm4MAeGix-qS9PM296uCg3NqSyTaA@mail.gmail.com>
Date: Tue, 24 Oct 2023 17:38:28 +0530
From: Anup Patel <apatel@...tanamicro.com>
To: Conor Dooley <conor@...nel.org>
Cc: Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Thomas Gleixner <tglx@...utronix.de>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Frank Rowand <frowand.list@...il.com>,
Conor Dooley <conor+dt@...nel.org>,
Marc Zyngier <maz@...nel.org>,
Björn Töpel <bjorn@...nel.org>,
Atish Patra <atishp@...shpatra.org>,
Andrew Jones <ajones@...tanamicro.com>,
Sunil V L <sunilvl@...tanamicro.com>,
Saravana Kannan <saravanak@...gle.com>,
Anup Patel <anup@...infault.org>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v11 07/14] irqchip: Add RISC-V incoming MSI controller
early driver
On Tue, Oct 24, 2023 at 2:55 PM Conor Dooley <conor@...nel.org> wrote:
>
> On Mon, Oct 23, 2023 at 10:57:53PM +0530, Anup Patel wrote:
>
> > +#ifdef CONFIG_GENERIC_IRQ_DEBUGFS
> > +void imsic_vector_debug_show(struct seq_file *m,
> > + struct imsic_vector *vec, int ind)
> > +{
> > + unsigned int mcpu = 0, mlocal_id = 0;
> > + struct imsic_local_priv *lpriv;
> > + bool move_in_progress = false;
> > + struct imsic_vector *mvec;
> > + bool is_enabled = false;
> > + unsigned long flags;
> > +
> > + lpriv = per_cpu_ptr(imsic->lpriv, vec->cpu);
> > + if (WARN_ON(&lpriv->vectors[vec->local_id] != vec))
> > + return;
> > +
> > + raw_spin_lock_irqsave(&lpriv->ids_lock, flags);
> > + if (test_bit(vec->local_id, lpriv->ids_enabled_bitmap))
> > + is_enabled = true;
> > + mvec = lpriv->ids_move[vec->local_id];
> > + if (mvec) {
> > + move_in_progress = true;
> > + mcpu = mvec->cpu;
> > + mlocal_id = mvec->local_id;
> > + }
> > + raw_spin_unlock_irqrestore(&lpriv->ids_lock, flags);
> > +
> > + seq_printf(m, "%*starget_cpu : %5u\n", ind, "", vec->cpu);
> > + seq_printf(m, "%*starget_local_id : %5u\n", ind, "", vec->local_id);
> > + seq_printf(m, "%*sis_reserved : %5u\n", ind, "",
> > + (vec->local_id <= IMSIC_IPI_ID) ? 1 : 0);
>
> > + seq_printf(m, "%*sis_enabled : %5u\n", ind, "",
> > + (move_in_progress) ? 1 : 0);
>
> gcc & clang report:
> drivers/irqchip/irq-riscv-imsic-state.c:288:14: warning: variable 'is_enabled' set but not used [-Wunused-but-set-variable]
>
> This looks to be a copy-pasta issue, and the move_in_progress here
> should be is_enabled?
Thanks for catching. Strangely, I did not see this warning with
the toolchain which I use.
I will fix it in the next patch revision.
Regards,
Anup
>
> > + seq_printf(m, "%*sis_move_pending : %5u\n", ind, "",
> > + (move_in_progress) ? 1 : 0);
> > + if (move_in_progress) {
> > + seq_printf(m, "%*smove_cpu : %5u\n", ind, "", mcpu);
> > + seq_printf(m, "%*smove_local_id : %5u\n", ind, "", mlocal_id);
> > + }
> > +}
Powered by blists - more mailing lists