Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2696985pxj; Mon, 10 May 2021 08:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKnc0Yc77ZPaUYxo7a6AJvBV0zOWinLeULZuCMWXKD2zd9z7EjZkrzmZZ0XxyK5Wg9I/Aq X-Received: by 2002:a5d:8b09:: with SMTP id k9mr18203419ion.185.1620661531893; Mon, 10 May 2021 08:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620661531; cv=none; d=google.com; s=arc-20160816; b=UHG2b9MJA8nYeXwb5c0Kf951+EBvcV/SIKZGDPGSjLMHTL3TC9Nu7UbsCpbdXYm+ZY PID5RTrVCL6vaNI4eEBRDQZF73lColR+5Is5wU0sURriiNv5JnUdfR31jSW7Hg/6NeG0 1zeeNg6/VUOb2+mv7vARQEoh6TArS78iWvE5SYDKx0yQwbDds0gLQdQKOyOlLNhYybIP hd/OMTlb0yvYT8WO1FCjG3vXuP90ZHjV2heHl6RWlFIEF6Lf7zm8Iy1PRq0KyOKRibJX sUsM7BGygjWtK3RSbUf61HQVKsbIsAa5aSlkIpGGX3Yk5DyBTkHxUHTKT7dEndYawaOH hMIA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=46K8WgReeLk3vwr+rHo0w1YqL9N5qds1QcS7Zkv9AVo=; b=uA+1zaBI3s8IH5V7aG7726T3BqICYIr13kzXeX0Gz+FOhnYIjZH8tV9gsPepedg7Ak +LJkbmDeJuWJ0N8kqYSiMQf0gEnAeqDzr+lc39sAouD5suWa3w96SHO/yCy6K+8oB9db 4fxMcOJtG1puJBFmxN88xmm6nNTR6MgDwCXCZfvhRycbdxKgUbn3FOuCp/FmI/CIxOyt zGBBummwH0I1xTi29sZrbljZK0ub7SzWyEF+PKwrvIbFOPyRDWZnfWbUPeKS10O6xNEg NS3rPktwF6wQmbi7Mo1RNA4Ej5zGARCIkuoD99RKEdAYrY96MImFWHesRikniYRhW9LP Ii/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fogTaaj0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si15032358ill.127.2021.05.10.08.45.19; Mon, 10 May 2021 08:45:31 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=fogTaaj0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231376AbhEJK0G (ORCPT + 99 others); Mon, 10 May 2021 06:26:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:58800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231130AbhEJKZ0 (ORCPT ); Mon, 10 May 2021 06:25:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B754161139; Mon, 10 May 2021 10:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642261; bh=3f0TJxPQjCm5jkHfdWHDx8VWCWYUkU4GnkBcEftDxho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fogTaaj0zTH0UuL9OtySWwLw3YWnSCR0NWQvmOUW5p6oyh177jGnbsMA1IlY6IpqC ydSXImEqYTMBhGjoW5D+Zlw1ddmG/PHdKuJJrlpKK1olEwzWBT0r9CkIcZd0oFPwBH dYefZkYsMSrynFi326xKdgRAS5LRCGX3Bc5jpySA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Jessica Yu Subject: [PATCH 5.4 024/184] modules: mark ref_module static Date: Mon, 10 May 2021 12:18:38 +0200 Message-Id: <20210510101951.028735728@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510101950.200777181@linuxfoundation.org> References: <20210510101950.200777181@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig commit 7ef5264de773279b9f23b6cc8afb5addb30e970b upstream. ref_module isn't used anywhere outside of module.c. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu Signed-off-by: Greg Kroah-Hartman --- include/linux/module.h | 1 - kernel/module.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) --- a/include/linux/module.h +++ b/include/linux/module.h @@ -636,7 +636,6 @@ static inline void __module_get(struct m #define symbol_put_addr(p) do { } while (0) #endif /* CONFIG_MODULE_UNLOAD */ -int ref_module(struct module *a, struct module *b); /* This is a #define so the string doesn't get put in every .o file */ #define module_name(mod) \ --- a/kernel/module.c +++ b/kernel/module.c @@ -867,7 +867,7 @@ static int add_module_usage(struct modul } /* Module a uses b: caller needs module_mutex() */ -int ref_module(struct module *a, struct module *b) +static int ref_module(struct module *a, struct module *b) { int err; @@ -886,7 +886,6 @@ int ref_module(struct module *a, struct } return 0; } -EXPORT_SYMBOL_GPL(ref_module); /* Clear the unload stuff of the module. */ static void module_unload_free(struct module *mod) @@ -1167,11 +1166,10 @@ static inline void module_unload_free(st { } -int ref_module(struct module *a, struct module *b) +static int ref_module(struct module *a, struct module *b) { return strong_try_module_get(b); } -EXPORT_SYMBOL_GPL(ref_module); static inline int module_unload_init(struct module *mod) {