From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7BD38C433F5 for ; Wed, 16 Mar 2022 15:41:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 428A683C91; Wed, 16 Mar 2022 16:41:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="P1Er1WTD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F1DAF83CB1; Wed, 16 Mar 2022 16:41:13 +0100 (CET) Received: from mail-wm1-x34a.google.com (mail-wm1-x34a.google.com [IPv6:2a00:1450:4864:20::34a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C01D183A2B for ; Wed, 16 Mar 2022 16:40:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=3CwUyYgUKBvQlpkoeckkcha.Ykiq-Xkkpheopo.Zajt.Za@flex--ptosi.bounces.google.com Received: by mail-wm1-x34a.google.com with SMTP id o19-20020a05600c379300b0038c7117460dso630913wmr.6 for ; Wed, 16 Mar 2022 08:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=g07R+DF1pYIjwmiAg3DzIz3UqsguSmM3cGMTAu2voLs=; b=P1Er1WTDKtgIZSjxMWSGnWPtyrpKygV+DgOjxNUhZJqmJicZhFmnC6QjyqF7VCHHGQ byPcOK08mu53EtPTGLRpqFo310cjRm8fQuLPO7tqkdD2exjUrPkMlFlql7uKFCIhBwX/ bG+GD/bCf2CE8KlJlKBcjS2MpgDsCxx/99Gnrnd3CqxJfLyRr/rO9+i6N0uFMofuxxFn /ozVxF2vMbVKnptBDQrLplwp5PO45tc2KiHodEEc95lnwW8kY+CVb7cz3tgzlSx1zdkb Nua0u21tWYJjepyKS9hzFqc01mS3g8fzDiRQYFFefG5JTYGm0NNwnroBbZdAp8jPmxHM xI7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=g07R+DF1pYIjwmiAg3DzIz3UqsguSmM3cGMTAu2voLs=; b=xJFfbEwCpAY3WCsMO/qUeI28EP5PQd74sfIDVoS6VQ9eUcWEar0NjmKnHIykMVoxq6 iM/pZBlAWyyK4RkI8r+GWTOPGuHzHXGCi7rEubly26HJchg/CUz4v+p06+GdKiQhi5cb lXHRYr7KiVMVoIdvhdulJpgORYWGWgdNm3E04HV+HD9sSl2rUmaTSGMvcHpvSC763CKv aYiIrDJmGqNXixDpqPoWezvEr9d4DKpGq3g5u6WDcdWSrXdppMAUMeyqpJ+nq3HVXJmR 8vi3Oe9GuaYTY8mpBsD/hoOkohaeuvRritNfnAPIfkTMW1skoqUuH3vtDgheeA+Btaav NVMQ== X-Gm-Message-State: AOAM532sVXRRN+g322hGr0mX1VI06tJYCppWIooOQBEe727FXa7PC+yi 6KFwRtbMK3o0Xa3L+/xI5KZwBdcjRpnzWT6qkmYX/tKuefavmRxlor0wEub7eMNENom3fFrZIvz c45dd5ppvrKM3yaSM5S13z13H88rM2xHUjRR3FcRzTVUQ03kW/yokaq48 X-Google-Smtp-Source: ABdhPJxgqkRk/i4F51y1V50vNT+osMX2Q1NIU21Bo4SN6Eho8RPtsc0FbEyv8TDIrUmrKyN9chmmnMElQw== X-Received: from ptosi1.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:afb]) (user=ptosi job=sendgmr) by 2002:a05:600c:2053:b0:38a:eb7:4ab2 with SMTP id p19-20020a05600c205300b0038a0eb74ab2mr7853961wmg.58.1647445259366; Wed, 16 Mar 2022 08:40:59 -0700 (PDT) Date: Wed, 16 Mar 2022 15:39:45 +0000 In-Reply-To: <20220316153948.197650-1-ptosi@google.com> Message-Id: <20220316153948.197650-6-ptosi@google.com> Mime-Version: 1.0 References: <20220316153948.197650-1-ptosi@google.com> X-Mailer: git-send-email 2.35.1.723.g4982287a31-goog Subject: [PATCH 6/9] include: Carve out of compat.h From: "=?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?=" To: u-boot@lists.denx.de Cc: "=?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?=" , Simon Glass , Tom Rini Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean As Linux source code might include that header directly and as it is a simple "leaf header" (probably won't include other headers) that is unlikely to be relevant to U-Boot, replicate the upstream header definitions in a dedicated and include it in the pre-existing compat.h for existing users. Signed-off-by: Pierre-Cl=C3=A9ment Tosi Cc: Simon Glass Cc: Tom Rini --- include/linux/compat.h | 4 +--- include/linux/export.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 include/linux/export.h diff --git a/include/linux/compat.h b/include/linux/compat.h index 3d0acbd582..d34f2ebdf4 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -9,6 +9,7 @@ =20 #include #include +#include #include =20 #ifdef CONFIG_XEN @@ -175,13 +176,10 @@ typedef unsigned long blkcnt_t; #endif =20 /* module */ -#define THIS_MODULE 0 #define try_module_get(...) 1 #define module_put(...) do { } while (0) #define module_init(...) #define module_exit(...) -#define EXPORT_SYMBOL(...) -#define EXPORT_SYMBOL_GPL(...) #define module_param(...) #define module_param_call(...) #define MODULE_PARM_DESC(...) diff --git a/include/linux/export.h b/include/linux/export.h new file mode 100644 index 0000000000..31111bcd35 --- /dev/null +++ b/include/linux/export.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _LINUX_EXPORT_H +#define _LINUX_EXPORT_H + +/* + * Export symbols from the kernel to modules. Forked from module.h + * to reduce the amount of pointless cruft we feed to gcc when only + * exporting a simple symbol or two. + * + * Try not to add #includes here. It slows compilation and makes kernel + * hackers place grumpy comments in header files. + */ + +#ifndef __ASSEMBLY__ + +#define THIS_MODULE 0 + +#define EXPORT_SYMBOL(...) +#define EXPORT_SYMBOL_GPL(...) +#define EXPORT_SYMBOL_NS(...) +#define EXPORT_SYMBOL_NS_GPL(...) + +#endif /* !__ASSEMBLY__ */ + +#endif /* _LINUX_EXPORT_H */ --=20 2.35.1.723.g4982287a31-goog