From owner-svn-src-all@FreeBSD.ORG Thu Mar 22 13:28:08 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B50A81065670; Thu, 22 Mar 2012 13:28:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC938FC1F; Thu, 22 Mar 2012 13:28:07 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q2MDS0Uu009960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 23 Mar 2012 00:28:00 +1100 Date: Fri, 23 Mar 2012 00:28:00 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201203221223.q2MCNW6j024123@svn.freebsd.org> Message-ID: <20120323001046.H2349@besplex.bde.org> References: <201203221223.q2MCNW6j024123@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r233305 - head/sys/x86/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2012 13:28:08 -0000 On Thu, 22 Mar 2012, John Baldwin wrote: > Log: > Mark the 'lapics' and 'ioapics' arrays here static since they are > private to this file. The 'lapics' array was actually shadowing a > completely different 'lapics' array that is private to local_apic.c. > > Reported by: bde > MFC after: 2 weeks > > Modified: > head/sys/x86/acpica/madt.c > > Modified: head/sys/x86/acpica/madt.c > ============================================================================== > --- head/sys/x86/acpica/madt.c Thu Mar 22 11:47:06 2012 (r233304) > +++ head/sys/x86/acpica/madt.c Thu Mar 22 12:23:32 2012 (r233305) > @@ -53,12 +53,12 @@ __FBSDID("$FreeBSD$"); > struct ioapic_info { > void *io_apic; > UINT32 io_vector; > -} ioapics[MAX_APIC_ID + 1]; > +} static ioapics[MAX_APIC_ID + 1]; > > struct lapic_info { > u_int la_enabled:1; > u_int la_acpi_id:8; > -} lapics[MAX_APIC_ID + 1]; > +} static lapics[MAX_APIC_ID + 1]; > > static int madt_found_sci_override; > static ACPI_TABLE_MADT *madt; Thanks, but that's any even weirder style. It's in between "int static foo;" and "int static unsigned foo;" for weirdness. Normal style gives: %%% struct lapic_info { u_int la_enabled:1; u_int la_acpi_id:8; }; static struct lapic_info lapics[MAX_APIC_ID + 1]; %%% etc. This also fixes some indentation. The struct tag for struct ioapic_info is not used outside of its declaration, so a non-separate type declaration would be more reasonable for it (since this gives the only way to omit the tag: static struct { void *io_apic; u_int io_vector; } ioapics[MAX_APIC_ID + 1]; This also translates UINT32 from windosspeak. There is no need for uint32_t since this is x86, and other places use u_int. Bruce