Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934756AbZJJTUT (ORCPT ); Sat, 10 Oct 2009 15:20:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934638AbZJJTUQ (ORCPT ); Sat, 10 Oct 2009 15:20:16 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:52391 "EHLO smtp6-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934621AbZJJTUO (ORCPT ); Sat, 10 Oct 2009 15:20:14 -0400 Message-ID: <4AD0DE38.2010101@free.fr> Date: Sat, 10 Oct 2009 21:19:20 +0200 From: =?ISO-8859-1?Q?Nicolas_de_Peslo=FCan?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: Rakib Mullick CC: Jay Vosburgh , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Morton , bonding-devel@lists.sourceforge.net Subject: Re: [Bonding-devel] [PATCH] net, bonding: Add return statement in bond_create_proc_entry. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1252 Lines: 33 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 > > --- 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/