Message ID | 20231124142617.713096-1-masahiroy@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1241819vqx; Fri, 24 Nov 2023 06:26:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3ZMl/bA2UGZje4hGBjKBZOI10Va0ee97ZIsxovYrI9pVVyeZvb4yqyrWbiY171Mx9h5t7 X-Received: by 2002:a05:6a20:2447:b0:18c:23b0:39bd with SMTP id t7-20020a056a20244700b0018c23b039bdmr260394pzc.16.1700836007265; Fri, 24 Nov 2023 06:26:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700836007; cv=none; d=google.com; s=arc-20160816; b=H+1Qa+SWXLasxRlkfO7Vs2Q89kz84wZwWUWPblsO49FN5MiFxkMYN3vQSxp67KMD85 4ETqyUCOfqAHkwZQXooqStDrLvTDla0oqjc/APfvt1bg8EGM3La9mCMxnxC7/xxkx8yP EC29iu2n+0giOHS8zW9j1LfT91cP0aJz0RT8d+tclbcWsfxFdpUb8BmwpX+//GPEZBxu KwoSMEEELxaecyPHvC1wQwXo9OMsWnAECrXwVjx3Zs39+LDSnz/zFeYJSPOw1cMHRBFB cBu9cHjH12KJGKA9HrV2olhPaMEplKMQMIFPOEEe3Ez2KtzpT7hraNqLZrGdscftL8z6 BdTQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wYMG8jVqFyWtWDa8XYyB07LZh/3SV2hIlteL5+zeM1w=; fh=PRI/lXeLgjgxd/idLJjUwZt/W/jj8tms4WRf9mO5BM0=; b=Sdjc/hDGjOFo/2ul/a7zY7cXDzef5y0cSjPTgnNUzvsZBsCKvgvxF0uoetP/S+trRH EGPz/T6Oed0KdAZBZvbzlWyjgIsXlGO978FjlJ8fVobUTV9gFO2VeHd5PWEroZ0zSB3N qXAKKSYrXCcuT4e9uaTWRQVhXMef0oRX8mr96Ido+9SOpacf7PoGr07LdRXCMmBmI5y2 IohuhJRseUETrdqQuMoEz7VbYSg1+803RjS0Lyk6K0tLbERgWDH8eYNoFP5AgV2x9DL+ r4qae4bv5MstkI52mnIGkZs8r1SccTzuVhIRaUEKz4yoV7IjhEaCYHLiC6c+w0bXGv0Q GlNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QQn8bLdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id a9-20020a63e409000000b005bdd6196f4asi3567968pgi.392.2023.11.24.06.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 06:26:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QQn8bLdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 9F46783CC583; Fri, 24 Nov 2023 06:26:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230104AbjKXO0V (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Fri, 24 Nov 2023 09:26:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjKXO0T (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Nov 2023 09:26:19 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A3F3199B for <linux-kernel@vger.kernel.org>; Fri, 24 Nov 2023 06:26:26 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F411DC433CD; Fri, 24 Nov 2023 14:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700835985; bh=E7iTdKu4fn1Ymumq/Ib66iyMm8jI92wsu47IFm8eWg8=; h=From:To:Cc:Subject:Date:From; b=QQn8bLdOcSteKKI4NoxTvR1kXBkQiIFnmnQfkvqFiTC35sbPSgGlsFkbwZJGoJC6H eV67CPPIYP6ETHFZjCkemDsMvmYV0HlmNbzguszrB+bkC6JK1o306y0i6OnOu0JMHN 2bepf+TBMBQi0mO9wJ6Mf4/o249odpT0t89kCoG7j9c7AhtXjfgLpNtq8ciPHNnAPI IYtScnGAg7RUFe6o4lUv0AMzx1Oxgv93pQFxWD58u8XsCpglvAVxiU7Myw4Hcg0+4+ 6T6VuRKCHg0J+kvueF5ePAptcHH8WjxzldJmaFuUywewcW08RFKeAZr2EADTG3Dtok cWEVVIa+aixmg== From: Masahiro Yamada <masahiroy@kernel.org> To: rust-for-linux@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>, Alex Gaynor <alex.gaynor@gmail.com>, Alice Ryhl <aliceryhl@google.com>, Andreas Hindborg <a.hindborg@samsung.com>, Benno Lossin <benno.lossin@proton.me>, =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>, Boqun Feng <boqun.feng@gmail.com>, Gary Guo <gary@garyguo.net>, Miguel Ojeda <ojeda@kernel.org>, Wedson Almeida Filho <wedsonaf@gmail.com> Subject: [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c Date: Fri, 24 Nov 2023 23:26:17 +0900 Message-Id: <20231124142617.713096-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 24 Nov 2023 06:26:39 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783455816819662980 X-GMAIL-MSGID: 1783455816819662980 |
Series |
rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c
|
|
Commit Message
Masahiro Yamada
Nov. 24, 2023, 2:26 p.m. UTC
<linux/export.h> is the right header to include for using
EXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
rust/exports.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, Nov 24, 2023 at 3:26 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > <linux/export.h> is the right header to include for using > EXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Good catch, thanks! Cheers, Miguel
On 11/24/23 11:26, Masahiro Yamada wrote: > <linux/export.h> is the right header to include for using > EXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> > --- > [...] > > -#include <linux/module.h> > +#include <linux/export.h> > > [...] I'll use this in my crates patch. Regardless, LGTM. Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
On Fri, Nov 24, 2023 at 3:26 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > <linux/export.h> is the right header to include for using > EXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Applied to `rust-next`. Thanks everyone! Cheers, Miguel
diff --git a/rust/exports.c b/rust/exports.c index 83e2a7070cae..3803c21d1403 100644 --- a/rust/exports.c +++ b/rust/exports.c @@ -11,7 +11,7 @@ * accidentally exposed. */ -#include <linux/module.h> +#include <linux/export.h> #define EXPORT_SYMBOL_RUST_GPL(sym) extern int sym; EXPORT_SYMBOL_GPL(sym)