modpost: propagate W=1 build option to modpost
PATCH 1/1 modpost: propagate W=1 build option to modpost
"No build warning" is a strong requirement these days, so you must fix all issues before enabling a new warning flag.
We often add a new warning to W=1 first so that the kbuild test robot blocks new breakages.
This commit allows modpost to show extra warnings only when W=1 (or KBUILD_EXTRA_WARN=1) is given.
---
scripts/Makefile.modpost | 1 + scripts/mod/modpost.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)
scripts/Makefile.modpost +1 -0
@@ -47,6 +47,7 @@ modpost-args = \ $(if $(KBUILD_MODPOST_WARN),-w) \ $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \ $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \ + $(if $(findstring 1, $(KBUILD_EXTRA_WARN)),-W) \ -o $@ modpost-deps := $(MODPOST)
scripts/mod/modpost.c +6 -1
@@ -42,6 +42,8 @@ static bool allow_missing_ns_imports;static bool error_occurred; +static bool extra_warn; +/* * Cut off the warnings when there are too many. This typically occurs when * vmlinux is missing. ('make modules' without building vmlinux.)
@@ -2199,7 +2201,7 @@ int main(int argc, char **argv)LIST_HEAD (dump_lists);struct dump_list *dl, *dl2; -while ((opt =getopt (argc, argv,"ei:mnT:o:awENd:" )) !=-1 ) { +while ((opt =getopt (argc, argv,"ei:mnT:o:aWwENd:" )) !=-1 ) {switch (opt) {case 'e' : external_module = true;
@@ -2224,6 +2226,9 @@ int main(int argc, char **argv)case 'T' : files_source = optarg;break ; +case 'W' : + extra_warn = true; +break ;case 'w' : warn_unresolved = true;break ;
Signature · 1 line
2.39.2
Quoted 11 lines · Masahiro Yamada
"No build warning" is a strong requirement these days, so you must fix all issues before enabling a new warning flag.
We often add a new warning to W=1 first so that the kbuild test robot blocks new breakages.
This commit allows modpost to show extra warnings only when W=1 (or KBUILD_EXTRA_WARN=1) is given.
Signed-off-by Masahiro Yamada <[email protected]>
Patch seems fine, but without anyone reading extra_warn, I'm curious what new extra warnings you had in mind were?
Quoted 53 lines
---
scripts/Makefile.modpost | 1 + scripts/mod/modpost.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)scripts/Makefile.modpost +1
-0@@ -47,6 +47,7 @@ modpost-args = \ $(if $(KBUILD_MODPOST_WARN),-w) \ $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \ $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \ + $(if $(findstring 1, $(KBUILD_EXTRA_WARN)),-W) \ -o $@ modpost-deps := $(MODPOST)scripts/mod/modpost.c +6
-2@@ -42,6 +42,8 @@ static bool allow_missing_ns_imports;static bool error_occurred; +static bool extra_warn; +/* * Cut off the warnings when there are too many. This typically occurs when * vmlinux is missing. ('make modules' without building vmlinux.) @@ -2199,7 +2201,7 @@ int main(int argc, char **argv)LIST_HEAD (dump_lists);struct dump_list *dl, *dl2; -while ((opt =getopt (argc, argv,"ei:mnT:o:awENd:" )) !=-1 ) { +while ((opt =getopt (argc, argv,"ei:mnT:o:aWwENd:" )) !=-1 ) {switch (opt) {case 'e' : external_module = true;@@ -2224,6 +2226,9 @@ int main(int argc, char **argv)case 'T' : files_source = optarg;break ; +case 'W' : + extra_warn = true; +break ;case 'w' : warn_unresolved = true;break ; --2.39.2
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 9 lines · Nick Desaulniers
Quoted 7 lines · Masahiro Yamada
"No build warning" is a strong requirement these days, so you must fix all issues before enabling a new warning flag.
We often add a new warning to W=1 first so that the kbuild test robot blocks new breakages.
Quoted 7 lines
Quoted 4 lines
This commit allows modpost to show extra warnings only when W=1 (or KBUILD_EXTRA_WARN=1) is given.
Signed-off-by Masahiro Yamada <[email protected]>Patch seems fine, but without anyone reading
extra_warn, I'm curious what new extra warnings you had in mind were?
This one.
Quoted 58 lines
Quoted 51 lines
---
scripts/Makefile.modpost | 1 + scripts/mod/modpost.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)scripts/Makefile.modpost +1
-0@@ -47,6 +47,7 @@ modpost-args = \ $(if $(KBUILD_MODPOST_WARN),-w) \ $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \ $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \ + $(if $(findstring 1, $(KBUILD_EXTRA_WARN)),-W) \ -o $@ modpost-deps := $(MODPOST)scripts/mod/modpost.c +6
-2@@ -42,6 +42,8 @@ static bool allow_missing_ns_imports;static bool error_occurred; +static bool extra_warn; +/* * Cut off the warnings when there are too many. This typically occurs when * vmlinux is missing. ('make modules' without building vmlinux.) @@ -2199,7 +2201,7 @@ int main(int argc, char **argv)LIST_HEAD (dump_lists);struct dump_list *dl, *dl2; -while ((opt =getopt (argc, argv,"ei:mnT:o:awENd:" )) !=-1 ) { +while ((opt =getopt (argc, argv,"ei:mnT:o:aWwENd:" )) !=-1 ) {switch (opt) {case 'e' : external_module = true;@@ -2224,6 +2226,9 @@ int main(int argc, char **argv)case 'T' : files_source = optarg;break ; +case 'W' : + extra_warn = true; +break ;case 'w' : warn_unresolved = true;break ; --Quoted 2 lines
2.39.2
--
Thanks,
~Nick Desaulniers
Signature · 2 lines
Best Regards Masahiro Yamada
Nick Desaulniers
Reviewed-byQuoted 16 lines · Masahiro Yamada
Quoted 14 lines · Nick Desaulniers
Quoted 11 lines · Masahiro Yamada
"No build warning" is a strong requirement these days, so you must fix all issues before enabling a new warning flag.
We often add a new warning to W=1 first so that the kbuild test robot blocks new breakages.
This commit allows modpost to show extra warnings only when W=1 (or KBUILD_EXTRA_WARN=1) is given.
Signed-off-by Masahiro Yamada <[email protected]>
Quoted 7 lines
Quoted 2 lines
Patch seems fine, but without anyone reading
extra_warn, I'm curious what new extra warnings you had in mind were?This one.
Yeah, ok so we'll guard that warning on this extra_warn then? Seems fine.
Quoted 66 lines
Quoted 52 lines
Quoted 52 lines
---
scripts/Makefile.modpost | 1 + scripts/mod/modpost.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)scripts/Makefile.modpost +1
-0@@ -47,6 +47,7 @@ modpost-args = \ $(if $(KBUILD_MODPOST_WARN),-w) \ $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \ $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N) \ + $(if $(findstring 1, $(KBUILD_EXTRA_WARN)),-W) \ -o $@ modpost-deps := $(MODPOST)scripts/mod/modpost.c +6
-1@@ -42,6 +42,8 @@ static bool allow_missing_ns_imports;static bool error_occurred; +static bool extra_warn; +/* * Cut off the warnings when there are too many. This typically occurs when * vmlinux is missing. ('make modules' without building vmlinux.) @@ -2199,7 +2201,7 @@ int main(int argc, char **argv)LIST_HEAD (dump_lists);struct dump_list *dl, *dl2; -while ((opt =getopt (argc, argv,"ei:mnT:o:awENd:" )) !=-1 ) { +while ((opt =getopt (argc, argv,"ei:mnT:o:aWwENd:" )) !=-1 ) {switch (opt) {case 'e' : external_module = true;@@ -2224,6 +2226,9 @@ int main(int argc, char **argv)case 'T' : files_source = optarg;break ; +case 'W' : + extra_warn = true; +break ;case 'w' : warn_unresolved = true;break ;Quoted 8 lines
Quoted 3 lines
--
2.39.2--
Thanks,
~Nick Desaulniers--
Best Regards
Masahiro Yamada
Signature · 2 lines
Thanks, ~Nick Desaulniers