All of lore.kernel.org
 help / color / mirror / Atom feed
* HELP WANTED: Fix -Wmissing-prototypes warnings (fwd)
@ 2018-11-09 23:27 Julia Lawall
  2018-11-16 13:16 ` ioannis
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2018-11-09 23:27 UTC (permalink / raw)
  To: outreachy-kernel

For those who want to keep contributing...

julia

---------- Forwarded message ----------
Date: Fri, 9 Nov 2018 18:44:10 +0100
From: Borislav Petkov <bp@alien8.de>
To: kernel-janitors@vger.kernel.org, driverdev-devel@linuxdriverproject.org
Cc: wang.yi59@zte.com.cn, Greg KH <gregkh@linuxfoundation.org>
Subject: HELP WANTED: Fix -Wmissing-prototypes warnings

Hi all,

gcc has a warning option

  -Wmissing-prototypes

which fires when a global function is missing a prototype declaration.
This warning is important as it catches cases when that global
function's prototype has been changed but its callers haven't been
updated. And they should be.

Currently, if enabled, this warning triggers ~1400 times for an
allmodconfig build and we would like to have 0 warnings and then add
that option to the main Makefile.

So helping out here would be lovely!

And it is very easy to do: you simply build the kernel with W=1:

	make -j<num_cpus+1> W=1 2>w.log

choose one -Wmissing-prototypes warning in the w.log build log and fix
it by including the header which has the function prototype. Or you
declare the function static. If that function prototype is missing, it
needs to be added, of course.

For every function, one should ask oneself, is it better to make the
function static and save ourselves the prototype and include file
dependency - that would be the preferred solution - or if not possible,
should one make the prototype visible by including the proper header so
that gcc sees the prototype.

This should be a good exercise for newbies who'd like to get involved
into kernel development.

Feel free to ask if there are any questions.

Thanks!

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: HELP WANTED: Fix -Wmissing-prototypes warnings (fwd)
  2018-11-09 23:27 HELP WANTED: Fix -Wmissing-prototypes warnings (fwd) Julia Lawall
@ 2018-11-16 13:16 ` ioannis
  2018-11-16 18:35   ` [Outreachy kernel] " Jules Octave
  0 siblings, 1 reply; 3+ messages in thread
From: ioannis @ 2018-11-16 13:16 UTC (permalink / raw)
  To: outreachy-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2079 bytes --]

On Friday, 9 November 2018 23:28:01 UTC, Julia Lawall wrote:
>
> For those who want to keep contributing... 
>
> julia 
>
> ---------- Forwarded message ---------- 
> Date: Fri, 9 Nov 2018 18:44:10 +0100 
> From: Borislav Petkov <b...@alien8.de <javascript:>> 
> To: kernel-...@vger.kernel.org <javascript:>, 
> driverd...@linuxdriverproject.org <javascript:> 
> Cc: wang...@zte.com.cn <javascript:>, Greg KH <gre...@linuxfoundation.org 
> <javascript:>> 
> Subject: HELP WANTED: Fix -Wmissing-prototypes warnings 
>
> Hi all, 
>
> gcc has a warning option 
>
>   -Wmissing-prototypes 
>
> which fires when a global function is missing a prototype declaration. 
> This warning is important as it catches cases when that global 
> function's prototype has been changed but its callers haven't been 
> updated. And they should be. 
>
> Currently, if enabled, this warning triggers ~1400 times for an 
> allmodconfig build and we would like to have 0 warnings and then add 
> that option to the main Makefile. 
>
> So helping out here would be lovely! 
>
> And it is very easy to do: you simply build the kernel with W=1: 
>
>         make -j<num_cpus+1> W=1 2>w.log 
>
> choose one -Wmissing-prototypes warning in the w.log build log and fix 
> it by including the header which has the function prototype. Or you 
> declare the function static. If that function prototype is missing, it 
> needs to be added, of course. 
>
> For every function, one should ask oneself, is it better to make the 
> function static and save ourselves the prototype and include file 
> dependency - that would be the preferred solution - or if not possible, 
> should one make the prototype visible by including the proper header so 
> that gcc sees the prototype. 
>
> This should be a good exercise for newbies who'd like to get involved 
> into kernel development. 
>

Awesome. I'll look into this. 

Thanks
Ioannis 

>
> Feel free to ask if there are any questions. 
>
> Thanks! 
>
> -- 
> Regards/Gruss, 
>     Boris. 
>
> Good mailing practices for 400: avoid top-posting and trim the reply. 
>

[-- Attachment #1.2: Type: text/html, Size: 3567 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Outreachy kernel] Re: HELP WANTED: Fix -Wmissing-prototypes warnings (fwd)
  2018-11-16 13:16 ` ioannis
@ 2018-11-16 18:35   ` Jules Octave
  0 siblings, 0 replies; 3+ messages in thread
From: Jules Octave @ 2018-11-16 18:35 UTC (permalink / raw)
  To: ioannis; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 2878 bytes --]

I will also work on it but currently I'm preparing for a Linux admin exam.
I will be working on it from 26th.

On Fri, 16 Nov 2018, 15:29 <ioannis@kano.me wrote:

> On Friday, 9 November 2018 23:28:01 UTC, Julia Lawall wrote:
>>
>> For those who want to keep contributing...
>>
>> julia
>>
>> ---------- Forwarded message ----------
>> Date: Fri, 9 Nov 2018 18:44:10 +0100
>> From: Borislav Petkov <b...@alien8.de>
>> To: kernel-...@vger.kernel.org, driverd...@linuxdriverproject.org
>> Cc: wang...@zte.com.cn, Greg KH <gre...@linuxfoundation.org>
>> Subject: HELP WANTED: Fix -Wmissing-prototypes warnings
>>
>> Hi all,
>>
>> gcc has a warning option
>>
>>   -Wmissing-prototypes
>>
>> which fires when a global function is missing a prototype declaration.
>> This warning is important as it catches cases when that global
>> function's prototype has been changed but its callers haven't been
>> updated. And they should be.
>>
>> Currently, if enabled, this warning triggers ~1400 times for an
>> allmodconfig build and we would like to have 0 warnings and then add
>> that option to the main Makefile.
>>
>> So helping out here would be lovely!
>>
>> And it is very easy to do: you simply build the kernel with W=1:
>>
>>         make -j<num_cpus+1> W=1 2>w.log
>>
>> choose one -Wmissing-prototypes warning in the w.log build log and fix
>> it by including the header which has the function prototype. Or you
>> declare the function static. If that function prototype is missing, it
>> needs to be added, of course.
>>
>> For every function, one should ask oneself, is it better to make the
>> function static and save ourselves the prototype and include file
>> dependency - that would be the preferred solution - or if not possible,
>> should one make the prototype visible by including the proper header so
>> that gcc sees the prototype.
>>
>> This should be a good exercise for newbies who'd like to get involved
>> into kernel development.
>>
>
> Awesome. I'll look into this.
>
> Thanks
> Ioannis
>
>>
>> Feel free to ask if there are any questions.
>>
>> Thanks!
>>
>> --
>> Regards/Gruss,
>>     Boris.
>>
>> Good mailing practices for 400: avoid top-posting and trim the reply.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/65babe95-ab4b-4001-8d70-348482770c00%40googlegroups.com
> <https://groups.google.com/d/msgid/outreachy-kernel/65babe95-ab4b-4001-8d70-348482770c00%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 4145 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-16 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 23:27 HELP WANTED: Fix -Wmissing-prototypes warnings (fwd) Julia Lawall
2018-11-16 13:16 ` ioannis
2018-11-16 18:35   ` [Outreachy kernel] " Jules Octave

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.