linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Con Kolivas <kernel@kolivas.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	ck@vds.kolivas.org, Andreas Mohr <andi@rhlx01.fht-esslingen.de>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Pavel Machek <pavel@suse.cz>, Stefan Seyfried <seife@suse.de>
Subject: Re: [PATCH][RFC] mm: swsusp shrink_all_memory tweaks
Date: Sat, 18 Mar 2006 16:44:58 +1100	[thread overview]
Message-ID: <441B9E5A.1040703@yahoo.com.au> (raw)
In-Reply-To: <200603181556.23307.kernel@kolivas.org>

Con Kolivas wrote:
> On Saturday 18 March 2006 15:52, Nick Piggin wrote:
> 
>>Con Kolivas wrote:
>>
>>>
>>>#ifdeffery
>>
>>Sorry I don't understand...
> 
> 
> My bad.
> 
> I added the suspend_pass member to struct scan_control within an #ifdef 
> CONFIG_PM to allow it to not be unnecessarily compiled in in the !CONFIG_PM 
> case and wanted to avoid having the #ifdefs in vmscan.c so moved it to a 
> header file.
> 

Oh no, that rule thumb isn't actually "don't put ifdefs in .c files", but
people commonly say it that way anyway. The rule is actually that you should
put ifdefs in declarations rather than call/usage sites.

You did the right thing there by introducing the accessor, which moves the
ifdef out of code that wants to query the member right? But you can still
leave it in the .c file if it is local (which it is).

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-03-18  5:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200603101704.AA00798@bbb-jz5c7z9hn9y.digitalinfra.co.jp>
     [not found] ` <200603171717.23288.kernel@kolivas.org>
     [not found]   ` <200603171831.46811.rjw@sisk.pl>
2006-03-18  4:14     ` Con Kolivas
2006-03-18  4:41       ` Nick Piggin
2006-03-18  4:46         ` Con Kolivas
2006-03-18  4:52           ` Nick Piggin
2006-03-18  4:56             ` Con Kolivas
2006-03-18  5:44               ` Nick Piggin [this message]
2006-03-18  6:14                 ` Con Kolivas
2006-03-18  8:30                   ` Nick Piggin
2006-03-18  9:40                     ` Con Kolivas

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=441B9E5A.1040703@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=andi@rhlx01.fht-esslingen.de \
    --cc=ck@vds.kolivas.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pavel@suse.cz \
    --cc=rjw@sisk.pl \
    --cc=seife@suse.de \
    /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