From patchwork Fri May 12 16:42:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9724597 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 380A8603F8 for ; Fri, 12 May 2017 16:42:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 231CD28854 for ; Fri, 12 May 2017 16:42:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17BC028861; Fri, 12 May 2017 16:42:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B31E628863 for ; Fri, 12 May 2017 16:42:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933343AbdELQmt (ORCPT ); Fri, 12 May 2017 12:42:49 -0400 Received: from mail-pg0-f48.google.com ([74.125.83.48]:35877 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933214AbdELQmq (ORCPT ); Fri, 12 May 2017 12:42:46 -0400 Received: by mail-pg0-f48.google.com with SMTP id x64so13283505pgd.3 for ; Fri, 12 May 2017 09:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iIB5H1aV+CFJ+WUOshKowoLmB7yI8+4Nlrgxqmo+sns=; b=TV6JFx43OmM96o4GMOIjplRPDJ5aAKUJU8mkZZ7je3YQ4093fJgOb/+v2exp+bZSNL OHVQBQpgEzxwKvn81FRSjTgLTgOQnwPWZew3KO5gqULqBT29btTywQa0oMpt/6qSssOq tzhz25I8q0kL9CByysq2cfg521A1JKpm+FIKg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iIB5H1aV+CFJ+WUOshKowoLmB7yI8+4Nlrgxqmo+sns=; b=AIyakbtZPQ+H6/+biXMH1QC1l3RtKnuGaqlyFsBCbUrgb8mzG+0DIGt6MLJJerwv1o hyfpx5bW9fzhNsM5qF9vC9voDYLbSG3Z1YatPvpdWmyqFVvTfQnpIWPQ8IKqpU2f+Knd 9UmdO13J+PQoFEmvPCD+wLGpfQmkIewTf3XeFycdeyMbW+pO27zfOKvCEzIIS38ZYm4I DhBxntWY8UVlHwfpeybCmcayYz0Kwoda7wuKchK9PG4umndDdiRjDpyfL1c0bW/kJYId nbqt8JLEti9mER5RSq6B9sORjs2nkL9SBSp1O00nh1dmmh0/sOe+z8YtkcxuK7vaQoOj zr9Q== X-Gm-Message-State: AODbwcCuqB9z3WPsYglV9EwzvHt2FabDLDpFlCHZ1q9jB6d3enTTU5H3 Xboet6vz2XWEmEUo X-Received: by 10.99.97.6 with SMTP id v6mr5405831pgb.186.1494607350775; Fri, 12 May 2017 09:42:30 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id u74sm7304499pfk.58.2017.05.12.09.42.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 May 2017 09:42:30 -0700 (PDT) From: Brian Norris To: Ganapathi Bhat , Nishant Sarmukadam Cc: , Dmitry Torokhov , Amitkumar Karwar , Kalle Valo , linux-wireless@vger.kernel.org, Doug Anderson , Brian Norris Subject: [PATCH 07/11] mwifiex: remove useless 'mwifiex_lock' Date: Fri, 12 May 2017 09:42:04 -0700 Message-Id: <20170512164208.38725-7-briannorris@chromium.org> X-Mailer: git-send-email 2.13.0.rc2.291.g57267f2277-goog In-Reply-To: <20170512164208.38725-1-briannorris@chromium.org> References: <20170512164208.38725-1-briannorris@chromium.org> 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 If mwifiex_shutdown_drv() is racing with another mwifiex_shutdown_drv(), we *really* have problems. Kill the lock. Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/init.c | 4 ---- drivers/net/wireless/marvell/mwifiex/main.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c index 2ada202c72ec..2bff87bd76a6 100644 --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell/mwifiex/init.c @@ -439,7 +439,6 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter) struct mwifiex_private *priv; s32 i, j; - spin_lock_init(&adapter->mwifiex_lock); spin_lock_init(&adapter->int_lock); spin_lock_init(&adapter->main_proc_lock); spin_lock_init(&adapter->mwifiex_cmd_lock); @@ -693,11 +692,8 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter) spin_unlock_irqrestore(&adapter->rx_proc_lock, flags); - spin_lock(&adapter->mwifiex_lock); - mwifiex_adapter_cleanup(adapter); - spin_unlock(&adapter->mwifiex_lock); adapter->hw_status = MWIFIEX_HW_STATUS_NOT_READY; } diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h index bb2a467d8b13..66c184936c95 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.h +++ b/drivers/net/wireless/marvell/mwifiex/main.h @@ -870,8 +870,6 @@ struct mwifiex_adapter { bool rx_locked; bool main_locked; struct mwifiex_bss_prio_tbl bss_prio_tbl[MWIFIEX_MAX_BSS_NUM]; - /* spin lock for init/shutdown */ - spinlock_t mwifiex_lock; /* spin lock for main process */ spinlock_t main_proc_lock; u32 mwifiex_processing;