From: Matthew Wilcox <matthew@wil.cx>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] fix warning in arch/ia64/pci/pci.c
Date: Mon, 10 Jan 2005 21:52:35 +0000 [thread overview]
Message-ID: <20050110215235.GR27371@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <200501101325.49728.jbarnes@engr.sgi.com>
On Mon, Jan 10, 2005 at 01:25:49PM -0800, Jesse Barnes wrote:
> Bjorn, I think you had a similar fix awhile back?
Was me actually ... mine looked like this:
+#ifdef CONFIG_NUMA
+extern acpi_status acpi_map_iosapic (acpi_handle, u32, void*, void**);
+#define map_apics() acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
+#else
+#define map_apics() do { } while (0);
+#endif
+
[...]
-#ifdef CONFIG_NUMA
-extern acpi_status acpi_map_iosapic (acpi_handle, u32, void*, void**);
-
- acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
-#endif
+ map_apics();
but yours has probbaly even been compiled, and stuff.
> Fix a 'mixing code and declarations' warning in pci.c by creating a small
> function that's a no-op if CONFIG_NUMA=n but otherwise includes the proper
> extern.
>
> Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
>
> Thanks,
> Jesse
> === arch/ia64/pci/pci.c 1.60 vs edited ==> --- 1.60/arch/ia64/pci/pci.c 2005-01-04 18:48:18 -08:00
> +++ edited/arch/ia64/pci/pci.c 2005-01-06 17:49:11 -08:00
> @@ -131,6 +131,19 @@
> .write = pci_write,
> };
>
> +#ifdef CONFIG_NUMA
> +extern acpi_status acpi_map_iosapic(acpi_handle, u32, void *, void **);
> +static void acpi_map_iosapics(void)
> +{
> + acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
> +}
> +#else
> +static void acpi_map_iosapics(void)
> +{
> + return;
> +}
> +#endif /* CONFIG_NUMA */
> +
> static int __init
> pci_acpi_init (void)
> {
> @@ -138,11 +151,7 @@
>
> printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
>
> -#ifdef CONFIG_NUMA
> -extern acpi_status acpi_map_iosapic (acpi_handle, u32, void*, void**);
> -
> - acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
> -#endif
> + acpi_map_iosapics();
>
> if (pci_routeirq) {
> /*
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
next prev parent reply other threads:[~2005-01-10 21:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-10 21:25 [PATCH] fix warning in arch/ia64/pci/pci.c Jesse Barnes
2005-01-10 21:52 ` Matthew Wilcox [this message]
2005-01-10 21:54 ` Jesse Barnes
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=20050110215235.GR27371@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--cc=linux-ia64@vger.kernel.org \
/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