clean up printk formats with DMAPI_DEBUG
PATCH 1/1 clean up printk formats with DMAPI_DEBUG
Trivial cleanup of formats.
---
fs/xfs/dmapi/xfs_dm.c +3 -3
@@ -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
fs/xfs/dmapi/xfs_dm.c xfs_dm_round_hole( · line 2339
Quoted 6 lines · Eric Sandeen
#ifdef
CONFIG_DMAPI_DEBUGfs/xfs/dmapi/xfs_dm.c +2
-2-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.
Quoted 11 lines · Christoph Hellwig
fs/xfs/dmapi/xfs_dm.c xfs_dm_round_hole( · line 2339
Quoted 6 lines · Eric Sandeen
#ifdef
CONFIG_DMAPI_DEBUGfs/xfs/dmapi/xfs_dm.c +2
-2-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
PATCH v2 1/1 clean up printk formats with DMAPI_DEBUG
Quoted 14 lines · Eric Sandeen
Quoted 12 lines · Christoph Hellwig
Review
Quoted 7 lines · Eric Sandeen
#ifdef
CONFIG_DMAPI_DEBUG(quoted diff) +2
-2- 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.
Quoted 6 lines
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
--
fs/xfs/dmapi/xfs_dm.c +8 -5
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs