From patchwork Thu Jun 26 14:46:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 4428051 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CC9A59F319 for ; Thu, 26 Jun 2014 14:46:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F022B201DC for ; Thu, 26 Jun 2014 14:46:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DACF2201D5 for ; Thu, 26 Jun 2014 14:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753142AbaFZOqa (ORCPT ); Thu, 26 Jun 2014 10:46:30 -0400 Received: from dedo.coelho.fi ([88.198.205.34]:41838 "EHLO dedo.coelho.fi" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752137AbaFZOqa (ORCPT ); Thu, 26 Jun 2014 10:46:30 -0400 Received: from a88-113-225-236.elisa-laajakaista.fi ([88.113.225.236] helo=localhost.localdomain) by dedo.coelho.fi with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1X0AwW-0000kt-B7; Thu, 26 Jun 2014 17:46:28 +0300 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, michal.kazior@tieto.com Date: Thu, 26 Jun 2014 17:46:16 +0300 Message-Id: <1403793976-9542-1-git-send-email-luca@coelho.fi> X-Mailer: git-send-email 2.0.0 X-SA-Exim-Connect-IP: 88.113.225.236 X-SA-Exim-Mail-From: luca@coelho.fi X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Subject: [PATCH] mac80211: avoid warning when CONFIG_LOCKDEP is not enabled X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on dedo.coelho.fi) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luciano Coelho After commit 5bcae31d9 (mac80211: implement multi-vif in-place reservations) we get a warning when CONFIG_LOCKDEP is not enabled: net/mac80211/chan.c: In function 'ieee80211_vif_get_chanctx': net/mac80211/chan.c:69:26: warning: unused variable 'local' [-Wunused-variable] struct ieee80211_local *local = sdata->local; ^ Fix this by removing the separate declaration for local and accessing it directly in the lockdep_is_held() call. Signed-off-by: Luciano Coelho --- net/mac80211/chan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index c3fd4d2..0cdac4b 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -66,11 +66,10 @@ static bool ieee80211_can_create_new_chanctx(struct ieee80211_local *local) static struct ieee80211_chanctx * ieee80211_vif_get_chanctx(struct ieee80211_sub_if_data *sdata) { - struct ieee80211_local *local = sdata->local; struct ieee80211_chanctx_conf *conf; conf = rcu_dereference_protected(sdata->vif.chanctx_conf, - lockdep_is_held(&local->chanctx_mtx)); + lockdep_is_held(&sdata->local->chanctx_mtx)); if (!conf) return NULL;