All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Mallon <rmallon@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>,
	coda@cs.cmu.edu, codalist@TELEMANN.coda.cs.cmu.edu,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] coda: Remove unnecessary OOM messages
Date: Wed, 01 Feb 2012 11:23:08 +1100	[thread overview]
Message-ID: <4F2885EC.8070900@gmail.com> (raw)
In-Reply-To: <1328055665.14714.5.camel@joe2Laptop>

On 01/02/12 11:21, Joe Perches wrote:

>> Since CODA_ALLOC no longer uses __FILE__ and __LINE__ and doesn't use
>> the cast argument any more, it can be replaced with a static inline
>> function. Something like this (untested, applies on top of your patch):
> 
> Hi Ryan.
> 
> I didn't want to be quite so invasive
> but this looks like a nice cleanup to me.

Yeah, it needed to be done as a separate patch. Just a good time to do
it now that it no longer needs to be a macro.

> Maybe because alloc/free functions are
> used relatively infrequently, maybe it'd
> be better to not declare the functions
> inline but add them to coda_linux.c


Sure, either approach is fine. Do you want to add the patch to your series?

~Ryan

> 
>> +static inline void *coda_alloc(size_t size)
>> +{
>> +	if (size < PAGE_SIZE)
>> +		return kzalloc(size, GFP_KERNEL);
>> +	return vzalloc(size);
>> +}
> []
>> +static inline void coda_free(const void *ptr, size_t size)
>> +{
>> +	if (size < PAGE_SIZE)
>> +		kfree(ptr);
>> +	else
>> +		vfree(ptr);
>> +}
> 
> 



  reply	other threads:[~2012-02-01  0:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 22:42 [PATCH 0/4] fs: Remove unnecessary OOM messages Joe Perches
2012-01-31 22:42 ` Joe Perches
2012-01-31 22:42 ` [PATCH 1/4] coda: " Joe Perches
2012-02-01  0:04   ` Ryan Mallon
2012-02-01  0:21     ` Joe Perches
2012-02-01  0:23       ` Ryan Mallon [this message]
2012-02-01  0:26         ` Joe Perches
2012-02-01  3:10           ` Jan Harkes
2012-02-01  3:42             ` Joe Perches
2012-01-31 22:42 ` [PATCH 2/4] jffs2: " Joe Perches
2012-02-03  7:00   ` Artem Bityutskiy
2012-02-03  7:00     ` Artem Bityutskiy
2012-01-31 22:42 ` [PATCH 3/4] reiserfs: " Joe Perches
2012-01-31 22:42 ` [PATCH 4/4] udf: " Joe Perches
2012-02-01 11:28   ` Jan Kara

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=4F2885EC.8070900@gmail.com \
    --to=rmallon@gmail.com \
    --cc=coda@cs.cmu.edu \
    --cc=codalist@TELEMANN.coda.cs.cmu.edu \
    --cc=jaharkes@cs.cmu.edu \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.