Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp813144rwb; Fri, 23 Sep 2022 04:38:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZIJaf1dZ2ksOXMkESchS7R/bJub7EwwdG/zCLMR1FfJ9LqYz84bghIbjAN/Hw+s2fy7A+ X-Received: by 2002:a17:902:d58a:b0:177:f86c:4456 with SMTP id k10-20020a170902d58a00b00177f86c4456mr8010266plh.171.1663933118974; Fri, 23 Sep 2022 04:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663933118; cv=none; d=google.com; s=arc-20160816; b=mFxs6H3pmRNiZ4W9xh9S9aPYOKnDrUcV+sa/RWcaSotB429TWipq99dJtHoug8crId i3HzffWjilx+8Cowb1nUrT2AiEYNPTgd4CbBbT2dBrMkbFRt1IISFeAgVx4UGq8+OHUS FfBw/eLWvKRcM/ar4kJ3etOajRmFx1JNtacjvXKcbfdVzC4mAgfiqCI1MtjqtDuQm3Qt M+yjuJywocuJw6TAl5qbjBlBN7DQY7xzG7IBDavRZMtXEdr1hJtOm/flvw2eF0w064zy 0z7qJXGPyqQfge+D3ZoetmbEcvVUG7lKZH7mqfyVHtC2LEL6JFomXaFSo2Ap+FoXKJ3L vwhQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CjKWmXXGZeeBF60WwNI/geJ9k7HRDlxgyGZT0KUqMns=; b=0aVsGUglZWPlMiHN5PHPbINom92q6++81Pan+t2zg/SHeunV1TFxZmocTB8P3xYvPU zJ7dEbY5DBbRcLrC0dkYK2W84f/6t0OoZdixnJh5TszVAa0oyFZNLvSM1XWDVO8tC5gw plB1E68vAPhepQe+PVFO0s34M7+x0dC3irvWtxsIlheb1gVPKu8M6cHm04AfUDs0p+jb csPH2gYt+3EtfG3/0h185YWjpy3jmVFI5ozEOdcxC42EXmd762TWsc2VqoZ3TZkXqG4D 3mXierCZa9xv2fTg7Vrf8/iP5FC/DIM6CKlPQQQN1vQAiC0iDeTrErB5Chdi4weK3gA6 d+bw== 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 5-20020a630f45000000b00439c388f82csi8450914pgp.820.2022.09.23.04.38.27; Fri, 23 Sep 2022 04:38:38 -0700 (PDT) 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 S232144AbiIWLWf (ORCPT + 99 others); Fri, 23 Sep 2022 07:22:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232163AbiIWLWD (ORCPT ); Fri, 23 Sep 2022 07:22:03 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 465C612755C; Fri, 23 Sep 2022 04:22:00 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MYqP70c8jzMpbD; Fri, 23 Sep 2022 19:17:15 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 23 Sep 2022 19:21:58 +0800 Received: from thunder-town.china.huawei.com (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 23 Sep 2022 19:21:57 +0800 From: Zhen Lei To: Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , , , Masahiro Yamada , Alexei Starovoitov , Jiri Olsa , Kees Cook , Andrew Morton , "Luis Chamberlain" , , "Steven Rostedt" , Ingo Molnar CC: Zhen Lei Subject: [PATCH v5 09/10] kallsyms: Delete an unused parameter related to kallsyms_on_each_symbol() Date: Fri, 23 Sep 2022 19:20:32 +0800 Message-ID: <20220923112033.1958-10-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20220923112033.1958-1-thunder.leizhen@huawei.com> References: <20220923112033.1958-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) 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 The parameter 'struct module *' in the hook function associated with kallsyms_on_each_symbol() is no longer used. Delete it. Suggested-by: Petr Mladek Signed-off-by: Zhen Lei --- include/linux/kallsyms.h | 3 +-- kernel/kallsyms.c | 5 ++--- kernel/trace/ftrace.c | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 2138219ae0296e9..015c7685765978e 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -66,8 +66,7 @@ static inline void *dereference_symbol_descriptor(void *ptr) } #ifdef CONFIG_KALLSYMS -int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *, - unsigned long), +int kallsyms_on_each_symbol(int (*fn)(void *, const char *, unsigned long), void *data); int kallsyms_on_each_match_symbol(int (*fn)(void *, unsigned long), const char *name, void *data); diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 398865f01360589..69e040204ed4ebd 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c @@ -344,8 +344,7 @@ unsigned long kallsyms_lookup_name(const char *name) * Iterate over all symbols in vmlinux. For symbols from modules use * module_kallsyms_on_each_symbol instead. */ -int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *, - unsigned long), +int kallsyms_on_each_symbol(int (*fn)(void *, const char *, unsigned long), void *data) { char namebuf[KSYM_NAME_LEN]; @@ -355,7 +354,7 @@ int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *, for (i = 0, off = 0; i < kallsyms_num_syms; i++) { off = kallsyms_expand_symbol(off, namebuf, ARRAY_SIZE(namebuf)); - ret = fn(data, namebuf, NULL, kallsyms_sym_address(i)); + ret = fn(data, namebuf, kallsyms_sym_address(i)); if (ret != 0) return ret; cond_resched(); diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 439e2ab6905ee1e..f135a0a334a3fcb 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -8250,8 +8250,7 @@ struct kallsyms_data { size_t found; }; -static int kallsyms_callback(void *data, const char *name, - struct module *mod, unsigned long addr) +static int kallsyms_callback(void *data, const char *name, unsigned long addr) { struct kallsyms_data *args = data; const char **sym; -- 2.25.1