From: Randy Dunlap <rdunlap@infradead.org>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-iio@vger.kernel.org, Peter Rosin <peda@axentia.se>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
KUnit Development <kunit-dev@googlegroups.com>
Subject: Re: kbuild problem: ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o
Date: Fri, 20 May 2022 20:17:18 -0700 [thread overview]
Message-ID: <6671de03-c09c-bfaf-e06c-e45af70d4354@infradead.org> (raw)
In-Reply-To: <3ae306e0-c6c7-ed12-cacd-62b1c26dba3c@infradead.org>
On 5/20/22 20:08, Randy Dunlap wrote:
>
>
> On 5/20/22 19:40, Randy Dunlap wrote:
>> Hi,
>>
>> In March I reported that a randconfig build complained:
>>
>> ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o
>>
>> (https://lore.kernel.org/all/16509fb6-e40c-e31b-2c80-264c44b0beb9@infradead.org/)
>>
>> I am still seeing this problem so I tried to dig into it a bit.
>> However, I don't see why get_next_modinfo() and friends don't find the
>> MODULE_LICENSE() since it is in the iio-rescale.o file.
>>
>> (BTW, I see this build error on many different $ARCH [around 15 tested]
>> and with 2 different versions of GCC.)
>>
>> Q1: Is modpost checking both vmlinux and iio-rescale.o for modinfo license
>> strings?
>>
>> It looks like it is, because it appears (?) that modpost is looking at
>> drivers/iio/test/iio-test-rescale.o (<<<<< a kunit test, which is builtin
>> in my .config) and at drivers/iio/afe/iio-rescale.o (which is built as a
>> loadable module).
>>
>> Is this confusing modpost?
>> I renamed drivers/iio/afe/iio-rescale.c to afe-rescale.c and changed its
>> Makefile entry accordingly and the MODULE_LICENSE error goes away.
>
> Oh well. This rename causes drivers/iio/test/iio-test-rescale.c to have
> build errors, so that's not a solution, just some info...
and that was due to not updating drivers/iio/test/Makefile.
When that is done, the missing MODULE_LICENSE() is back in afe-rescale.o.
>
>> Is this a modpost error or is kunit messing things up?
>>
>> thanks for looking.
>
--
~Randy
next prev parent reply other threads:[~2022-05-21 3:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-21 2:40 kbuild problem: ERROR: modpost: missing MODULE_LICENSE() in drivers/iio/afe/iio-rescale.o Randy Dunlap
2022-05-21 3:08 ` Randy Dunlap
2022-05-21 3:17 ` Randy Dunlap [this message]
2022-05-21 3:51 ` Randy Dunlap
2022-05-21 4:14 ` Masahiro Yamada
2022-05-21 5:39 ` Randy Dunlap
2022-05-26 15:36 ` Randy Dunlap
2022-05-26 16:04 ` Liam Beguin
2022-05-26 20:04 ` Randy Dunlap
2022-05-29 21:20 ` Liam Beguin
2022-05-30 0:17 ` Randy Dunlap
2022-05-30 2:37 ` Masahiro Yamada
2022-05-21 4:12 ` Masahiro Yamada
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=6671de03-c09c-bfaf-e06c-e45af70d4354@infradead.org \
--to=rdunlap@infradead.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=peda@axentia.se \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).