Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp880519ybg; Tue, 28 Jul 2020 23:27:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb6jzAtYTUmHZ0wzTzmRn0Esoz9SKMcmvJlQGQ/JmYJRb0HKB7fRLlshF0uOqeV8ct15jR X-Received: by 2002:a17:906:1d5b:: with SMTP id o27mr30822996ejh.367.1596004079366; Tue, 28 Jul 2020 23:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596004079; cv=none; d=google.com; s=arc-20160816; b=xxJFQ8YZKBFI4wnxepW8qkrFV8IxjyIos93GBaKfmGwrw3dWyxGnAtjg25fT72xBHF PLzegMsL7OuDTTg4jMfZp15YyhNF/evM18pEbJvrmIBolJfbZpz2Zh0+ln8cvhIN2Xbz HooVxKkdd3T8vY2/1ZpCRegMWYahVKidKnpfeoSwwOjDsxL3wVA3ylHQyLw6WOXO7e/+ 2eelJmoyC+SAe6uvjBA6FTA5tgoaRZFWb30Z6QttklNIVMLdwanDYDmpVAzy2tkq2qNU AX753lTqlM/s9QjO9AqATF79GPeWf9uPzWoGYDwajNaQgG7sTWKWhG5VTEcuzz++QI/3 /UFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GGiUP2bVq/JP9FTtUqNBNL3J94yI7DyjZeZtZ4EfQfQ=; b=FqmRsE5M588JC5KltVK+e8c5NBOPWMEDM7OVTAtEwTSn2pOnv7LknHgOPbVJrhDxuV 1UnCiLjeYVZTEaNHRDrOZg4cO+5A7nVB6vBzoJZ20KfbRURXzvwDOrZDoz6iqcdJUNk5 SzbUfYOtT70hyS0b5tGMpgbs9MivAwOUp3PDxT6yiQBcRaPr7ymvHdAHkaqoKa6EK1UV sgFhVDWUV6cDoLUxl5CuGqQWRW8MgFhQ9jATSDCk41gzmRRW6pgEzx0hpo564/Qf6kPe 7IW9uXkGvzREoXgM2LE7qjfF0mxkzFZaI25yBqiCr8fhnJ1RDF3TWrLArZP8WUoR7BxX +2DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=tZMAGxMG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gr23si478426ejb.132.2020.07.28.23.27.37; Tue, 28 Jul 2020 23:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=tZMAGxMG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbgG2G1U (ORCPT + 99 others); Wed, 29 Jul 2020 02:27:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727014AbgG2G1R (ORCPT ); Wed, 29 Jul 2020 02:27:17 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86CDBC061794 for ; Tue, 28 Jul 2020 23:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=GGiUP2bVq/JP9FTtUqNBNL3J94yI7DyjZeZtZ4EfQfQ=; b=tZMAGxMGzKmkk0aBD0W6dswI9H 6QN58eWQjJ4rjNIbGF9Vwtn6uc5MGS5R0FjceugXUy5hnSkTNJU/upS7H717TsDneDmAMM4h5hJ/7 j2x23JR4oa72C5CTEwwcejQAa5c1w7F1WXUZY80HRtHuld7wdc4f/VknPfNuEHQOFxWKsMsk8LPMa kQyA1p+uKSxEJBU/V+dd9KiKvCTlAhtaPOu01JTpRfveV6asfbS6Cfw+HLBr7UEXAPUeihU00Q2jt bUvhYtZUDTpwmwWcG2hPOnaU7n83wCMIHw2+gVx+Y7lW3EZaoM7j8tT5qqtTI8tHyXR/deI5stqa1 fC+A/OPw==; Received: from 089144218008.atnat0027.highway.a1.net ([89.144.218.8] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0fYZ-00040z-D5; Wed, 29 Jul 2020 06:27:15 +0000 From: Christoph Hellwig To: Jessica Yu Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/7] modules: mark find_symbol static Date: Wed, 29 Jul 2020 08:27:06 +0200 Message-Id: <20200729062711.13016-3-hch@lst.de> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200729062711.13016-1-hch@lst.de> References: <20200729062711.13016-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org find_symbol is only used in module.c. Signed-off-by: Christoph Hellwig --- include/linux/module.h | 11 ----------- kernel/module.c | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index f1fdbeef2153a8..90bdc362be3681 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -590,17 +590,6 @@ struct symsearch { bool unused; }; -/* - * Search for an exported symbol by name. - * - * Must be called with module_mutex held or preemption disabled. - */ -const struct kernel_symbol *find_symbol(const char *name, - struct module **owner, - const s32 **crc, - bool gplok, - bool warn); - /* * Walk the exported symbol table * diff --git a/kernel/module.c b/kernel/module.c index 17d64dae756c80..84da96a6d8241c 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -585,7 +585,7 @@ static bool find_exported_symbol_in_section(const struct symsearch *syms, /* Find an exported symbol and return it, along with, (optional) crc and * (optional) module which owns it. Needs preempt disabled or module_mutex. */ -const struct kernel_symbol *find_symbol(const char *name, +static const struct kernel_symbol *find_symbol(const char *name, struct module **owner, const s32 **crc, bool gplok, @@ -608,7 +608,6 @@ const struct kernel_symbol *find_symbol(const char *name, pr_debug("Failed to find symbol %s\n", name); return NULL; } -EXPORT_SYMBOL_GPL(find_symbol); /* * Search for module by name: must hold module_mutex (or preempt disabled -- 2.27.0