[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20230227141918.cc6ef681c32d79778595d06b@linux-foundation.org>
Date: Mon, 27 Feb 2023 14:19:18 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Minchan Kim <minchan@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Jens Axboe <axboe@...nel.dk>, 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: Re: [PATCH] zram: fix 32-bit atomic_long_t print
On Mon, 27 Feb 2023 09:56:21 +0100 Arnd Bergmann <arnd@...nel.org> wrote:
> 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;
Thanks. I'm using the slightly different fix from Geert:
https://lkml.kernel.org/r/20230225121523.3288544-1-geert+renesas@glider.be
Powered by blists - more mailing lists