Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5988638ybe; Tue, 10 Sep 2019 11:48:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZ2Ls1+GetTH+o7rcOdKx7i3SfESV9swIz/oEAv+lQ5BqdTDTDeVsheavbnNvTA1gMtrzR X-Received: by 2002:aa7:cd6f:: with SMTP id ca15mr5750887edb.172.1568141306275; Tue, 10 Sep 2019 11:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568141306; cv=none; d=google.com; s=arc-20160816; b=MOudZnXhp4LhPtXA08nIhqdhHHxCJSiFwBDqj06Ivl6JZShW2LkpuiMBHFn1M+jKDy nGEhBoBZw8y15LQx+ixU5IHEDFcAHZIQkk7o6swKTJqLYbBvWGmtY3+zZmERDdubf1FW WPwmA57LHBYQaEUoSzW5ceX541PY/07Cbp4R3SvnnG13HRrCvNgqTqSbFbC0GEtxMwbe J2JFSH6IIh47TIo3y3ZK69IfAfrnXbJ4Otue0zvGZnt45a6bjvlWXdveYBthZ0o4MShh 4J5YPHXNUHFH7eCrpfEajj3lUeywluGfmHrR0Eq0l5BzElRb6LNvsg3XnRIEJsZTw28M aQ/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=a157QSKkFHFQDXKrnSwhaYkEU7C+AFGKYmKxUEaX5bo=; b=tB8+g9GsQEo/TQ+lvNpGdmu8iEJjuz4Fmlp5O0bdA47OqR40MI4T0bMNIxCA15gYRJ YCAEPd/0bd8BOtreeP5Le4XlwXZaSKlnGOenaRDytYxXcu/q1jgSB/dBwRCd9/2JmpwE 7a/5HjZGpIn8E7lBlVZoZk0xASeLto99ZzHkubYUsgNeRf04qzas2KAixk7ej+eJf19V +ig6xx96d93mFi2gUwgaPff1qoaydQeX3tQvXvGoP1HCam7ozzGOCcybnEywLMSVUI3U +VTz2sKzkz/V+4E3VTzgmPVcy3aYwFsomz5C92uHP1v98NbL6BVTpXOk4c4xcX4ght8l uzfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JZZSPS+A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si9129238edp.306.2019.09.10.11.48.02; Tue, 10 Sep 2019 11:48:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JZZSPS+A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392543AbfIJCLB (ORCPT + 99 others); Mon, 9 Sep 2019 22:11:01 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:52635 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388705AbfIJCLB (ORCPT ); Mon, 9 Sep 2019 22:11:01 -0400 Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x8A2ArGG023752; Tue, 10 Sep 2019 11:10:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x8A2ArGG023752 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1568081454; bh=a157QSKkFHFQDXKrnSwhaYkEU7C+AFGKYmKxUEaX5bo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JZZSPS+AC3StfV68me3abXJZiev8jTHnNFd4zr/HIVlSxk0sA5TLIa28Ulqdj/RhI lDEwI6QFQ4TwskOFmjIcI16sgtGpunt9xsVAQk0I54VUuHb9x43C/lq6+mZsByYdkw 5xf5Va1PC8NY7jtvDvHSnhSkjfVZZIQL7n5/La+dgHFR63kPuR+OBYWeXTzRPTio6G FfKtnTss8C4zwVN3pSZtCVY+L/HV7umiS8GaQrI9lWG3GBOfeBw+ofc6Hm53dAZuvm zhQVgEf5ZRyc9fNttLvfd3qw4d/D1Zcy1R3ghhNf04FBPRJWfA1B4oupFsCQ7eoo2q bqP+ZDGLLCfMQ== X-Nifty-SrcIP: [209.85.217.47] Received: by mail-vs1-f47.google.com with SMTP id u21so10178495vsl.10; Mon, 09 Sep 2019 19:10:53 -0700 (PDT) X-Gm-Message-State: APjAAAUHTYx1JWw2/mFiP11ECzUVfFdYa00oK+PLT9pClwM6LwEuM1un 6cqoXp3Wsg76MX/gx+z2Yj/wkVn5ovVDGa6l70U= X-Received: by 2002:a67:f496:: with SMTP id o22mr14372435vsn.179.1568081452893; Mon, 09 Sep 2019 19:10:52 -0700 (PDT) MIME-Version: 1.0 References: <20190909105317.20473-1-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Tue, 10 Sep 2019 11:10:16 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] export.h: remove defined(__KERNEL__) To: Nicolas Pitre Cc: Linux Kbuild mailing list , Arnd Bergmann , Denis Efremov , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 10, 2019 at 1:06 AM Nicolas Pitre wrote: > > On Mon, 9 Sep 2019, Masahiro Yamada wrote: > > > Hi Nicolas, > > > > On Mon, Sep 9, 2019 at 10:48 PM Nicolas Pitre wrote: > > > > > > On Mon, 9 Sep 2019, Masahiro Yamada wrote: > > > > > > > This line was touched by commit f235541699bc ("export.h: allow for > > > > per-symbol configurable EXPORT_SYMBOL()"), but the commit log did > > > > not explain why. > > > > > > > > CONFIG_TRIM_UNUSED_KSYMS works for me without defined(__KERNEL__). > > > > > > I'm pretty sure it was needed back then so not to interfere with users > > > of this file. My fault for not documenting it. > > > > Hmm, I did not see a problem in my quick build test. > > > > Do you remember which file was causing the problem? > > If you build commit 7ec925701f5f with CONFIG_TRIM_UNUSED_KSYMS=y and the > defined(__KERNEL__) test removed then you'll get: > > HOSTCC scripts/mod/modpost.o > In file included from scripts/mod/modpost.c:24: > scripts/mod/../../include/linux/export.h:81:10: fatal error: linux/kconfig.h: No such file or directory > > > Nicolas Thanks for explaining this. It is not the case any more. I will reword the commit message as follows: ------------------------>8--------------------------------------- export.h: remove defined(__KERNEL__), which is no longer needed The conditional define(__KERNEL__) was added by commit f235541699bc ("export.h: allow for per-symbol configurable EXPORT_SYMBOL()"). It was needed at that time to avoid the build error of modpost with CONFIG_TRIM_UNUSED_KSYMS=y. Since commit b2c5cdcfd4bc ("modpost: remove symbol prefix support"), modpost no longer includes linux/export.h, thus the define(__KERNEL__) is unneeded. ------------------------>8--------------------------------------- -- Best Regards Masahiro Yamada