diff mbox

[3/3] in scripts/export_report.pl use warn() to issue WARNING, so they go to stderr.

Message ID 1305966108-13399-4-git-send-email-jim.cromie@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jim Cromie May 21, 2011, 8:21 a.m. UTC
Also count CONFIG_MODVERSION warnings, and print an NB message at
start of SECTION 2 if any were issued.  Section 2 will be empty
if the build is lacking this CONFIG_ item, and user may have missed
the warnings, as they're off screen.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 scripts/export_report.pl |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

Comments

Randy Dunlap May 23, 2011, 3:21 p.m. UTC | #1
On Sat, 21 May 2011 02:21:48 -0600 Jim Cromie wrote:

> Also count CONFIG_MODVERSION warnings, and print an NB message at

CONFIG_MODVERSIONS

NB?  as in Note Well?

Please just use NOTE:

> start of SECTION 2 if any were issued.  Section 2 will be empty
> if the build is lacking this CONFIG_ item, and user may have missed
> the warnings, as they're off screen.
> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
>  scripts/export_report.pl |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/export_report.pl b/scripts/export_report.pl
> index 16bd240..14c1638 100644
> --- a/scripts/export_report.pl
> +++ b/scripts/export_report.pl
> @@ -102,6 +102,8 @@ close($module_symvers);
>  #
>  # collect the usage count of each symbol.
>  #
> +my $modversion_warnings = 0;
> +
>  foreach my $thismod (@allcfiles) {
>  	my $module;
>  
> @@ -132,7 +134,8 @@ foreach my $thismod (@allcfiles) {
>  		}
>  	}
>  	if ($state != 2) {
> -		print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n";
> +		warn "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n";

should be CONFIG_MODVERSIONS

> +		$modversion_warnings++;
>  	}
>  	close($module);
>  }
> @@ -166,6 +169,9 @@ printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel
>  modules. Each module lists the modules, and the symbols from that module that
>  it uses.  Each listed symbol reports the number of modules using it\n");
>  
> +print "\nNB: Got $modversion_warnings CONFIG_MODVERSION warnings\n\n"

should be CONFIG_MODVERSIONS

and NOTE:


> +    if $modversion_warnings;
> +
>  print "~"x80 , "\n";
>  for my $thismod (sort keys %MODULE) {
>  	my $list = $MODULE{$thismod};
> -- 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jim Cromie May 23, 2011, 6:44 p.m. UTC | #2
thanks Randy,

rev2 fixes:
NB -> NOTE
cant -> cannot
CONFIG_MODVERSION -> CONFIG_MODVERSIONS (everywhere)

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek May 24, 2011, 2:10 p.m. UTC | #3
On Mon, May 23, 2011 at 12:44:54PM -0600, Jim Cromie wrote:
> thanks Randy,
> 
> rev2 fixes:
> NB -> NOTE
> cant -> cannot
> CONFIG_MODVERSION -> CONFIG_MODVERSIONS (everywhere)

Applied to kbuild-2.6.git#misc after editing the subject lines a bit:

Jim Cromie (3):
      export_report: do collectcfiles work in perl itself
      export_report: sort SECTION 2 output
      export_report: use warn() to issue WARNING, so they go to stderr

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jim Cromie May 24, 2011, 5:53 p.m. UTC | #4
On Tue, May 24, 2011 at 8:10 AM, Michal Marek <mmarek@suse.cz> wrote:

> Applied to kbuild-2.6.git#misc after editing the subject lines a bit:
>
> Jim Cromie (3):
>      export_report: do collectcfiles work in perl itself
>      export_report: sort SECTION 2 output
>      export_report: use warn() to issue WARNING, so they go to stderr
>
> Michal
>

thanks,

can you point to the tree ?
(I want to see what rewording is better)

I didnt see it at git.kernel.org, nor where MAINTAINERS entry points
(at least after converting it to http)

T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
for-next
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git
rc-fixes
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek May 25, 2011, 12:15 p.m. UTC | #5
On 24.5.2011 19:53, Jim Cromie wrote:
> can you point to the tree ?
> (I want to see what rewording is better)
>
> I didnt see it at git.kernel.org, nor where MAINTAINERS entry points
> (at least after converting it to http)

http://git.kernel.org/?p=linux/kernel/git/mmarek/kbuild-2.6.git;a=shortlog;h=refs/heads/misc

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/export_report.pl b/scripts/export_report.pl
index 16bd240..14c1638 100644
--- a/scripts/export_report.pl
+++ b/scripts/export_report.pl
@@ -102,6 +102,8 @@  close($module_symvers);
 #
 # collect the usage count of each symbol.
 #
+my $modversion_warnings = 0;
+
 foreach my $thismod (@allcfiles) {
 	my $module;
 
@@ -132,7 +134,8 @@  foreach my $thismod (@allcfiles) {
 		}
 	}
 	if ($state != 2) {
-		print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n";
+		warn "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n";
+		$modversion_warnings++;
 	}
 	close($module);
 }
@@ -166,6 +169,9 @@  printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel
 modules. Each module lists the modules, and the symbols from that module that
 it uses.  Each listed symbol reports the number of modules using it\n");
 
+print "\nNB: Got $modversion_warnings CONFIG_MODVERSION warnings\n\n"
+    if $modversion_warnings;
+
 print "~"x80 , "\n";
 for my $thismod (sort keys %MODULE) {
 	my $list = $MODULE{$thismod};