module: rename set_license() to module_license_taint_check()
authorLuis Chamberlain <mcgrof@kernel.org>
Sun, 19 Mar 2023 21:27:40 +0000 (14:27 -0700)
committerLuis Chamberlain <mcgrof@kernel.org>
Fri, 24 Mar 2023 18:33:08 +0000 (11:33 -0700)
The set_license() routine would seem to a reader to do some sort of
setting, but it does not. It just adds a taint if the license is
not set or proprietary.

This makes what the code is doing clearer, so much we can remove
the comment about it.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
kernel/module/main.c

index 95fd705..5e64485 100644 (file)
@@ -1573,7 +1573,7 @@ static void layout_sections(struct module *mod, struct load_info *info)
        __layout_sections(mod, info, true);
 }
 
-static void set_license(struct module *mod, const char *license)
+static void module_license_taint_check(struct module *mod, const char *license)
 {
        if (!license)
                license = "unspecified";
@@ -1993,8 +1993,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
        if (err)
                return err;
 
-       /* Set up license info based on the info section */
-       set_license(mod, get_modinfo(info, "license"));
+       module_license_taint_check(mod, get_modinfo(info, "license"));
 
        if (get_modinfo(info, "test")) {
                if (!test_taint(TAINT_TEST))