* [PATCH] zonefs: fix build warning for s390 in tracepoints
@ 2021-02-15 9:16 Johannes Thumshirn
2021-02-16 1:06 ` Damien Le Moal
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2021-02-15 9:16 UTC (permalink / raw)
To: Damien Le Moal; +Cc: linux-fsdevel, Johannes Thumshirn, kernel test robot
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zonefs: fix build warning for s390 in tracepoints
2021-02-15 9:16 [PATCH] zonefs: fix build warning for s390 in tracepoints Johannes Thumshirn
@ 2021-02-16 1:06 ` Damien Le Moal
0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2021-02-16 1:06 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: linux-fsdevel, kernel test robot
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 !
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-16 1:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 9:16 [PATCH] zonefs: fix build warning for s390 in tracepoints Johannes Thumshirn
2021-02-16 1:06 ` Damien Le Moal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.