From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIna7-0000ng-AR for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIna2-0000iL-NG for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:38 -0500 Received: from [199.232.76.173] (port=41954 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIna2-0000i9-Iv for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:34 -0500 Received: from mail-pz0-f188.google.com ([209.85.222.188]:49269) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIna2-00041r-Tn for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:17:35 -0500 Received: by pzk26 with SMTP id 26so83836pzk.4 for ; Thu, 10 Dec 2009 10:17:30 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20091210180939.GA25707@redhat.com> References: <20091210180939.GA25707@redhat.com> Date: Thu, 10 Dec 2009 16:17:30 -0200 Message-ID: <5d6222a80912101017l54710ddcnf56a6bf1ddf9e23b@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH 00/17] pci: switch a ton of drivers to symbolic names From: Glauber Costa Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On Thu, Dec 10, 2009 at 4:09 PM, Michael S. Tsirkin wrote: > The recent e1000 bug made the important of using > symbolic macros for pci config access clear for me. > So I started going over drivers and converting > to symbolic constants instead of hard-coded ones. > I did a large part until I run out of steam. > Maybe some brave soul will take up converting > the rest of them, or maybe I will: note that > when converting bridges one should be careful > to use bridge macros where appropriate. > > Instead of testing a huge number of configurations, > I compared binaries before and after conversion. > Almost all of them generate exact same stripped binary > before and after the change. > The only object changed was eepro100, objdump showed > that the change was because gcc for some reason > decides to use a bit more stack for init function > after comments are added there. > > This methodology was the reason that I added TODOs where I saw > deviations from spec or other code ugliness, will have to be fixed > separately. > IMHO, this is a huge enhancement. I myself was found expending huge amounts of time trying do figure out the meaning of some specific constants in the past. +1 -- Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."