From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 8 May 2009 06:30:31 +0200 Subject: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target In-Reply-To: <20090507190628.0231F83420E8@gemini.denx.de> References: <1241535678-24897-1-git-send-email-sr@denx.de> <200905071739.56301.sr@denx.de> <20090507190628.0231F83420E8@gemini.denx.de> Message-ID: <200905080630.31949.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Thursday 07 May 2009, Wolfgang Denk wrote: > > Perhaps it's quite new to the Linux kernel. I just spotted it the first > > time a few weeks ago and thought: "What a nice way to remove some of the > > ugly #ifdef's in U-Boot!". :) > > My understanding was that this is (only?) intended for function > declarations to silence warnings about unused function arguments > (which may be necessary anyway for compatible call interface with > other functions that actually need this arg). No. This is not the case. Just take a look at the usage in drivers/net for example. You will see this construct is used here exactly to prevent those #ifdef's in the variable declaration in many cases: drivers/net/bnx2.c: int hw_vlan __maybe_unused = 0; ... #ifdef BCM_VLAN if (bp->vlgrp) hw_vlan = 1; else #endif But ok, if nobody else other than me prefers this version then I'll change to those #ifdef's again. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================