Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1M18KJ-0005n7-P7 for mharc-grub-devel@gnu.org; Mon, 04 May 2009 20:16:03 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M18KH-0005mz-NM for grub-devel@gnu.org; Mon, 04 May 2009 20:16:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M18KF-0005md-OB for grub-devel@gnu.org; Mon, 04 May 2009 20:16:00 -0400 Received: from [199.232.76.173] (port=45206 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M18KF-0005ma-Fo for grub-devel@gnu.org; Mon, 04 May 2009 20:15:59 -0400 Received: from 74-93-104-97-washington.hfc.comcastbusiness.net ([74.93.104.97]:48955 helo=sunset.davemloft.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M18KF-0003KK-51 for grub-devel@gnu.org; Mon, 04 May 2009 20:15:59 -0400 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 6091735C00F; Mon, 4 May 2009 17:15:52 -0700 (PDT) Date: Mon, 04 May 2009 17:15:52 -0700 (PDT) Message-Id: <20090504.171552.70929563.davem@davemloft.net> To: grub-devel@gnu.org, proski@gnu.org From: David Miller In-Reply-To: <1241482404.4453.37.camel@mj> References: <1241482404.4453.37.camel@mj> X-Mailer: Mew version 6.2.51 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Subject: Re: [PATCH] Provide grub_dl_ref() and grub_dl_unref() for GRUB_UTIL X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2009 00:16:02 -0000 From: Pavel Roskin Date: Mon, 04 May 2009 20:13:24 -0400 > Hello! > > The GRUB code is full of constructs like > > #ifndef GRUB_UTIL > grub_dl_ref (my_mod); > #endif > > It's better to avoid having source files littered with preprocessor > conditionals. This patch implements grub_dl_ref() and grub_dl_unref() > as inline functions when GRUB_UTIL is defined. > > I'm not using the unused attribute to match the existing signature of > those functions. > > ChangeLog: > * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations > of grub_dl_ref() and grub_dl_unref(). Remove preprocessor > conditionals around all callers. Change looks great, but probably you want to explicitly mention all of the C files where you got rid of the CPP conditional tests.