All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-kbuild@vger.kernel.org,
	Lucas De Marchi <lucas.de.marchi@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Michal Marek <michal.lkml@markovi.net>,
	Vishal Verma <vishal.l.verma@intel.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] modpost: add an option to suppress 'exported twice' warnings
Date: Wed, 06 Nov 2019 09:34:02 -0500	[thread overview]
Message-ID: <x49d0e5nkf9.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20191106112357.29053-1-yamada.masahiro@socionext.com> (Masahiro Yamada's message of "Wed, 6 Nov 2019 20:23:57 +0900")

Masahiro Yamada <yamada.masahiro@socionext.com> writes:

> Since commit "modpost: do not set ->preloaded for symbols from
> Module.symvers", the modpost always warns about symbols exported
> multiple times.
>
> Generally, I believe it is a good thing to show a warning when the
> same symbol name is exported twice. This avoids the accidental symbol
> conflict.
>
> However, in some cases, we build an external module to provide a
> different version/variant of the in-kernel module, overriding the
> same set of exported symbols.
>
> At least, there is one use-case in the upstream code;
> tools/testing/nvdimm/libnvdimm.ko replaces drivers/nvdimm/libnvdimm.ko
> in order to link it against mocked version of core kernel symbols.
>
> Now, this emits a lots of 'exported twice' warnings:
>
>   https://lkml.org/lkml/2019/10/31/627
>
> To suppress those, add a new option KBUILD_DUPLICATED_EXPORTS_NO_WARN.
>
> If you intentionally override the existing symbols, you can pass it
> from the command line:
>
>   make M=tools/testing/nvdimm KBUILD_DUPLICATED_EXPORTS_NO_WARN=1
>
> Or, more conveniently, you can add it to the module Makefile, so
> you can still do:
>
>   make M=tools/testing/nvdimm
>
> without sprinkling the warnings.
>
> Reported-by: Jeff Moyer <jmoyer@redhat.com>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> Jeff Moyer,
> Dan Williams,
>
> Please check if this patch solves the nvdimm build issue.

Yep, that fixes it for me.

You can add:

Tested-by: Jeff Moyer <jmoyer@redhat.com>

Thanks!


      reply	other threads:[~2019-11-06 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 11:23 [PATCH] modpost: add an option to suppress 'exported twice' warnings Masahiro Yamada
2019-11-06 14:34 ` Jeff Moyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x49d0e5nkf9.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.de.marchi@gmail.com \
    --cc=michal.lkml@markovi.net \
    --cc=sam@ravnborg.org \
    --cc=vishal.l.verma@intel.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.