Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758229AbbBEQ2c (ORCPT ); Thu, 5 Feb 2015 11:28:32 -0500 Received: from mail-wi0-f177.google.com ([209.85.212.177]:34759 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758137AbbBEQ2a (ORCPT ); Thu, 5 Feb 2015 11:28:30 -0500 From: Lad Prabhakar To: Cliff Whickman , Robin Holt Cc: linux-kernel@vger.kernel.org, "Lad, Prabhakar" Subject: [PATCH] xpnet: fix sparse warnings Date: Thu, 5 Feb 2015 16:28:16 +0000 Message-Id: <1423153696-26871-1-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1928 Lines: 58 From: "Lad, Prabhakar" this patch fixes following sparse warnings: xpnet.c:99:19: warning: symbol 'xpnet_device' was not declared. Should it be static? xpnet.c:132:22: warning: symbol 'xpnet_dbg_name' was not declared. Should it be static? xpnet.c:136:15: warning: symbol 'xpnet_dbg_subname' was not declared. Should it be static? xpnet.c:141:15: warning: symbol 'xpnet' was not declared. Should it be static? Signed-off-by: Lad, Prabhakar --- Found this issue on linux-next (gcc version 4.8.2, sparse version 0.4.5-rc1)and applies on top linux-next. drivers/misc/sgi-xp/xpnet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 557f978..a55189f 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c @@ -96,7 +96,7 @@ struct xpnet_pending_msg { atomic_t use_count; }; -struct net_device *xpnet_device; +static struct net_device *xpnet_device; /* * When we are notified of other partitions activating, we add them to @@ -129,16 +129,16 @@ static DEFINE_SPINLOCK(xpnet_broadcast_lock); /* Define the XPNET debug device structures to be used with dev_dbg() et al */ -struct device_driver xpnet_dbg_name = { +static struct device_driver xpnet_dbg_name = { .name = "xpnet" }; -struct device xpnet_dbg_subname = { +static struct device xpnet_dbg_subname = { .init_name = "", /* set to "" */ .driver = &xpnet_dbg_name }; -struct device *xpnet = &xpnet_dbg_subname; +static struct device *xpnet = &xpnet_dbg_subname; /* * Packet was recevied by XPC and forwarded to us. -- 1.9.1 -- 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/