Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261464AbTICHAx (ORCPT ); Wed, 3 Sep 2003 03:00:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261481AbTICHAx (ORCPT ); Wed, 3 Sep 2003 03:00:53 -0400 Received: from pool-250.gatesgroup.hu ([195.56.144.250]:516 "EHLO treebeard.bonehunter.rulez.org") by vger.kernel.org with ESMTP id S261464AbTICHAu (ORCPT ); Wed, 3 Sep 2003 03:00:50 -0400 Date: Wed, 03 Sep 2003 09:01:06 +0200 Message-ID: <831xuygxu5.wl%algernon@sirc.hu> From: Gergely Nagy To: linux-kernel@vger.kernel.org Subject: [TRIVIAL][PPC] drivers/macintosh/via-pmu.c compile fix User-Agent: Wanderlust/2.11.7 (Wonderwall) Emacs/21.3 Mule/5.0 (SAKAKI) X-Fortune: I'm GLAD I remembered to XEROX all my UNDERSHIRTS!! X-Marvin: Life, loathe it or ignore it, you can't like it. MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1659 Lines: 48 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, - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/