linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fadvise: avoid EINVAL if user input is valid
Date: Sat, 25 Feb 2012 23:10:25 +0000	[thread overview]
Message-ID: <20120225231025.GA20598@dcvr.yhbt.net> (raw)
In-Reply-To: <4F496715.7070005@draigBrady.com>

PA!draig Brady <P@draigBrady.com> wrote:
> On 02/25/2012 02:27 AM, Eric Wong wrote:
> > +		force_page_cache_readahead(mapping, file, start_index, nrpages);
> >  		break;
> 
> This whole patch makes sense to me.
> The above chunk might cause confusion in future,
> if people wonder for a moment why the return is ignored.
> Should you use cast with (void) like this to be explicit?
> 
> (void) force_page_cache_readahead(...);

I considered this, too[1].  However I checked for existing usages of
force_page_cache_readahead() noticed they just ignore the return value
like I did in my patch, so I followed existing convention for this
function.   I didn't find any suggestion in Documentation/CodingStyle
for this.

Thanks for looking at this.

[1] - it's what I normally do in my own projects.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-02-25 23:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25  2:27 Eric Wong
2012-02-25 22:56 ` Pádraig Brady
2012-02-25 23:10   ` Eric Wong [this message]
2012-02-26  5:52 ` Hillf Danton
2012-02-26  8:44   ` Eric Wong

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=20120225231025.GA20598@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=P@draigBrady.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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