* [PATCH] ocfs2/cluster/netdebug.c: fix warning @ 2008-08-05 20:10 Alexander Beregalov 2008-08-05 20:29 ` Joel Becker 0 siblings, 1 reply; 5+ messages in thread From: Alexander Beregalov @ 2008-08-05 20:10 UTC (permalink / raw) To: mfasheh, joel.becker, ocfs2-devel, linux-kernel From: Alexander Beregalov <a.beregalov@gmail.com> ocfs2/cluster/netdebug.c: fix warning fs/ocfs2/cluster/netdebug.c:154: warning: format '%lu' expects type 'long unsigned int', but argument 17 has type 'suseconds_t' Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> --- fs/ocfs2/cluster/netdebug.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index d8bfa0e..cdc0ed2 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c @@ -151,7 +151,7 @@ static int nst_seq_show(struct seq_file *seq, void *v) nst->st_send_time.tv_sec, (unsigned long)nst->st_send_time.tv_usec, nst->st_status_time.tv_sec, - nst->st_status_time.tv_usec); + (unsigned long)nst->st_status_time.tv_usec); } spin_unlock(&o2net_debug_lock); ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ocfs2/cluster/netdebug.c: fix warning 2008-08-05 20:10 [PATCH] ocfs2/cluster/netdebug.c: fix warning Alexander Beregalov @ 2008-08-05 20:29 ` Joel Becker 2008-08-05 20:50 ` Alexander Beregalov 0 siblings, 1 reply; 5+ messages in thread From: Joel Becker @ 2008-08-05 20:29 UTC (permalink / raw) To: Alexander Beregalov; +Cc: mfasheh, ocfs2-devel, linux-kernel On Wed, Aug 06, 2008 at 12:10:36AM +0400, Alexander Beregalov wrote: > From: Alexander Beregalov <a.beregalov@gmail.com> > > ocfs2/cluster/netdebug.c: fix warning > > fs/ocfs2/cluster/netdebug.c:154: warning: format '%lu' expects > type 'long unsigned int', but argument 17 has type 'suseconds_t' > > Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> > --- > > fs/ocfs2/cluster/netdebug.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c > index d8bfa0e..cdc0ed2 100644 > --- a/fs/ocfs2/cluster/netdebug.c > +++ b/fs/ocfs2/cluster/netdebug.c > @@ -151,7 +151,7 @@ static int nst_seq_show(struct seq_file *seq, void *v) > nst->st_send_time.tv_sec, > (unsigned long)nst->st_send_time.tv_usec, > nst->st_status_time.tv_sec, > - nst->st_status_time.tv_usec); > + (unsigned long)nst->st_status_time.tv_usec); suseconds_t is a signed long. Can you change the format to %ld and cast to long? Unfortunately, we need the cast, as sparc64 and parisc treat it as int. Joel -- "If you are ever in doubt as to whether or not to kiss a pretty girl, give her the benefit of the doubt" -Thomas Carlyle Joel Becker Principal Software Developer Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ocfs2/cluster/netdebug.c: fix warning 2008-08-05 20:29 ` Joel Becker @ 2008-08-05 20:50 ` Alexander Beregalov 2008-08-05 23:22 ` Joel Becker 2008-08-06 21:24 ` Mark Fasheh 0 siblings, 2 replies; 5+ messages in thread From: Alexander Beregalov @ 2008-08-05 20:50 UTC (permalink / raw) To: mfasheh, ocfs2-devel, linux-kernel On Tue, Aug 05, 2008 at 01:29:48PM -0700, Joel Becker wrote: > suseconds_t is a signed long. Can you change the format to %ld > and cast to long? Unfortunately, we need the cast, as sparc64 and > parisc treat it as int. Then we should change cast from unsigned long to long for every tv_usec, right? From: Alexander Beregalov <a.beregalov@gmail.com> ocfs2/cluster/netdebug.c: fix warning fs/ocfs2/cluster/netdebug.c:154: warning: format '%lu' expects type 'long unsigned int', but argument 17 has type 'suseconds_t' Joel Becker wrote: > suseconds_t is a signed long. Can you change the format to %ld > and cast to long? Unfortunately, we need the cast, as sparc64 and > parisc treat it as int. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> --- fs/ocfs2/cluster/netdebug.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index d8bfa0e..52276c0 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c @@ -138,20 +138,20 @@ static int nst_seq_show(struct seq_file *seq, void *v) " message id: %d\n" " message type: %u\n" " message key: 0x%08x\n" - " sock acquiry: %lu.%lu\n" - " send start: %lu.%lu\n" - " wait start: %lu.%lu\n", + " sock acquiry: %lu.%ld\n" + " send start: %lu.%ld\n" + " wait start: %lu.%ld\n", nst, (unsigned long)nst->st_task->pid, (unsigned long)nst->st_task->tgid, nst->st_task->comm, nst->st_node, nst->st_sc, nst->st_id, nst->st_msg_type, nst->st_msg_key, nst->st_sock_time.tv_sec, - (unsigned long)nst->st_sock_time.tv_usec, + (long)nst->st_sock_time.tv_usec, nst->st_send_time.tv_sec, - (unsigned long)nst->st_send_time.tv_usec, + (long)nst->st_send_time.tv_usec, nst->st_status_time.tv_sec, - nst->st_status_time.tv_usec); + (long)nst->st_status_time.tv_usec); } spin_unlock(&o2net_debug_lock); @@ -276,7 +276,7 @@ static void *sc_seq_next(struct seq_file *seq, void *v, loff_t *pos) return sc; /* unused, just needs to be null when done */ } -#define TV_SEC_USEC(TV) TV.tv_sec, (unsigned long)TV.tv_usec +#define TV_SEC_USEC(TV) TV.tv_sec, (long)TV.tv_usec static int sc_seq_show(struct seq_file *seq, void *v) { @@ -309,12 +309,12 @@ static int sc_seq_show(struct seq_file *seq, void *v) " remote node: %s\n" " page off: %zu\n" " handshake ok: %u\n" - " timer: %lu.%lu\n" - " data ready: %lu.%lu\n" - " advance start: %lu.%lu\n" - " advance stop: %lu.%lu\n" - " func start: %lu.%lu\n" - " func stop: %lu.%lu\n" + " timer: %lu.%ld\n" + " data ready: %lu.%ld\n" + " advance start: %lu.%ld\n" + " advance stop: %lu.%ld\n" + " func start: %lu.%ld\n" + " func stop: %lu.%ld\n" " func key: %u\n" " func type: %u\n", sc, ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ocfs2/cluster/netdebug.c: fix warning 2008-08-05 20:50 ` Alexander Beregalov @ 2008-08-05 23:22 ` Joel Becker 2008-08-06 21:24 ` Mark Fasheh 1 sibling, 0 replies; 5+ messages in thread From: Joel Becker @ 2008-08-05 23:22 UTC (permalink / raw) To: Alexander Beregalov; +Cc: mfasheh, ocfs2-devel, linux-kernel On Wed, Aug 06, 2008 at 12:50:41AM +0400, Alexander Beregalov wrote: > On Tue, Aug 05, 2008 at 01:29:48PM -0700, Joel Becker wrote: > > suseconds_t is a signed long. Can you change the format to %ld > > and cast to long? Unfortunately, we need the cast, as sparc64 and > > parisc treat it as int. > > Then we should change cast from unsigned long to long for every tv_usec, right? Yup. Joel -- "You can get more with a kind word and a gun than you can with a kind word alone." - Al Capone Joel Becker Principal Software Developer Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ocfs2/cluster/netdebug.c: fix warning 2008-08-05 20:50 ` Alexander Beregalov 2008-08-05 23:22 ` Joel Becker @ 2008-08-06 21:24 ` Mark Fasheh 1 sibling, 0 replies; 5+ messages in thread From: Mark Fasheh @ 2008-08-06 21:24 UTC (permalink / raw) To: Alexander Beregalov; +Cc: ocfs2-devel, linux-kernel On Wed, Aug 06, 2008 at 12:50:41AM +0400, Alexander Beregalov wrote: > From: Alexander Beregalov <a.beregalov@gmail.com> > > ocfs2/cluster/netdebug.c: fix warning > > fs/ocfs2/cluster/netdebug.c:154: warning: format '%lu' expects > type 'long unsigned int', but argument 17 has type 'suseconds_t' Ok, this is in ocfs2.git now. --Mark -- Mark Fasheh ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-06 21:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-05 20:10 [PATCH] ocfs2/cluster/netdebug.c: fix warning Alexander Beregalov 2008-08-05 20:29 ` Joel Becker 2008-08-05 20:50 ` Alexander Beregalov 2008-08-05 23:22 ` Joel Becker 2008-08-06 21:24 ` Mark Fasheh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox