From patchwork Mon Feb 27 08:56:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13153112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38E7AC64ED6 for ; Mon, 27 Feb 2023 09:07:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229865AbjB0JHG (ORCPT ); Mon, 27 Feb 2023 04:07:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjB0JGs (ORCPT ); Mon, 27 Feb 2023 04:06:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6179330C8; Mon, 27 Feb 2023 00:57:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 29DC5B80CAE; Mon, 27 Feb 2023 08:56:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8899C433EF; Mon, 27 Feb 2023 08:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677488195; bh=hZFXPE1G1IOogWxssAFdNmsEjPCefrDxFpP6NdmV6Bs=; h=From:To:Cc:Subject:Date:From; b=OR0I7qX+Fp3CMPL4kNqPkMgb2XWqa2PhPO2ypF3yNw11COAb3YriGBaEOqf6XRYX2 c+f8DfetqdyxBn50OA05mMF59vvsjAL1m7vSYE/UON40LaKlOFOAXCfby4DF6DmHK0 ONH3od0HFZ2+eXh6x/WteokRFOhCsUVmRHfLF1BKgWAVTNGjUDrtL03/nOmb6TmfWi lPRbRC0s4x7ZsmhF0KWUoG/1rWP6ddd3AIi72G2Z/4z5r0l1Vtz2xggDpoyY3GGPbJ iFnsxzPw7pl9XleeBwhZauuSnBoaZtyX7Ri4W+lqv8oNl4ArYOmEUJ3o5HjxPCmCZU D87hW1pV7WgHA== From: Arnd Bergmann To: Minchan Kim , Sergey Senozhatsky , Jens Axboe , Andrew Morton Cc: Arnd Bergmann , Jan Kara , Alexey Romanov , Brian Geffon , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH] zram: fix 32-bit atomic_long_t print Date: Mon, 27 Feb 2023 09:56:21 +0100 Message-Id: <20230227085629.2362316-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Arnd Bergmann 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 --- 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;