From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACCAAC3815B for ; Mon, 20 Apr 2020 12:49:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8606820747 for ; Mon, 20 Apr 2020 12:49:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587386979; bh=lxkUJsM0iAOAiyGAre8OHyc12fzmfOmeCmAa/EcSP8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lmVxzBnFVMKXNhTqqnsn8cy9vGboDq3ddjgJa+gpW1V9BocffwM/v4LcxBsuqdzDR Q8iXxK39IsdEIHPoV7YAAFqbnbLitJ1+VaWCRZF4t+zF8D0xIdCCLPE4uPRXu61txO Qvmp4CRIQZumIm5VYwUA3e/g/u44jn22cQ1xOfMQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729457AbgDTMtj (ORCPT ); Mon, 20 Apr 2020 08:49:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:46442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729424AbgDTMt2 (ORCPT ); Mon, 20 Apr 2020 08:49:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0580C206DD; Mon, 20 Apr 2020 12:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587386967; bh=lxkUJsM0iAOAiyGAre8OHyc12fzmfOmeCmAa/EcSP8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AXlVO1yCF4YKz3/p5UDXA+FhtEhYbddJ7m1fcC3o8LfYYXymU9lIYTDyKrvTDK2WR YUDulrg371SiEtBq8JZ1HZbTd2AGS2UWMW4JBtnmgayLYDwddIDoaRnpJR4tNSyVhM KrA07MAJJ8lbiQkQACBlOUn1Mp3nASYV7ViMjrXk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Karthick Gopalasubramanian , Maya Erez , Kalle Valo , Lee Jones Subject: [PATCH 4.19 39/40] wil6210: remove reset file from debugfs Date: Mon, 20 Apr 2020 14:39:49 +0200 Message-Id: <20200420121507.866464684@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420121444.178150063@linuxfoundation.org> References: <20200420121444.178150063@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Karthick Gopalasubramanian commit 32dcfe8316cdbd885542967c0c85f5b9de78874b upstream. Reset file is not used and may cause race conditions with operational driver if used. Signed-off-by: Karthick Gopalasubramanian Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/wil6210/debugfs.c | 27 --------------------------- 1 file changed, 27 deletions(-) --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -730,32 +730,6 @@ struct dentry *wil_debugfs_create_ioblob return debugfs_create_file(name, mode, parent, wil_blob, &fops_ioblob); } -/*---reset---*/ -static ssize_t wil_write_file_reset(struct file *file, const char __user *buf, - size_t len, loff_t *ppos) -{ - struct wil6210_priv *wil = file->private_data; - struct net_device *ndev = wil->main_ndev; - - /** - * BUG: - * this code does NOT sync device state with the rest of system - * use with care, debug only!!! - */ - rtnl_lock(); - dev_close(ndev); - ndev->flags &= ~IFF_UP; - rtnl_unlock(); - wil_reset(wil, true); - - return len; -} - -static const struct file_operations fops_reset = { - .write = wil_write_file_reset, - .open = simple_open, -}; - /*---write channel 1..4 to rxon for it, 0 to rxoff---*/ static ssize_t wil_write_file_rxon(struct file *file, const char __user *buf, size_t len, loff_t *ppos) @@ -2461,7 +2435,6 @@ static const struct { {"desc", 0444, &fops_txdesc}, {"bf", 0444, &fops_bf}, {"mem_val", 0644, &fops_memread}, - {"reset", 0244, &fops_reset}, {"rxon", 0244, &fops_rxon}, {"tx_mgmt", 0244, &fops_txmgmt}, {"wmi_send", 0244, &fops_wmi},