Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp266177rwb; Wed, 9 Nov 2022 02:05:27 -0800 (PST) X-Google-Smtp-Source: AMsMyM76gHGuk5pokEI9wnPDeXCYP9pR2Xd1NdBQtYscJRbO5qNWWM9oKiTborD0SZAaNaw1FDOL X-Received: by 2002:a17:906:fe46:b0:73d:939a:ec99 with SMTP id wz6-20020a170906fe4600b0073d939aec99mr56991427ejb.169.1667988327769; Wed, 09 Nov 2022 02:05:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667988327; cv=none; d=google.com; s=arc-20160816; b=SQ3iTQQketUbMN2nFsIJBxazmcsLfPc+nzPZ4g0wrOu3sXvFuPOwoE5hBgqKv1o10N 9uOhvAaveoZfOdKhzsLlsbAmVUcUCQE3afACrTfbpWLs4bVCYCw4c5UHW/so9uHhuvMd VN9Y4rL9LUM86Io9NtM02CTBU4Y0hf2SWJIyDlSp2wnABenUBTUHbSju/0R4pjK544YM kskerD9HtxUXFmXpmVSOjdrOZzd3AB9JEkT6HNBGX7FHLtLBIPGCQM+YPMeTN6nDJzqX pBGFDPEd9I3w/aKMV6rOjlJsjvKii/j6pw2QjgdlfLnDlCj8hYRTke9f/rfyxt3BW8Aq 224Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=PZNvCU3Ymtnf9fgVZJ7ydhcREOHqsYmmeDoReQpwyxY=; b=N8Zp/caZN885KEbmlOTRLoWRXLWfJWexwFN8svtgHGhe01gUap9Ig6nu4Ma3JQLhzC xe1XtvDKEEgb/3TPa/c4DVpWX36EEWGVbR08EAqSvc5lJtABBpRBcGyIVWKojr1k53c7 xHVP0B17iWtyxUB9FbST5+FBbtvopedN911IjEfbxwK3Se3fGwFopeTtlYzJD7e/A8ve KzZJPLS0vu4thQjjDf5UVmiZMDKkzVRptgIrQSGO5glI+7jQo1WVpjCC6JbDS5W2X8J3 ifJnzwVXb4b0eEr+tLsyfoUE8gp2xCg6LfxJCzn58g4PCDJe3EV5GPQicvUNiGsls/fZ WQdg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs37-20020a1709072d2500b0078dcd448f99si14619931ejc.855.2022.11.09.02.05.02; Wed, 09 Nov 2022 02:05:27 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230003AbiKIJqQ (ORCPT + 94 others); Wed, 9 Nov 2022 04:46:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbiKIJqN (ORCPT ); Wed, 9 Nov 2022 04:46:13 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B04A2315D for ; Wed, 9 Nov 2022 01:46:12 -0800 (PST) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N6g851dHdzmVkh; Wed, 9 Nov 2022 17:45:57 +0800 (CST) Received: from huawei.com (10.175.112.208) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 17:46:09 +0800 From: Wang Wensheng To: , , , CC: , , Subject: [PATCH -next 1/3] ftrace: Fix the possible incorrect kernel message Date: Wed, 9 Nov 2022 09:44:32 +0000 Message-ID: <20221109094434.84046-2-wangwensheng4@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221109094434.84046-1-wangwensheng4@huawei.com> References: <20221109094434.84046-1-wangwensheng4@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,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 If the number of mcount entries is an integer multiple of ENTRIES_PER_PAGE, the page count showing on the console would be wrong. Signed-off-by: Wang Wensheng --- kernel/trace/ftrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index fbf2543111c0..c571c2813c11 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -7401,7 +7401,7 @@ void __init ftrace_init(void) } pr_info("ftrace: allocating %ld entries in %ld pages\n", - count, count / ENTRIES_PER_PAGE + 1); + count, DIV_ROUND_UP(count, ENTRIES_PER_PAGE)); ret = ftrace_process_locs(NULL, __start_mcount_loc, -- 2.17.1