public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses•org>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: linux-next@vger•kernel.org, Bian Naimeng <biannm@cn•fujitsu.com>,
	nfsv4@linux-nfs•org
Subject: Re: linux-next: nfsd tree build warning
Date: Wed, 29 Apr 2009 11:01:50 -0400	[thread overview]
Message-ID: <20090429150150.GB8604@fieldses.org> (raw)
In-Reply-To: <20090429135702.943f2bfa.sfr@canb.auug.org.au>

On Wed, Apr 29, 2009 at 01:57:02PM +1000, Stephen Rothwell wrote:
> Hi Bruce,
> 
> Today's linux-next build (powerpc ppc64_defconfig) produced this new
> warning:
> 
> fs/nfsd/nfs4state.c: In function 'EXPIRED_STATEID':
> fs/nfsd/nfs4state.c:2757: warning: comparison of distinct pointer types lacks a cast
> 
> Caused by commit 78155ed75f470710f2aecb3e75e3d97107ba8374 ("nfsd4:
> distinguish expired from stale stateids").
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb•auug.org.au
> http://www.canb.auug.org.au/~sfr/

Probably just needs yet another cast.  Argh; maybe Bian Naimeng's
after_boot()/before_lease() idea would have been simpler.

--b.


diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 74e822e..d24dd12 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2754,7 +2754,7 @@ EXPIRED_STATEID(stateid_t *stateid)
 {
 	if (time_before((unsigned long)boot_time,
 			((unsigned long)stateid->si_boot)) &&
-	    time_before((stateid->si_boot + lease_time), get_seconds())) {
+	    time_before((unsigned long)(stateid->si_boot + lease_time), get_seconds())) {
 		dprintk("NFSD: expired stateid (%08x/%08x/%08x/%08x)!\n",
 			stateid->si_boot, stateid->si_stateownerid,
 			stateid->si_fileid, stateid->si_generation);

  reply	other threads:[~2009-04-29 15:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-29  3:57 linux-next: nfsd tree build warning Stephen Rothwell
2009-04-29 15:01 ` J. Bruce Fields [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-11  1:07 Stephen Rothwell
2009-08-11 16:53 ` J. Bruce Fields
2009-03-16  5:51 Stephen Rothwell
2009-03-16 13:42 ` J. Bruce Fields
2009-03-16 23:05   ` Stephen Rothwell

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=20090429150150.GB8604@fieldses.org \
    --to=bfields@fieldses$(echo .)org \
    --cc=biannm@cn$(echo .)fujitsu.com \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=nfsv4@linux-nfs$(echo .)org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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