Received: by 10.192.165.148 with SMTP id m20csp348594imm; Thu, 3 May 2018 22:02:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZod/oyh1Ug4wMc4iUq9DF8S6AR9XArHQJhQGg92mI3AYTyE5iA+1B7u+0Y6PtoxexHtgLF7 X-Received: by 2002:a17:902:1c7:: with SMTP id b65-v6mr26403176plb.298.1525410169619; Thu, 03 May 2018 22:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525410169; cv=none; d=google.com; s=arc-20160816; b=ikxB8IZEOwcZLVxsIJ9GvzKs7y+KfTkDbhTS8RKNv8tGB5Iugo3Iqvdt+reS1v6sUO FouyW+caH+B1rnVf+defKX5OV7vF2dW1GZ/nRH4LSrS0BYT0AG327yTcd6JmV4mIkvdN io7KnOOm1XoQ2cwu0SdpjSwXF2soogDQSeLl2cxFBv2f80SwhhFahmSjmg2cOs/u2auN OXtol5dQ5r7hAUWMl6d3kV1luT1kffyc33JDHs62Lo9UxCUtd170tPyLpK+WHh5/aGz5 99ikNr2MdHqv8QcY6B7MAu0H13pgJ7uKT/1vBwH+bHrXGb57ynFHsuLAFjP4HIHs04xC Ib+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:cc:subject:date:to :from:arc-authentication-results; bh=+up35jJyDFvXB5tVMpI0iiymdJR9XjmHJNLnQm1/Tw4=; b=t1t+HMKkMON9POO1XDRwKP/Xiv54GpCJtLXN8Ew+fv7o5pZK+S7/vg1vRD9F1+KiXy MZDdNAeK4h4T/BmiNyhqG70kGb43EmgHW84NXCbnoDmbj00csbAlYkP8c1OwYjInztdS X5qz9/plPgYzJ1eopFvgM6OLkwvlPdCE3FFsiBp3FPVGPXA2TwmbQpVyknVPlk4azNsU zhZU/cK1HtwCfjkt92CntCGS+UUuJihbNtKHxZM6ghTpSlXAVYJam7WyOTMmWFwjnO68 x+aTxOSVJ/tF+bT09HJf7OzbqOESUYvxxpgRsZ2ddGCWSzdKdDyKBpJCHIFwyjGPvFh2 V6+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si5248110pld.50.2018.05.03.22.02.35; Thu, 03 May 2018 22:02:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751374AbeEDFBA (ORCPT + 99 others); Fri, 4 May 2018 01:01:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:48344 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbeEDFA6 (ORCPT ); Fri, 4 May 2018 01:00:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 16D06ABE9; Fri, 4 May 2018 05:00:57 +0000 (UTC) From: NeilBrown To: Greg Kroah-Hartman Date: Fri, 04 May 2018 14:58:35 +1000 Subject: [PATCH 2/8] staging: mt7621-spi: remove unused lock. Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Message-ID: <152540991592.12190.11665748499471801563.stgit@noble> In-Reply-To: <152540982998.12190.15220622955317261586.stgit@noble> References: <152540982998.12190.15220622955317261586.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This lock is never initialized, locked once, and never unlocked. Clearly it is pointless - so remove it. Signed-off-by: NeilBrown --- drivers/staging/mt7621-spi/spi-mt7621.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c index d9b55d2059b0..37f299080410 100644 --- a/drivers/staging/mt7621-spi/spi-mt7621.c +++ b/drivers/staging/mt7621-spi/spi-mt7621.c @@ -65,7 +65,6 @@ struct mt7621_spi { unsigned int sys_freq; unsigned int speed; struct clk *clk; - spinlock_t lock; struct mt7621_spi_ops *ops; }; @@ -395,7 +394,6 @@ static int mt7621_spi_probe(struct platform_device *pdev) const struct of_device_id *match; struct spi_master *master; struct mt7621_spi *rs; - unsigned long flags; void __iomem *base; struct resource *r; int status = 0; @@ -447,7 +445,6 @@ static int mt7621_spi_probe(struct platform_device *pdev) rs->sys_freq = clk_get_rate(rs->clk); rs->ops = ops; dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq); - spin_lock_irqsave(&rs->lock, flags); device_reset(&pdev->dev);