mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maninder Singh <maninder1.s@samsung.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>,
	LKML <linux-kernel@vger.kernel.org>,
	PANKAJ MISHRA <pankaj.m@samsung.com>,
	Marc Zyngier <marc.zyngier@arm.com>
Subject: Re: [PATCH 1/1] irq-gic: use BUG_ON instead of if()/BUG
Date: Mon, 22 Jun 2015 13:05:12 +0000 (GMT)	[thread overview]
Message-ID: <1229205128.61041434978310948.JavaMail.weblogic@ep2mlwas07a> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=windows-1252, Size: 1422 bytes --]

Hi Thomas,

Thanks For your suggestions.

> >Further, while we are at that. It would be even more useful to analyze
> >whether the BUG_ON() is needed in the first place or at least could be
> >made conditional on some debug option.
> >
> >But that's not done by the script either, right?
>> 
>> Yes coccinelle semantic patches did not do that changes.
>> we have to choose whether to make BUG_ON conditional on some debug options.
>
>Right, and that's what I'm asking for. IOW, instead of blindly running
>scripts at least ask the question whether this stuff needs to be there
>unconditionally....

And I checked for these if()/BUG, I think we don't even need these if()/BUG constructs in codes.
For below 4 functions.
1. gic_dist_save
2. gic_dist_restore
3. gic_cpu_save
4. gic_cpu_restore

As we are checking in loop for (i = 0; i < MAX_GIC_NR; i++)
and passing i as gic_nr.  So below condition never returns true for any case, i think
 if (gic_nr >= MAX_GIC_NR).

So we can remove if/BUG constructs from these functions ??

5. gic_migrate_target 
And also in gic_migrate_target , we initializing gic_nr = 0;
and then checking whether gic_nr >= MAX_GIC_NR.

6. gic_cascade_irq
Before calling this function we have checked the same condition in gic_init_bases

So we can also remove if()/BUG from these functions also ?

Thanks ,
Maninder
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠsåy«\x1e­æ¶\x17…\x01\x06­†ÛiÿÿðÃ\x0fí»\x1fè®\x0få’i\x7f

             reply	other threads:[~2015-06-22 13:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 13:05 Maninder Singh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-06-19  9:51 Maninder Singh
2015-06-19 10:07 ` Thomas Gleixner
2015-06-19  8:52 Maninder Singh
2015-06-19  9:32 ` Thomas Gleixner

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=1229205128.61041434978310948.JavaMail.weblogic@ep2mlwas07a \
    --to=maninder1.s@samsung.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=pankaj.m@samsung.com \
    --cc=tglx@linutronix.de \
    /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®