All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] MIPS: kernel: traps: Remove useless BUG_ON()
Date: Thu, 26 Sep 2013 18:08:22 +0200	[thread overview]
Message-ID: <20130926160822.GD31496@linux-mips.org> (raw)
In-Reply-To: <1380188131-28792-1-git-send-email-markos.chandras@imgtec.com>

On Thu, Sep 26, 2013 at 10:35:31AM +0100, Markos Chandras wrote:

> Checking for n<0 && n>9 makes no sense because it can never
> be true. Moreover, we can have up to 64 vectored interrupts
> so BUG_ON(n>9) was wrong anyway.
> 
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com>
> ---
> This patch is for the upstream-sfr/mips-for-linux-next tree

What gem ;-)

I think the intent was

  BUG_ON(n < 0 || n > 9);

and 9 probably is the highest currently used value?

In any case that could have broken PowerTV which does the following:

        if (cpu_has_veic || cpu_has_vint) {
                int nvec = cpu_has_veic ? 64 : 8;
                for (i = 0; i < nvec; i++)
                        set_vi_handler(i, asic_irqdispatch);
        }

Nobody from PowerTV complained.  Time to sharpen the axe!

  Ralf

  reply	other threads:[~2013-09-26 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26  9:35 [PATCH] MIPS: kernel: traps: Remove useless BUG_ON() Markos Chandras
2013-09-26  9:35 ` Markos Chandras
2013-09-26 16:08 ` Ralf Baechle [this message]
2013-09-26 16:23   ` MIPS: PowerTV: Remove support code Ralf Baechle
2013-09-27 12:43   ` [PATCH] MIPS: kernel: traps: Remove useless BUG_ON() Ralf Baechle

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=20130926160822.GD31496@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=markos.chandras@imgtec.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.