diff mbox

net: fix non-ANSI function declaration warning

Message ID 1341686871-21822-1-git-send-email-emilgoode@gmail.com
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Emil Goode July 7, 2012, 6:47 p.m. UTC
Sparse is warning about non-ANSI function declaration.
Add void to the parameterless function.

net/core/dev.c:1804:38: warning:
	non-ANSI function declaration of function
	'netif_get_num_default_rss_queues'

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 net/core/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Hutchings July 7, 2012, 7:57 p.m. UTC | #1
On Sat, 2012-07-07 at 20:47 +0200, Emil Goode wrote:
> Sparse is warning about non-ANSI function declaration.
> Add void to the parameterless function.
> 
> net/core/dev.c:1804:38: warning:
> 	non-ANSI function declaration of function
> 	'netif_get_num_default_rss_queues'

I also posted a patch for this (and another instance I found).

Ben.

> Signed-off-by: Emil Goode <emilgoode@gmail.com>
> ---
>  net/core/dev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 07c1251..fc6fbce 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -1801,7 +1801,7 @@ EXPORT_SYMBOL(netif_set_real_num_rx_queues);
>   * This routine should set an upper limit on the number of RSS queues
>   * used by default by multiqueue devices.
>   */
> -int netif_get_num_default_rss_queues()
> +int netif_get_num_default_rss_queues(void)
>  {
>  	return min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
>  }
David Miller July 7, 2012, 11:12 p.m. UTC | #2
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Sat, 7 Jul 2012 20:57:29 +0100

> On Sat, 2012-07-07 at 20:47 +0200, Emil Goode wrote:
>> Sparse is warning about non-ANSI function declaration.
>> Add void to the parameterless function.
>> 
>> net/core/dev.c:1804:38: warning:
>> 	non-ANSI function declaration of function
>> 	'netif_get_num_default_rss_queues'
> 
> I also posted a patch for this (and another instance I found).

But you were asked to fix up the comment formatting in on of those
patches so you need to fix that up and resubmit the entire set.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ben Hutchings July 8, 2012, 12:16 a.m. UTC | #3
On Sat, 2012-07-07 at 16:12 -0700, David Miller wrote:
> From: Ben Hutchings <bhutchings@solarflare.com>
> Date: Sat, 7 Jul 2012 20:57:29 +0100
> 
> > On Sat, 2012-07-07 at 20:47 +0200, Emil Goode wrote:
> >> Sparse is warning about non-ANSI function declaration.
> >> Add void to the parameterless function.
> >> 
> >> net/core/dev.c:1804:38: warning:
> >> 	non-ANSI function declaration of function
> >> 	'netif_get_num_default_rss_queues'
> > 
> > I also posted a patch for this (and another instance I found).
> 
> But you were asked to fix up the comment formatting in on of those
> patches so you need to fix that up and resubmit the entire set.

You have got to be kidding.  I fixed one thing, so I have to fix
another?

Ben.
David Miller July 8, 2012, 12:25 a.m. UTC | #4
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Sun, 8 Jul 2012 01:16:03 +0100

> On Sat, 2012-07-07 at 16:12 -0700, David Miller wrote:
>> From: Ben Hutchings <bhutchings@solarflare.com>
>> Date: Sat, 7 Jul 2012 20:57:29 +0100
>> 
>> > On Sat, 2012-07-07 at 20:47 +0200, Emil Goode wrote:
>> >> Sparse is warning about non-ANSI function declaration.
>> >> Add void to the parameterless function.
>> >> 
>> >> net/core/dev.c:1804:38: warning:
>> >> 	non-ANSI function declaration of function
>> >> 	'netif_get_num_default_rss_queues'
>> > 
>> > I also posted a patch for this (and another instance I found).
>> 
>> But you were asked to fix up the comment formatting in on of those
>> patches so you need to fix that up and resubmit the entire set.
> 
> You have got to be kidding.  I fixed one thing, so I have to fix
> another?

You're fixing up a comment, fix it fully.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller July 8, 2012, 12:26 a.m. UTC | #5
From: David Miller <davem@davemloft.net>
Date: Sat, 07 Jul 2012 17:25:39 -0700 (PDT)

> From: Ben Hutchings <bhutchings@solarflare.com>
> Date: Sun, 8 Jul 2012 01:16:03 +0100
> 
>> On Sat, 2012-07-07 at 16:12 -0700, David Miller wrote:
>>> From: Ben Hutchings <bhutchings@solarflare.com>
>>> Date: Sat, 7 Jul 2012 20:57:29 +0100
>>> 
>>> > On Sat, 2012-07-07 at 20:47 +0200, Emil Goode wrote:
>>> >> Sparse is warning about non-ANSI function declaration.
>>> >> Add void to the parameterless function.
>>> >> 
>>> >> net/core/dev.c:1804:38: warning:
>>> >> 	non-ANSI function declaration of function
>>> >> 	'netif_get_num_default_rss_queues'
>>> > 
>>> > I also posted a patch for this (and another instance I found).
>>> 
>>> But you were asked to fix up the comment formatting in on of those
>>> patches so you need to fix that up and resubmit the entire set.
>> 
>> You have got to be kidding.  I fixed one thing, so I have to fix
>> another?
> 
> You're fixing up a comment, fix it fully.

And btw when you don't respond to someone who gives you feedback I
have to assume you agree with them and intend to fix it, and thus I
automatically move all of your patches to changes-requested state
in patchwork and that's the last I will look at them.
--
To unsubscribe from this list: send the line "unsubscribe netdev" 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/net/core/dev.c b/net/core/dev.c
index 07c1251..fc6fbce 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1801,7 +1801,7 @@  EXPORT_SYMBOL(netif_set_real_num_rx_queues);
  * This routine should set an upper limit on the number of RSS queues
  * used by default by multiqueue devices.
  */
-int netif_get_num_default_rss_queues()
+int netif_get_num_default_rss_queues(void)
 {
 	return min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus());
 }