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: 61878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2311848wrd; Mon, 27 Feb 2023 01:08:02 -0800 (PST) X-Google-Smtp-Source: AK7set998utNPyWX9Zz7hWRWGK9rZM5o5Yz1UeRNmPqpyWyfufoMz8rSOTqmAToqNxFBrfR3FRIN X-Received: by 2002:a17:907:7628:b0:8b1:7daf:6285 with SMTP id jy8-20020a170907762800b008b17daf6285mr32553023ejc.35.1677488882103; Mon, 27 Feb 2023 01:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677488882; cv=none; d=google.com; s=arc-20160816; b=RiD4wI+V75FJfOnoHncG/PGAZB0X5yyrXo6FDjQXyYet+rWK0jMqUat58IYDAsy4nQ IUaHKn9kSpWeg89ezdOHVd6TDT3gOFJCBTj+/0B2yXH/mHG5z5RSE+Ws/PpXZ+nnYxjF E6ZZAYUTVEhB4Ou9b5NdzPOU2WgJ72YuR4xCdpP3w/a0uxJesGnDQuDWOK2oODpTdMpX ikptGekhSL3iOyGOoXRPNzgg34t/pWe3utEWh/zvbpBKGrDWg/jpqlFzbEfTD21o49Wj M04v8T0r4ujq6HYaB47WUrgQFrFyrUhHtuMkZtCS+NA9uXhBqG+CtGDZ6/tNyYn0SIjo zMKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PCqdUAY0h83imjeGabfjW/J8LaGpizjAxwJbtA29z6I=; b=kdakzAT78OW0VKmrfPCYLt0f5UGE+WFnrP0owIoJKcr6UFaVi3Pw9dkSOCFhws7Gko UbVmezMs0poQgePPQjYWhwbGcdKHWFA2MXdiaKXbmlSgqKrejX8PmmYvwXFSwaEP/Nw9 fG1glCYWzcudu+gwNm0NdBT/1we70O9Lx8ecDeA1K7hxW36qwynaQo2zj5eSy4wfAX10 Zc6lhPTUVQ5UYiiWkjQnweoGKLPSCu+d2ZxTVddz2NLgpqRmSjrfUcTAukiw1vber8V8 tLlvioYkKdkSf2HfgWHDwg6Wfg7TshdLBmEatBV6RXGEMDYWcu5IikFVZZE/YQ/YZJ5F PVyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OR0I7qX+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020aa7dd06000000b004acc83a78aasi8597214edv.474.2023.02.27.01.07.39; Mon, 27 Feb 2023 01:08:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OR0I7qX+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbjB0JHH (ORCPT + 99 others); Mon, 27 Feb 2023 04:07:07 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758974582006543826?= X-GMAIL-MSGID: =?utf-8?q?1758974582006543826?= 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;