From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nicolas DET <nd@bplan-gmbh.de>
Cc: akpm@osdl.org, sl@bplan-gmbh.de, linuxppc-dev@ozlabs.org,
linuxppc-embedded@ozlabs.org, sha@pengutronix.de
Subject: Re: [PATCH] General CHRP/MPC5K2 platform support patch
Date: Fri, 27 Oct 2006 12:49:41 +1000 [thread overview]
Message-ID: <1161917381.25682.37.camel@localhost.localdomain> (raw)
In-Reply-To: <4540EB0E.2090000@bplan-gmbh.de>
Any reason why this is not static nor __init ? :
> +struct device_node *find_mpc52xx_pic(void)
> +{
> + struct device_node *dev;
> + const char *piccompatible_list[] =
> + {
> + "mpc5200-interrupt-controller",
> + "mpc52xx-interrupt-controller",
> + "mpc52xx-pic",
> + "mpc5200-pic",
> + "5200-interrupt-controller",
> + "52xx-interrupt-controller",
> + "52xx-pic",
> + "5200-pic",
> + NULL
> + };
> +
> + /* Look for an MPC52xx interrupt controller */
> + for_each_node_by_type(dev, "interrupt-controller")
> + {
> + const char **piccompatible_entry = piccompatible_list;
> +
> + for(piccompatible_entry = piccompatible_list; *piccompatible_entry; piccompatible_entry++ )
> + {
> + if (device_is_compatible(dev, *piccompatible_entry ))
> + return dev;
> + }
> + }
> +
> + return NULL;
> +}
> +
> +static int __init chrp_find_mpc52xx_pic(void)
> +{
> + if (find_mpc52xx_pic())
> + {
> + printk(KERN_INFO "Found MPC52xx Interrupt Controller\n");
> + ppc_md.get_irq = mpc52xx_get_irq;
> + mpc52xx_init_irq();
> + return 0;
> + }
> +
> + return -ENODEV;
> +}
I'm not sure I see any point in splitting in two functions like that
> static void __init chrp_find_8259(void)
> {
> struct device_node *np, *pic = NULL;
> @@ -473,8 +519,11 @@ static void __init chrp_find_8259(void)
> break;
> }
> if (np == NULL)
> - printk(KERN_WARNING "Cannot find PCI interrupt acknowledge"
> - " address, polling\n");
> + {
> + printk(KERN_WARNING "Cannot find PCI/i8259 interrupt acknowledge"
> + " Fix your tree!\n");
> + return;
> + }
Unrelated changes/fix, should probably be in a separate patch.
Cheers,
Ben.
next prev parent reply other threads:[~2006-10-27 2:49 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 19:05 [PATCH] General CHRP/MPC5K2 platform support patch Nicolas DET
2006-10-25 21:59 ` Paul Mackerras
2006-10-25 22:41 ` Grant Likely
2006-10-25 22:59 ` Benjamin Herrenschmidt
2006-10-26 11:09 ` Nicolas DET
2006-10-26 11:17 ` Nicolas DET
2006-10-25 22:53 ` Benjamin Herrenschmidt
2006-10-26 11:09 ` Nicolas DET
2006-10-26 12:49 ` Benjamin Herrenschmidt
2006-10-26 12:59 ` Nicolas DET
2006-10-26 16:02 ` Grant Likely
2006-10-26 16:09 ` Grant Likely
2006-10-26 17:06 ` Nicolas DET
2006-10-26 17:54 ` Sylvain Munaut
2006-10-27 3:08 ` Benjamin Herrenschmidt
2006-10-26 19:14 ` Grant Likely
2006-10-26 19:21 ` Nicolas DET
2006-10-26 19:32 ` Nicolas DET
2006-10-27 2:49 ` Benjamin Herrenschmidt [this message]
2006-10-26 16:45 ` Sven Luther
2006-10-26 19:50 ` Nicolas DET
2006-10-26 20:00 ` Grant Likely
2006-10-26 20:51 ` Sylvain Munaut
2006-10-27 3:28 ` Benjamin Herrenschmidt
2006-10-27 14:52 ` Nicolas DET
2006-10-27 15:04 ` Nicolas DET
2006-10-27 17:08 ` Jon Loeliger
2006-10-28 0:27 ` Stephen Rothwell
2006-10-27 22:34 ` Benjamin Herrenschmidt
2006-10-27 22:05 ` Sylvain Munaut
2006-10-25 23:01 ` Grant Likely
2006-10-25 23:06 ` Benjamin Herrenschmidt
2006-10-25 23:13 ` Sven Luther
2006-10-26 12:09 ` Nicolas DET
2006-10-26 12:51 ` Benjamin Herrenschmidt
2006-10-26 17:17 ` John Rigby
2006-10-26 17:23 ` Nicolas DET
2006-10-26 17:33 ` Sylvain Munaut
2006-10-27 3:03 ` Benjamin Herrenschmidt
2006-10-27 2:57 ` Benjamin Herrenschmidt
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=1161917381.25682.37.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=linuxppc-embedded@ozlabs.org \
--cc=nd@bplan-gmbh.de \
--cc=sha@pengutronix.de \
--cc=sl@bplan-gmbh.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;
as well as URLs for NNTP newsgroup(s).