From nobody Fri Apr 3 11:18:02 2026 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 40E89ECAAD8 for ; Wed, 14 Sep 2022 11:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbiINL5e (ORCPT ); Wed, 14 Sep 2022 07:57:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiINL5c (ORCPT ); Wed, 14 Sep 2022 07:57:32 -0400 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01E873FA09 for ; Wed, 14 Sep 2022 04:57:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VPnFGbQ_1663156646; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VPnFGbQ_1663156646) by smtp.aliyun-inc.com; Wed, 14 Sep 2022 19:57:27 +0800 From: Xin Hao To: sj@kernel.org Cc: akpm@linux-foundation.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, xhao@linux.alibaba.com Subject: [PATCH] mm/hugetlbfs: use macro SZ_1K to replace 1024 Date: Wed, 14 Sep 2022 19:57:23 +0800 Message-Id: <20220914115723.38271-1-xhao@linux.alibaba.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Using macro SZ_1K in hugetlbfs_show_options() has no any functional changes, just makes code more readable. Signed-off-by: Xin Hao Reviewed-by: SeongJae Park --- fs/hugetlbfs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index f7a5b5124d8a..9b9784ffe8de 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -1023,10 +1023,10 @@ static int hugetlbfs_show_options(struct seq_file *= m, struct dentry *root) if (sbinfo->max_inodes !=3D -1) seq_printf(m, ",nr_inodes=3D%lu", sbinfo->max_inodes); - hpage_size /=3D 1024; + hpage_size /=3D SZ_1K; mod =3D 'K'; - if (hpage_size >=3D 1024) { - hpage_size /=3D 1024; + if (hpage_size >=3D SZ_1K) { + hpage_size /=3D SZ_1K; mod =3D 'M'; } seq_printf(m, ",pagesize=3D%lu%c", hpage_size, mod); -- 2.31.0