From patchwork Wed Nov 9 09:44:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Wensheng X-Patchwork-Id: 17437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp249555wru; Wed, 9 Nov 2022 02:08:34 -0800 (PST) X-Google-Smtp-Source: AMsMyM4sh5RB4/EhA9VGu/X4HWxYVAPCFWOJ4VSG/yjl6J6gatyG9fU9UicYYcTBAPO1jc6fNp62 X-Received: by 2002:a17:902:ef43:b0:186:99be:2ee9 with SMTP id e3-20020a170902ef4300b0018699be2ee9mr60145323plx.148.1667988514419; Wed, 09 Nov 2022 02:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667988514; cv=none; d=google.com; s=arc-20160816; b=n41hgoalBsfYWCIHp5vvqCiI4pZGK6rH1CGbuMSyDMNbGJlzLPNhaA+xkSe7m5c/X8 XcRDZ1C0o+ygS/i6ft20x0MAx4A9ZzK5hR6pcP4uVHqG3R32/mRj9zQkszrgxmkDQ71o 4v4EGUkTjt73OGq5rLjeYt3ydLsjnT3XXlfy0UHHi0dpfo90RxWTs3Wu1zjyJOUXAmuR YiBeU7LEK8ghOeM1KxHflUNs9pzVBPXfvKnvKdaFbodVLf/tt5V8a35l+k9zHcvk9H2z QB6MH0X5RYaFcLJoEIVqF88KRXuFd82xOLUu3XbSK1I4x5aRgl2KcpzGVXKZ1M2gr3oa A+1w== 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=/11jHGeP6ZAFv4FtHh51C6SGicTq1y2z2SFeQ+yILfo=; b=Hx6o2Z6eSrfj87l9kkEfQbsA3ZuYdc26fUGmfMB4rm/h+gkNy7bJVTTlDVq166AtEd zHPtozI4plOVU/9eYcQUMaIuv9nTyvEzjd/GgJtbj++w6IUFXP6CuqMzMKGuAFZrFIL0 tX0oyqFGKaggIMVKorDmfDiGQfySkJjEsMZ2A0EGx4tRBrriFT46ntlaz8U2QcuTjP7a JFlF/I5ddYMGTIoY0b6/l5JJoUe69P7uQFy+KjvNWqDwOK/13DOAZPeTor7Oq0dyx2To jfqyQBoyYQ8WRhpkUTteztUdaOZ28RdGeIhv3ONEhPRKnD5p/gdbIVG57BywoTH9Rf48 loXQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li13-20020a17090b48cd00b0020a1c6bb23csi968871pjb.74.2022.11.09.02.08.20; Wed, 09 Nov 2022 02:08:34 -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 S230001AbiKIJqU (ORCPT + 99 others); Wed, 9 Nov 2022 04:46:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbiKIJqO (ORCPT ); Wed, 9 Nov 2022 04:46:14 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70D8322BE4 for ; Wed, 9 Nov 2022 01:46:13 -0800 (PST) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N6g864XHkzmVpD; Wed, 9 Nov 2022 17:45:58 +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:11 +0800 From: Wang Wensheng To: , , , CC: , , Subject: [PATCH -next 3/3] ftrace: Delete unused variable ftrace_update_time Date: Wed, 9 Nov 2022 09:44:34 +0000 Message-ID: <20221109094434.84046-4-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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749012724552816283?= X-GMAIL-MSGID: =?utf-8?q?1749012724552816283?= ftrace_update_time is not used anywhere else after initialization. So delete it together with its initial code. Signed-off-by: Wang Wensheng --- kernel/trace/ftrace.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 43a958b28022..3e102c44b117 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3110,7 +3110,6 @@ int ftrace_shutdown(struct ftrace_ops *ops, int command) return 0; } -static u64 ftrace_update_time; unsigned long ftrace_update_tot_cnt; unsigned long ftrace_number_of_pages; unsigned long ftrace_number_of_groups; @@ -3130,13 +3129,10 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs) bool init_nop = ftrace_need_init_nop(); struct ftrace_page *pg; struct dyn_ftrace *p; - u64 start, stop; unsigned long update_cnt = 0; unsigned long rec_flags = 0; int i; - start = ftrace_now(raw_smp_processor_id()); - /* * When a module is loaded, this function is called to convert * the calls to mcount in its text to nops, and also to create @@ -3173,8 +3169,6 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs) } } - stop = ftrace_now(raw_smp_processor_id()); - ftrace_update_time = stop - start; ftrace_update_tot_cnt += update_cnt; return 0;