From: "Nicolas de Pesloüan" <nicolas.2p.debian@free.fr>
To: Rakib Mullick <rakib.mullick@gmail.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
bonding-devel@lists.sourceforge.net
Subject: Re: [Bonding-devel] [PATCH] net, bonding: Add return statement in bond_create_proc_entry.
Date: Sat, 10 Oct 2009 21:19:20 +0200 [thread overview]
Message-ID: <4AD0DE38.2010101@free.fr> (raw)
In-Reply-To: <b9df5fa10910091910u1b6bf14bg2781cb12c58b21f9@mail.gmail.com>
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.
next prev parent reply other threads:[~2009-10-10 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-10-10 20:41 ` [PATCH netnext-2.6] bonding: change bond_create_proc_entry() to return void Nicolas de Pesloüan
2009-10-13 7:45 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD0DE38.2010101@free.fr \
--to=nicolas.2p.debian@free.fr \
--cc=akpm@linux-foundation.org \
--cc=bonding-devel@lists.sourceforge.net \
--cc=fubar@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rakib.mullick@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.