mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Jens Axboe <axboe@kernel.dk>, Arnd Bergmann <arnd@arndb.de>,
	Jan Kara <jack@suse.cz>,
	Alexey Romanov <avromanov@sberdevices.ru>,
	Brian Geffon <bgeffon@google.com>,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] zram: fix 32-bit atomic_long_t print
Date: Mon, 27 Feb 2023 14:19:18 -0800	[thread overview]
Message-ID: <20230227141918.cc6ef681c32d79778595d06b@linux-foundation.org> (raw)
In-Reply-To: <20230227085629.2362316-1-arnd@kernel.org>

On Mon, 27 Feb 2023 09:56:21 +0100 Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.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@arndb.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

      reply	other threads:[~2023-02-27 22:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27  8:56 Arnd Bergmann
2023-02-27 22:19 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230227141918.cc6ef681c32d79778595d06b@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=avromanov@sberdevices.ru \
    --cc=axboe@kernel.dk \
    --cc=bgeffon@google.com \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®