[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200714.133216.319021019310697324.davem@davemloft.net>
Date: Tue, 14 Jul 2020 13:32:16 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: rakeshs.lkm@...il.com
Cc: sbhatta@...vell.com, sgoutham@...vell.com, jerinj@...vell.com,
rsaladi2@...vell.com, kuba@...nel.org, netdev@...r.kernel.org,
Sunil.Goutham@...ium.com
Subject: Re: [net-next PATCH 1/2] octeontx2-af: add npa error af interrupt
handlers
From: rakeshs.lkm@...il.com
Date: Tue, 14 Jul 2020 12:08:24 +0530
> +static const char *rvu_npa_inpq_to_str(u16 in)
> +{
> + switch (in) {
> + case 0:
> + return NULL;
> + case BIT(NPA_INPQ_NIX0_RX):
> + return __stringify(NPA_INPQ_NIX0_RX);
Hardware can report anything, multiple bits set at once, garbage
values, etc.
So to me it doesn't make much sense to expect only one bit set
and only handle specific well defined bits.
This is the error path in an interrupt handler, just print the
raw bits instead of trying to pretty print them please.
> +static irqreturn_t rvu_npa_af_gen_intr_handler(int irq, void *rvu_irq)
> +{
> + struct rvu *rvu = (struct rvu *)rvu_irq;
Void pointers never need to be cast to another type of pointer.
Please fix this up in your entire submission.
Powered by blists - more mailing lists