http://bugzilla.kernel.org/show_bug.cgi?id=11743

           Summary: Defined but not used variable:
                    'acpi_mcfg_64bit_base_addr'
           Product: ACPI
           Version: 2.5
     KernelVersion: 2.6.27
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: Config-Processors
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Latest working kernel version: 2.6.27
Earliest failing kernel version: 2.6.27
Distribution: SuSE 10.3
Hardware Environment: Opteron 265, 4Gb ECC RAM, 1Tb HDD, Nforce4 chipset   
Software Environment: gcc-4.3.1, glibc-2.6.1  
Problem Description: warning: 'acpi_mcfg_64bit_base_addr' defined but not used

Steps to reproduce:

1. Configure kernel without MMCONFIG support and compile.
2. make

....
arch/x86/kernel/acpi/boot.c:100: warning: 'acpi_mcfg_64bit_base_addr' defined
but not used
....

Comment:

acpi_mcfg_64bit_base_addr defined on line 100 in arch/x86/kernel/acpi/boot.c
as "static int acpi_mcfg_64bit_base_addr __initdata = FALSE;"
But used only in functions in same file boot.c: 

acpi_mcfg_oem_check() on line 166 
and in acpi_parse_mcfg() on line 208 

And this functions work only if CONFIG_PCI_MMCONFIG true, inside 

#ifdef CONFIG_PCI_MMCONFIG
...
...
#endif 

Solution:

--- patch version 1

################################################################

--- a/arch/x86/kernel/acpi/boot.c   2008-10-10 02:13:53.000000000 +0400
+++ b/arch/x86/kernel/acpi/boot.c   2008-10-12 03:13:16.888033920 +0400
@@ -97,7 +97,9 @@
 #warning ACPI uses CMPXCHG, i486 and later hardware
 #endif

+#ifdef CONFIG_PCI_MMCONFIG
 static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
+#endif

 /* --------------------------------------------------------------------------
                               Boot-time Configuration

###############################################################

or patch version 2

################################################################################

--- a/arch/x86/kernel/acpi/boot.c   2008-10-10 02:13:53.000000000 +0400
+++ b/arch/x86/kernel/acpi/boot.c   2008-10-12 03:35:18.992034200 +0400
@@ -97,7 +97,6 @@
 #warning ACPI uses CMPXCHG, i486 and later hardware
 #endif

-static int acpi_mcfg_64bit_base_addr __initdata = FALSE;

 /* --------------------------------------------------------------------------
                               Boot-time Configuration
@@ -156,6 +155,9 @@
 }

 #ifdef CONFIG_PCI_MMCONFIG
+
+static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
+
 /* The physical address of the MMCONFIG aperture.  Set from ACPI tables. */
 struct acpi_mcfg_allocation *pci_mmcfg_config;
 int pci_mmcfg_config_num;

#############################################################################


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to