[PATCH] zonefs: fix build warning for s390 in tracepoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



s390 (and alpha) define __kernel_ino_t and thus ino_t as unsigned int
instead of unsigned long like the other architectures do.

Zonefs' tracepoints use the %lu format specifier for unsigned long
generating a build warning. So cast inode numbers to (unsigned long) when
printing to get rid of the build warning, like other filesystems do as well.

Fixes: 6716b125b339 ("zonefs: add tracepoints for file operations")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
---
 fs/zonefs/trace.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/zonefs/trace.h b/fs/zonefs/trace.h
index 26b9370a9235..f369d7d50303 100644
--- a/fs/zonefs/trace.h
+++ b/fs/zonefs/trace.h
@@ -38,7 +38,7 @@ TRACE_EVENT(zonefs_zone_mgmt,
 				   ZONEFS_I(inode)->i_zone_size >> SECTOR_SHIFT;
 	    ),
 	    TP_printk("bdev=(%d,%d), ino=%lu op=%s, sector=%llu, nr_sectors=%llu",
-		      show_dev(__entry->dev), __entry->ino,
+		      show_dev(__entry->dev), (unsigned long)__entry->ino,
 		      blk_op_str(__entry->op), __entry->sector,
 		      __entry->nr_sectors
 	    )
@@ -64,8 +64,9 @@ TRACE_EVENT(zonefs_file_dio_append,
 			   __entry->ret = ret;
 	    ),
 	    TP_printk("bdev=(%d, %d), ino=%lu, sector=%llu, size=%zu, wpoffset=%llu, ret=%zu",
-		      show_dev(__entry->dev), __entry->ino, __entry->sector,
-		      __entry->size, __entry->wpoffset, __entry->ret
+		      show_dev(__entry->dev), (unsigned long)__entry->ino,
+		      __entry->sector, __entry->size, __entry->wpoffset,
+		      __entry->ret
 	    )
 );
 
@@ -87,8 +88,8 @@ TRACE_EVENT(zonefs_iomap_begin,
 			   __entry->length = iomap->length;
 	    ),
 	    TP_printk("bdev=(%d,%d), ino=%lu, addr=%llu, offset=%llu, length=%llu",
-		      show_dev(__entry->dev), __entry->ino, __entry->addr,
-		      __entry->offset, __entry->length
+		      show_dev(__entry->dev), (unsigned long)__entry->ino,
+		      __entry->addr, __entry->offset, __entry->length
 	    )
 );
 
-- 
2.26.2




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux