* [PATCH] clean up printk formats with DMAPI_DEBUG
@ 2008-10-25 13:14 Eric Sandeen
2008-10-25 20:20 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2008-10-25 13:14 UTC (permalink / raw)
To: xfs-oss
Trivial cleanup of formats.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c
+++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c
@@ -2334,8 +2334,8 @@ xfs_dm_round_hole(
return -EINVAL; /* requested length is too small */
}
#ifdef CONFIG_DMAPI_DEBUG
- printk("xfs_dm_round_hole: off %lu, len %ld, align %lu, "
- "filesize %llu, roff %ld, rlen %ld\n",
+ printk("xfs_dm_round_hole: off %lld, len %llu, align %llu, "
+ "filesize %lld, roff %lld, rlen %llu\n",
offset, length, align, filesize, *roff, *rlen);
#endif
return 0; /* hole geometry successfully rounded */
@@ -2467,7 +2467,7 @@ xfs_dm_punch_hole(
}
#ifdef CONFIG_DMAPI_DEBUG
- printk("xfs_dm_punch_hole: off %lu, len %ld, align %lu\n",
+ printk("xfs_dm_punch_hole: off %lld, len %llu, align %llu\n",
off, len, align);
#endif
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] clean up printk formats with DMAPI_DEBUG 2008-10-25 13:14 [PATCH] clean up printk formats with DMAPI_DEBUG Eric Sandeen @ 2008-10-25 20:20 ` Christoph Hellwig 2008-10-25 20:27 ` Eric Sandeen 0 siblings, 1 reply; 4+ messages in thread From: Christoph Hellwig @ 2008-10-25 20:20 UTC (permalink / raw) To: Eric Sandeen; +Cc: xfs-oss On Sat, Oct 25, 2008 at 08:14:25AM -0500, Eric Sandeen wrote: > #ifdef CONFIG_DMAPI_DEBUG > - printk("xfs_dm_round_hole: off %lu, len %ld, align %lu, " > - "filesize %llu, roff %ld, rlen %ld\n", > + printk("xfs_dm_round_hole: off %lld, len %llu, align %llu, " > + "filesize %lld, roff %lld, rlen %llu\n", > offset, length, align, filesize, *roff, *rlen); We'd still need casts to (unsigned) long long because the 64 bit types may be either variant on 64 bit platforms. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clean up printk formats with DMAPI_DEBUG 2008-10-25 20:20 ` Christoph Hellwig @ 2008-10-25 20:27 ` Eric Sandeen 2008-11-21 21:18 ` [PATCH V2] " Eric Sandeen 0 siblings, 1 reply; 4+ messages in thread From: Eric Sandeen @ 2008-10-25 20:27 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs-oss Christoph Hellwig wrote: > On Sat, Oct 25, 2008 at 08:14:25AM -0500, Eric Sandeen wrote: >> #ifdef CONFIG_DMAPI_DEBUG >> - printk("xfs_dm_round_hole: off %lu, len %ld, align %lu, " >> - "filesize %llu, roff %ld, rlen %ld\n", >> + printk("xfs_dm_round_hole: off %lld, len %llu, align %llu, " >> + "filesize %lld, roff %lld, rlen %llu\n", >> offset, length, align, filesize, *roff, *rlen); > > We'd still need casts to (unsigned) long long because the 64 bit > types may be either variant on 64 bit platforms. > Ah crud you're right, I forgot that s64 was sometimes just a "long" Bah; is there no format that does this cleanly? :) -Eric ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] clean up printk formats with DMAPI_DEBUG 2008-10-25 20:27 ` Eric Sandeen @ 2008-11-21 21:18 ` Eric Sandeen 0 siblings, 0 replies; 4+ messages in thread From: Eric Sandeen @ 2008-11-21 21:18 UTC (permalink / raw) To: Christoph Hellwig; +Cc: xfs-oss Eric Sandeen wrote: > Christoph Hellwig wrote: > >> On Sat, Oct 25, 2008 at 08:14:25AM -0500, Eric Sandeen wrote: >> >>> #ifdef CONFIG_DMAPI_DEBUG >>> - printk("xfs_dm_round_hole: off %lu, len %ld, align %lu, " >>> - "filesize %llu, roff %ld, rlen %ld\n", >>> + printk("xfs_dm_round_hole: off %lld, len %llu, align %llu, " >>> + "filesize %lld, roff %lld, rlen %llu\n", >>> offset, length, align, filesize, *roff, *rlen); >>> >> We'd still need casts to (unsigned) long long because the 64 bit >> types may be either variant on 64 bit platforms. >> > Ah crud you're right, I forgot that s64 was sometimes just a "long" > > Bah; is there no format that does this cleanly? :) > > -Eric > Fix up warnings when building with DMAPI_DEBUG Signed-off-by: Eric Sandeen <sandeen@sandeen.net> -- Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c @@ -2334,9 +2334,11 @@ xfs_dm_round_hole( return -EINVAL; /* requested length is too small */ } #ifdef CONFIG_DMAPI_DEBUG - printk("xfs_dm_round_hole: off %lu, len %ld, align %lu, " - "filesize %llu, roff %ld, rlen %ld\n", - offset, length, align, filesize, *roff, *rlen); + printk("xfs_dm_round_hole: off %lld, len %llu, align %llu, " + "filesize %lld, roff %lld, rlen %llu\n", + (long long)offset, (unsigned long long)length, + (unsigned long long)align, filesize, (long long)*roff, + (unsigned long long)*rlen); #endif return 0; /* hole geometry successfully rounded */ } @@ -2467,8 +2469,9 @@ xfs_dm_punch_hole( } #ifdef CONFIG_DMAPI_DEBUG - printk("xfs_dm_punch_hole: off %lu, len %ld, align %lu\n", - off, len, align); + printk("xfs_dm_punch_hole: off %lld, len %llu, align %llu\n", + (long long)off, (unsigned long long)len, + (unsigned long long)align); #endif error = xfs_change_file_space(ip, XFS_IOC_UNRESVSP, &bf, _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-21 21:32 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-25 13:14 [PATCH] clean up printk formats with DMAPI_DEBUG Eric Sandeen 2008-10-25 20:20 ` Christoph Hellwig 2008-10-25 20:27 ` Eric Sandeen 2008-11-21 21:18 ` [PATCH V2] " Eric Sandeen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox