From: Jovi Zhang <bookjovi@gmail.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: "open list:NFS,
linux-kernel@vger.kernel.org (open list)"
<linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfs: fix compilation warning
Date: Mon, 7 Mar 2011 12:11:57 +0800 [thread overview]
Message-ID: <AANLkTi=CLqfMa_Sxq5YUTpbBCi+UoVKoD+n7hAMEW82K@mail.gmail.com> (raw)
In-Reply-To: <20110305160153.a37899b3.rdunlap@xenotime.net>
On Sun, Mar 6, 2011 at 8:01 AM, Randy Dunlap <rdunlap@xenotime.net> wro=
te:
> On Wed, =C2=A02 Mar 2011 18:19:37 -0500 bookjovi@gmail.com wrote:
>
>> From: Jovi Zhang <bookjovi@gmail.com>
>>
>> this commit fix compilation warning as following:
>> linux-2.6/fs/nfs/nfs4proc.c:3265: warning: comparison of distinct po=
inter types lacks a cast
>>
>> Signed-off-by: Jovi Zhang <bookjovi@gmail.com>
>> ---
>> =C2=A0fs/nfs/nfs4proc.c | =C2=A0 =C2=A02 +-
>> =C2=A01 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
>> index 1ff76ac..c7eb4ee 100644
>> --- a/fs/nfs/nfs4proc.c
>> +++ b/fs/nfs/nfs4proc.c
>> @@ -3262,7 +3262,7 @@ static int buf_to_pages_noslab(const void *buf=
, size_t buflen,
>> =C2=A0 =C2=A0 =C2=A0 spages =3D pages;
>>
>> =C2=A0 =C2=A0 =C2=A0 do {
>> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 len =3D min(PAGE_CACHE_S=
IZE, buflen);
>> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 len =3D min((size_t)PAGE=
_CACHE_SIZE, buflen);
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 newpage =3D alloc_p=
age(GFP_KERNEL);
>>
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (newpage =3D=3D =
NULL)
>> --
>
> or use
> =C2=A0 =C2=A0 =C2=A0 =C2=A0len =3D min_t(size_t, PAGE_SIZE_CACHE, buf=
len);
>
That's good, Thanks.
next prev parent reply other threads:[~2011-03-07 4:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-02 23:19 [PATCH] nfs: fix compilation warning bookjovi
[not found] ` <20110305160153.a37899b3.rdunlap@xenotime.net>
2011-03-07 4:11 ` Jovi Zhang [this message]
2011-03-11 17:22 ` 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='AANLkTi=CLqfMa_Sxq5YUTpbBCi+UoVKoD+n7hAMEW82K@mail.gmail.com' \
--to=bookjovi@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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).