[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230227085629.2362316-1-arnd@kernel.org>
Date: Mon, 27 Feb 2023 09:56:21 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jens Axboe <axboe@...nel.dk>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Arnd Bergmann <arnd@...db.de>, Jan Kara <jack@...e.cz>,
Alexey Romanov <avromanov@...rdevices.ru>,
Brian Geffon <bgeffon@...gle.com>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Subject: [PATCH] zram: fix 32-bit atomic_long_t print
From: Arnd Bergmann <arnd@...db.de>
The type used to print &pool_stats.objs_moved is inconsistent with the
definition:
drivers/block/zram/zram_drv.c: In function 'mm_stat_show':
drivers/block/zram/zram_drv.c:1234:44: error: passing argument 1 of 'atomic64_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
Change the printing code to match.
Fixes: b7d89654a988 ("zram: show zsmalloc objs_moved stat in mm_stat")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 3194e9254c6f..5c4ac0d3e850 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1231,7 +1231,7 @@ static ssize_t mm_stat_show(struct device *dev,
atomic_long_read(&pool_stats.pages_compacted),
(u64)atomic64_read(&zram->stats.huge_pages),
(u64)atomic64_read(&zram->stats.huge_pages_since),
- (u64)atomic64_read(&pool_stats.objs_moved));
+ (u64)atomic_long_read(&pool_stats.objs_moved));
up_read(&zram->init_lock);
return ret;
--
2.39.2
Powered by blists - more mailing lists