* [PATCH] net,bonding: Add return statement in bond_create_proc_entry.
@ 2009-10-10 2:10 Rakib Mullick
2009-10-10 19:19 ` [Bonding-devel] [PATCH] net, bonding: " Nicolas de Pesloüan
0 siblings, 1 reply; 2+ messages in thread
From: Rakib Mullick @ 2009-10-10 2:10 UTC (permalink / raw)
To: Jay Vosburgh, netdev, linux-kernel, Andrew Morton; +Cc: bonding-devel
The function bond_create_proc_entry supposed to return int instead of void.
And fixes the following compilation warning.
drivers/net/bonding/bond_main.c: In function `bond_create_proc_entry':
drivers/net/bonding/bond_main.c:3393: warning: control reaches end of
non-void function
---
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
--- linus/drivers/net/bonding/bond_main.c 2009-10-09 17:38:35.000000000 +0600
+++ rakib/drivers/net/bonding/bond_main.c 2009-10-09 17:47:46.000000000 +0600
@@ -3391,6 +3391,7 @@ static void bond_destroy_proc_dir(void)
static int bond_create_proc_entry(struct bonding *bond)
{
+ return 0;
}
static void bond_remove_proc_entry(struct bonding *bond)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Bonding-devel] [PATCH] net, bonding: Add return statement in bond_create_proc_entry.
2009-10-10 2:10 [PATCH] net,bonding: Add return statement in bond_create_proc_entry Rakib Mullick
@ 2009-10-10 19:19 ` Nicolas de Pesloüan
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas de Pesloüan @ 2009-10-10 19:19 UTC (permalink / raw)
To: Rakib Mullick
Cc: Jay Vosburgh, netdev, linux-kernel, Andrew Morton, bonding-devel
Rakib Mullick wrote:
> The function bond_create_proc_entry supposed to return int instead of void.
> And fixes the following compilation warning.
>
> drivers/net/bonding/bond_main.c: In function `bond_create_proc_entry':
> drivers/net/bonding/bond_main.c:3393: warning: control reaches end of
> non-void function
>
> ---
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
>
> --- linus/drivers/net/bonding/bond_main.c 2009-10-09 17:38:35.000000000 +0600
> +++ rakib/drivers/net/bonding/bond_main.c 2009-10-09 17:47:46.000000000 +0600
> @@ -3391,6 +3391,7 @@ static void bond_destroy_proc_dir(void)
>
> static int bond_create_proc_entry(struct bonding *bond)
> {
> + return 0;
> }
This empty function is defined inside the else branch of an ifdef. The corresponding non-empty
function always return 0 and no caller of this function use the returned value.
So I suggest to change the return type of this function from int to void, instead of adding a return
0 into the empty one.
Nicolas.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-10 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-10 2:10 [PATCH] net,bonding: Add return statement in bond_create_proc_entry Rakib Mullick
2009-10-10 19:19 ` [Bonding-devel] [PATCH] net, bonding: " Nicolas de Pesloüan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox