From patchwork Sat Oct 10 20:41:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Nicolas_de_Peslo=C3=BCan?= X-Patchwork-Id: 35678 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 8B2F2B7082 for ; Sun, 11 Oct 2009 07:49:04 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934802AbZJJUmo (ORCPT ); Sat, 10 Oct 2009 16:42:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934799AbZJJUmo (ORCPT ); Sat, 10 Oct 2009 16:42:44 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:58791 "EHLO smtp6-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934798AbZJJUmo (ORCPT ); Sat, 10 Oct 2009 16:42:44 -0400 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id 81D8EE08056; Sat, 10 Oct 2009 22:41:54 +0200 (CEST) Received: from localhost.localdomain (eab95-4-88-175-177-37.fbx.proxad.net [88.175.177.37]) by smtp6-g21.free.fr (Postfix) with ESMTP id 60AA4E080B5; Sat, 10 Oct 2009 22:41:52 +0200 (CEST) From: =?utf-8?q?Nicolas=20de=20Peslo=C3=BCan?= To: fubar@us.ibm.com, davem@davemloft.net, netdev@vger.kernel.org, bonding-devel@lists.sourceforge.net, rakib.mullick@gmail.com Cc: =?utf-8?q?Nicolas=20de=20Peslo=C3=BCan?= Subject: [PATCH netnext-2.6] bonding: change bond_create_proc_entry() to return void Date: Sat, 10 Oct 2009 22:41:47 +0200 Message-Id: <1255207307-5976-1-git-send-email-nicolas.2p.debian@free.fr> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: References: MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The function bond_create_proc_entry is currently of type int. Two versions of this function exist: The one in the ifdef CONFIG_PROC_FS branch always return 0. The one in the else branch (which is empty) return nothing. When CONFIG_PROC_FS is undef, this cause the following 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 No caller of this function use the returned value. So change the returned type from int to void and remove the useless return 0; . Signed-off-by: Nicolas de Pesloüan Reported-by: Rakib Mullick --- drivers/net/bonding/bond_main.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index ef6af1c..feb03ad 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3375,7 +3375,7 @@ static const struct file_operations bond_info_fops = { .release = seq_release, }; -static int bond_create_proc_entry(struct bonding *bond) +static void bond_create_proc_entry(struct bonding *bond) { struct net_device *bond_dev = bond->dev; @@ -3390,8 +3390,6 @@ static int bond_create_proc_entry(struct bonding *bond) else memcpy(bond->proc_file_name, bond_dev->name, IFNAMSIZ); } - - return 0; } static void bond_remove_proc_entry(struct bonding *bond) @@ -3430,7 +3428,7 @@ static void bond_destroy_proc_dir(void) #else /* !CONFIG_PROC_FS */ -static int bond_create_proc_entry(struct bonding *bond) +static void bond_create_proc_entry(struct bonding *bond) { }