From patchwork Mon Jun 12 10:42:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 9780729 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 CD1FB60212 for ; Mon, 12 Jun 2017 10:43:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF6D72858B for ; Mon, 12 Jun 2017 10:43:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B43A2285CA; Mon, 12 Jun 2017 10:43:04 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3892C2858B for ; Mon, 12 Jun 2017 10:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KbuJoAqUpSvzSMGkVUKO2oUaLPJTiLRiWbjRnHXjlug=; b=h/4BZ3iPzjWhua l/ka7Vs+2q0TuTLk1Wz2CGw5WvdX5RbnLEzTRl4TLwRtp2UPTsqGMmfOUJs21x3sLOLjepRhvR1xs idKP9ckdRVkJtVe2cZMjBBkuGsIf+0ty2rvTB8juUy/J3wnb26HbDjW6mwdU/9Ce9zGSAeQaYDxvv 2HmW/ph4ftqHlns+8r13qxhvosC0xEWSbAZ6PjtgsBVxHGousjv4NG/DlkW0vTQUf4W7dD/lsu4OJ Nz13TF7Su05XPaNo9nCk5W7VyaJoAL6cUhqGQhiSCClWyLT0Qy+p0YnJjkPf9HV98GQVkb9d/eK3a ZpS3MUsTIeK4LODkJL7Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKMoJ-0008Ew-6j; Mon, 12 Jun 2017 10:43:03 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dKMoE-0008AH-Rj for linux-arm-kernel@lists.infradead.org; Mon, 12 Jun 2017 10:43:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Wb+e58PVx6KtqcJwqeeEHMTT4wmY3IdyK1yRjkHdQSc=; b=EEnB0m2UsjGoSPKu6hjwVfgDBBYnez72UArZWXOKVnwT93nb/RZNO1ycfPEELHodNN+CNTFQFVJ8E8oOtwPKxEQL9Ec2omJBipkeMX9R2IH70fy2mYInhCP3TwlLuLqLI/+0+iehSc4HbVa2zyLUtExrDWIntcGybVKaMcEdAr0=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:34540) by pandora.armlinux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1dKMne-0000JE-4Z; Mon, 12 Jun 2017 11:42:22 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.76) (envelope-from ) id 1dKMnb-0002fK-3Z; Mon, 12 Jun 2017 11:42:19 +0100 Date: Mon, 12 Jun 2017 11:42:18 +0100 From: Russell King - ARM Linux To: Antoine Tenart Subject: Re: [PATCH v3 7/9] net: mvmdio: add xmdio xsmi support Message-ID: <20170612104218.GA10223@n2100.armlinux.org.uk> References: <20170612095745.11300-1-antoine.tenart@free-electrons.com> <20170612095745.11300-8-antoine.tenart@free-electrons.com> <20170612101739.GA4902@n2100.armlinux.org.uk> <20170612104126.GB4902@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170612104126.GB4902@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170612_034259_338097_5A291DA7 X-CRM114-Status: GOOD ( 13.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch, f.fainelli@gmail.com, jason@lakedaemon.net, netdev@vger.kernel.org, nadavh@marvell.com, gregory.clement@free-electrons.com, mw@semihalf.com, davem@davemloft.net, linux-arm-kernel@lists.infradead.org, sebastian.hesselbarth@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Russell King Subject: [PATCH 1/2] net: mvmdio: remove duplicate locking The MDIO layer already provides per-bus locking, so there's no need for MDIO bus drivers to do their own internal locking. Remove this. Signed-off-by: Russell King --- drivers/net/ethernet/marvell/mvmdio.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index c43747f0be0b..d6770217965e 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -69,7 +68,6 @@ enum orion_mdio_bus_type { }; struct orion_mdio_dev { - struct mutex lock; void __iomem *regs; struct clk *clk[3]; /* @@ -254,8 +252,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id, if (IS_ERR(ops)) return PTR_ERR(ops); - mutex_lock(&dev->lock); - ret = orion_mdio_wait_ready(ops, bus); if (ret < 0) goto out; @@ -274,7 +270,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id, ret = ops->read(dev); out: - mutex_unlock(&dev->lock); return ret; } @@ -289,8 +284,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id, if (IS_ERR(ops)) return PTR_ERR(ops); - mutex_lock(&dev->lock); - ret = orion_mdio_wait_ready(ops, bus); if (ret < 0) goto out; @@ -298,7 +291,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id, ops->write(dev, mii_id, regnum, value); out: - mutex_unlock(&dev->lock); return ret; } @@ -382,8 +374,6 @@ static int orion_mdio_probe(struct platform_device *pdev) dev->bus_type = (enum orion_mdio_bus_type)of_device_get_match_data(&pdev->dev); - mutex_init(&dev->lock); - if (pdev->dev.of_node) ret = of_mdiobus_register(bus, pdev->dev.of_node); else