LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Adrian Bunk <bunk@kernel.org>
Cc: rusty@rustcorp.com.au, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: wish: build time warning for missing MODULE_LICENSE
Date: Sun, 30 Mar 2008 21:04:30 +0200 [thread overview]
Message-ID: <20080330190430.GD19733@uranus.ravnborg.org> (raw)
In-Reply-To: <20080330180119.GC1575@cs181133002.pp.htv.fi>
On Sun, Mar 30, 2008 at 09:01:19PM +0300, Adrian Bunk wrote:
> I just fixed a bug where I had accidentally removed a MODULE_LICENSE()
> from a file.
>
> The problem is that such bugs are currently not discovered until someone
> actually runs a kernel with this module loaded.
>
> Could we get a build time warning/error for a missing MODULE_LICENSE?
Is it something as simple as this you are after?
[My dev box is dead atm so I have not done a kernel build
with this, only a single module].
Sam
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 695b5d6..e8560a0 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1552,6 +1552,8 @@ static void read_symbols(char *modname)
}
license = get_modinfo(info.modinfo, info.modinfo_len, "license");
+ if (!license && !is_vmlinux(modname))
+ warn("modpost: missing MODULE_LICENSE() in %s\n", modname);
while (license) {
if (license_is_gpl_compatible(license))
mod->gpl_compatible = 1;
next prev parent reply other threads:[~2008-03-30 19:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-30 18:01 Adrian Bunk
2008-03-30 19:04 ` Sam Ravnborg [this message]
2008-03-30 20:34 ` Adrian Bunk
2008-04-01 2:22 ` Dave Jones
2008-04-01 7:43 ` Adrian Bunk
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=20080330190430.GD19733@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=bunk@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--subject='Re: wish: build time warning for missing MODULE_LICENSE' \
/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
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).