From patchwork Wed Jul 11 07:22:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alex.bluesman.smirnov@gmail.com X-Patchwork-Id: 170376 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 93CC72C01B4 for ; Wed, 11 Jul 2012 17:26:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756433Ab2GKH0x (ORCPT ); Wed, 11 Jul 2012 03:26:53 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:56445 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754158Ab2GKH0w (ORCPT ); Wed, 11 Jul 2012 03:26:52 -0400 Received: by weyx8 with SMTP id x8so656595wey.19 for ; Wed, 11 Jul 2012 00:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=z8tyYZKNNcC6Xfd9ig8ZbPqUDfGC7cCLLP0NsnPvm5Y=; b=Z0Wz/XfluKlxS8wbQrFQMeY52BzEdwDNvpdWUgSgSaKUErCpB7c2djYD/nf71wxYJS Jyo4C7Sbt/VUYleMVB2HnJme6OsejyGKzFFuEtruov2s/pqv56BgwNYv5U+l2hS5ul/j 3fLWlIp6cCWDjQEPX4kIQd3eJ+f5vUrrrwLVniM44jLenBOuMZIMiQgGwsi0Na1el4R3 DVh99uErMyqkpuO2zpq+h1a1I6x37dtP783S0VXKAYWqYmRiub9lzSWEAFJaISJY8Jip dovk+ScQ8Pt/Ymcqr8cotAyc/O7VOaQ0qxZTKe37Vc3k/XMDG5LG2yIkUHXrPy8bcrli 8tWQ== Received: by 10.180.19.169 with SMTP id g9mr44691799wie.9.1341991611488; Wed, 11 Jul 2012 00:26:51 -0700 (PDT) Received: from localhost.localdomain ([91.213.169.4]) by mx.google.com with ESMTPS id t7sm3040238wix.6.2012.07.11.00.26.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 00:26:51 -0700 (PDT) From: Alexander Smirnov To: davem@davemloft.net, eric.dumazet@gmail.com Cc: netdev@vger.kernel.org, Alexander Smirnov Subject: [PATCH net-next v2 1/7] 6lowpan: revert: add missing spin_lock_init() Date: Wed, 11 Jul 2012 11:22:42 +0400 Message-Id: <1341991368-11800-2-git-send-email-alex.bluesman.smirnov@gmail.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1341991368-11800-1-git-send-email-alex.bluesman.smirnov@gmail.com> References: <1341991368-11800-1-git-send-email-alex.bluesman.smirnov@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Revert the commit 768f7c7c121e80f458a9d013b2e8b169e5dfb1e5 to initialize spinlock in the more preferable way and make it static to avoid sparse warning. Signed-off-by: Alexander Smirnov --- net/ieee802154/6lowpan.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index f4070e5..b872515 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -123,7 +123,7 @@ struct lowpan_fragment { static unsigned short fragment_tag; static LIST_HEAD(lowpan_fragments); -spinlock_t flist_lock; +static DEFINE_SPINLOCK(flist_lock); static inline struct lowpan_dev_info *lowpan_dev_info(const struct net_device *dev) @@ -1186,8 +1186,6 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev, list_add_tail(&entry->list, &lowpan_devices); mutex_unlock(&lowpan_dev_info(dev)->dev_list_mtx); - spin_lock_init(&flist_lock); - register_netdevice(dev); return 0;