mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gergely Nagy <algernon@bonehunter.rulez.org>
To: linux-kernel@vger.kernel.org
Subject: [TRIVIAL][PPC] drivers/macintosh/via-pmu.c compile fix
Date: Wed, 03 Sep 2003 09:01:06 +0200	[thread overview]
Message-ID: <831xuygxu5.wl%algernon@sirc.hu> (raw)

Hi!

While compiling linux 2.6.0-test4-bk4, I got a weird error that some
initializers are not constants, in the pmu_handle_data()
function. Looking at the given line, there were EXPORT_SYMBOLs, so I
suspected that there's a missing brace somewhere. And that was it:
when CONFIG_PMAC_PBOOK is not set, the last if branch is not
closed. Adding an #else } #endif fixes the problem, patch attached
below.

While there, I also added another #ifdef (probably not too nice, and
there is most certainly a better way) to fix a minor compile warning
about `i' being used uninitialised in via_pmu_dev_init. This patch is
also attached below.

-- 
Gergely Nagy

--- drivers/macintosh/via-pmu.c.orig	2003-09-03 08:43:10.000000000 +0200
+++ drivers/macintosh/via-pmu.c	2003-09-03 08:42:51.000000000 +0200
@@ -1393,7 +1393,8 @@
 		pmu_pass_intr(data, len);
 	} else
 	       pmu_pass_intr(data, len);
-
+#else
+	}
 #endif /* CONFIG_PMAC_PBOOK */
 	goto next;
 }

--- drivers/macintosh/via-pmu.c.old	2003-09-03 08:42:51.000000000 +0200
+++ drivers/macintosh/via-pmu.c	2003-09-03 08:46:08.000000000 +0200
@@ -493,7 +493,9 @@
 	/* Create /proc/pmu */
 	proc_pmu_root = proc_mkdir("pmu", 0);
 	if (proc_pmu_root) {
+#ifdef CONFIG_PMAC_PBOOK
 		int i;
+#endif
 		proc_pmu_info = create_proc_read_entry("info", 0, proc_pmu_root,
 					proc_get_info, NULL);
 		proc_pmu_irqstats = create_proc_read_entry("interrupts", 0, proc_pmu_root,

                 reply	other threads:[~2003-09-03  7:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=831xuygxu5.wl%algernon@sirc.hu \
    --to=algernon@bonehunter.rulez.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®