diff mbox series

zonefs: fix build warning for s390 in tracepoints

Message ID d3378bec918aab6090def490784fb0de5a336388.1613380577.git.johannes.thumshirn@wdc.com (mailing list archive)
State New
Headers show
Series zonefs: fix build warning for s390 in tracepoints | expand

Commit Message

Johannes Thumshirn Feb. 15, 2021, 9:16 a.m. UTC
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@intel.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/zonefs/trace.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Damien Le Moal Feb. 16, 2021, 1:06 a.m. UTC | #1
On 2021/02/15 18:17, Johannes Thumshirn wrote:
> 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@intel.com>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>


Squashed this into the original patch. Thanks !
diff mbox series

Patch

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
 	    )
 );