linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: Takashi Oe <toe@unlserve.unl.edu>
Cc: David Edelsohn <dje@watson.ibm.com>, linuxppc-dev@lists.linuxppc.org
Subject: Re: a GCC question
Date: Sun, 6 Aug 2000 15:06:11 +0200	[thread overview]
Message-ID: <20000806150611.A4180@suse.de> (raw)
In-Reply-To: <Pine.LNX.3.96LJ1.1b7.1000805220927.649I-100000@ofey.earthlink.net>


On Sat, Aug 05, Takashi Oe wrote:

>
> On Sat, 5 Aug 2000, David Edelsohn wrote:
>
> > 	I would guess that for smaller numbers of cases, GCC is deciding
> > that it is more efficient to use a series of "if" statements for a
> > decision tree instead of a switch statement.  You can explicitly code it
> > as such, e.g.,
> >
> > if (bi->dispDeviceDepth == 32)
> > ...
> > else if (bi-dispDeviceDepth == 16)
> > ...
> > else if
> > ...
> > else abort();
>
> Ah, that works, though the code doesn't work for some other unknown
> reasons now, probably due to something along the line of things Olaf was
> talking about recently.  Thanks!

Can you send me a diff against the current Benh kernel?
I just inserted these (useless) printk() to a non called function and
now it works so far for me.

find_pci_device_OFnode(unsigned char bus, unsigned char dev_fn)
{
/*      char blubber[60] = ""; */
        struct device_node* np;
        unsigned int *reg;
        int l;
/*      printk("I am just a dummy ...\n");  */
        for (np = allnodes; np != 0; np = np->allnext) {
                int in_macio = 0;
                struct device_node* parent = np->parent;
                while(parent) {
                        char *pname = (char *)get_property(parent, "name", &l);
        printk("I am just another dummy ...\n");
        printk("I am just another dummy ...\n");
                        if (pname && strcmp(pname, "mac-io") == 0) {
                                in_macio = 1;
                                break;
                        }

Bit ugly.


Gruss Olaf

--
 $ man clone

BUGS
       Main feature not yet implemented...

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  parent reply	other threads:[~2000-08-06 13:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-06  2:15 a GCC question Takashi Oe
2000-08-06  2:31 ` David Edelsohn
2000-08-06  3:20   ` Takashi Oe
2000-08-06  3:34     ` David Edelsohn
2000-08-06  4:05       ` Takashi Oe
2000-08-06  4:57         ` David Edelsohn
2000-08-06  6:01           ` Takashi Oe
2000-08-06  9:45             ` Timothy A. Seufert
2000-08-06 12:34               ` Takashi Oe
2000-08-06 13:06     ` Olaf Hering [this message]
2000-08-06 13:46       ` Takashi Oe

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=20000806150611.A4180@suse.de \
    --to=olh@suse.de \
    --cc=dje@watson.ibm.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=toe@unlserve.unl.edu \
    /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;
as well as URLs for NNTP newsgroup(s).