linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] Mark prop unused in early_init_dt_scan_chosen().
Date: Thu, 10 May 2007 10:54:54 -0500	[thread overview]
Message-ID: <4643404E.30608@freescale.com> (raw)
In-Reply-To: <Pine.LNX.4.62.0705100938110.32241@pademelon.sonytel.be>

Geert Uytterhoeven wrote:
> On Wed, 9 May 2007, Kumar Gala wrote:
>>On Tue, 8 May 2007, Scott Wood wrote:
>>>-	u32 *prop;
>>>+	u32 __attribute__((unused)) *prop;
>>
>>is this the desired way to remove warnings related to CONFIG_ options?  I
>>know in the past we'd wrap it with a #ifdef CONFIG_FOO

Granted...  in this case, it looked as if there could be potential for 
using it for other things in the future as well.  That, and the extra 
ifdefs are ugly. :-)

> Exactly my thought.
> 
> Another advantage of #ifdef CONFIG_FOO is that if the actual code that uses it
> goes away, we'll get a warning again. Else in the end we'll be stuck with
> zillions of unused variables that don't cause warnings...

Again, granted -- though I'd say the primary problem in that case is 
functions that are too long to determine that by visual inspection alone.

I agree with Michael Ellerman that it'd be best to just factor the 
initrd stuff out into its own function.

-Scott

  reply	other threads:[~2007-05-10 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 17:14 [PATCH] Mark prop unused in early_init_dt_scan_chosen() Scott Wood
2007-05-08 23:56 ` Michael Ellerman
2007-05-09  0:41   ` David Gibson
2007-05-10  3:39 ` Kumar Gala
2007-05-10  7:39   ` Geert Uytterhoeven
2007-05-10 15:54     ` Scott Wood [this message]
2007-05-10 16:06       ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4643404E.30608@freescale.com \
    --to=scottwood@freescale.com \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).