From patchwork Sun Jan 5 00:18:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 306898 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id ACAC22C00A5 for ; Sun, 5 Jan 2014 10:18:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755126AbaADXSa (ORCPT ); Sat, 4 Jan 2014 18:18:30 -0500 Received: from mail-lb0-f179.google.com ([209.85.217.179]:63298 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754739AbaADXS3 (ORCPT ); Sat, 4 Jan 2014 18:18:29 -0500 Received: by mail-lb0-f179.google.com with SMTP id w7so8921741lbi.38 for ; Sat, 04 Jan 2014 15:18:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=D3drcSu3+x3erJPM3F8F0aaIPgaWrXmkjiCdEowa4i4=; b=m7dcuzblz67S+Cn0ZKvM3tu0Xq88HHeG1HblLX3wJONog7Ev1VfuC+pqaArVwoTfb4 fyTu9JCyqK9ZsscOLFBDzvy5/VjnyPLVVj31mNZkKjJAlmgT2oyscvf6GmXLlVHfvA5t Lr3+ktMfvKuHNwtkJhVIi72Kjya7EGwfmK7cbrWavIDhjMcsY9ZBU3o20rNoAw7/vdAp cnrT/TO/01vKfQgwc5NKpzWr6bFPUMsJenYF0YosaZQ2qh55lVcizAbhD66bZz5KMrqm ZHSpCFnxd+4EM9rtpnE+BH3UDtx7B4CRGesYgFokLFw8vO++NrUaLYbc5GrhZx4/gB88 dBWQ== X-Gm-Message-State: ALoCoQlQYEN3dcqGrgZatOa7MsX/Jg5j9PH0FwL2/BNQ/lct0Hs57hIfMSJ0FIjaY69MZzBpRsdR X-Received: by 10.152.44.225 with SMTP id h1mr40461750lam.22.1388877508072; Sat, 04 Jan 2014 15:18:28 -0800 (PST) Received: from wasted.dev.rtsoft.ru (ppp91-76-87-5.pppoe.mtu-net.ru. [91.76.87.5]) by mx.google.com with ESMTPSA id mx3sm39484458lbc.14.2014.01.04.15.18.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 04 Jan 2014 15:18:26 -0800 (PST) From: Sergei Shtylyov Organization: Cogent Embedded To: netdev@vger.kernel.org Subject: [PATCH v2 2/8] mdio_bus: coding style fixes Date: Sun, 5 Jan 2014 03:18:27 +0300 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) References: <201401050315.29587.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201401050315.29587.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201401050318.27852.sergei.shtylyov@cogentembedded.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The recent patch from Florian Fainelli fixed all 'checkpatch.pl' errors but left some warnings like: - including instead of ; - including instead of ; - block comments using empty /* line; - 'struct dev_pm_ops' variable not being *const*. While fixing these, also fix the following style issues (some of which were found running 'checkpatch.pl --strict'): - alignment not matching open paren; - file name in the heading comment. Signed-off-by: Sergei Shtylyov --- drivers/net/phy/mdio_bus.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/drivers/net/phy/mdio_bus.c =================================================================== --- net-next.orig/drivers/net/phy/mdio_bus.c +++ net-next/drivers/net/phy/mdio_bus.c @@ -1,7 +1,4 @@ -/* - * drivers/net/phy/mdio_bus.c - * - * MDIO Bus interface +/* MDIO Bus interface * * Author: Andy Fleming * @@ -36,10 +33,10 @@ #include #include #include +#include +#include -#include #include -#include /** * mdiobus_alloc_size - allocate a mii_bus structure @@ -139,8 +136,7 @@ int mdiobus_register(struct mii_bus *bus int i, err; if (NULL == bus || NULL == bus->name || - NULL == bus->read || - NULL == bus->write) + NULL == bus->read || NULL == bus->write) return -EINVAL; BUG_ON(bus->state != MDIOBUS_ALLOCATED && @@ -214,9 +210,7 @@ EXPORT_SYMBOL(mdiobus_unregister); */ void mdiobus_free(struct mii_bus *bus) { - /* - * For compatibility with error handling in drivers. - */ + /* For compatibility with error handling in drivers. */ if (bus->state == MDIOBUS_ALLOCATED) { kfree(bus); return; @@ -335,15 +329,13 @@ static bool mdio_bus_phy_may_suspend(str if (!netdev) return true; - /* - * Don't suspend PHY if the attched netdev parent may wakeup. + /* Don't suspend PHY if the attched netdev parent may wakeup. * The parent may point to a PCI device, as in tg3 driver. */ if (netdev->dev.parent && device_may_wakeup(netdev->dev.parent)) return false; - /* - * Also don't suspend PHY if the netdev itself may wakeup. This + /* Also don't suspend PHY if the netdev itself may wakeup. This * is the case for devices w/o underlaying pwr. mgmt. aware bus, * e.g. SoC devices. */ @@ -358,8 +350,7 @@ static int mdio_bus_suspend(struct devic struct phy_driver *phydrv = to_phy_driver(dev->driver); struct phy_device *phydev = to_phy_device(dev); - /* - * We must stop the state machine manually, otherwise it stops out of + /* We must stop the state machine manually, otherwise it stops out of * control, possibly with the phydev->lock held. Upon resume, netdev * may call phy routines that try to grab the same lock, and that may * lead to a deadlock. @@ -415,7 +406,7 @@ static int mdio_bus_restore(struct devic return 0; } -static struct dev_pm_ops mdio_bus_pm_ops = { +static const struct dev_pm_ops mdio_bus_pm_ops = { .suspend = mdio_bus_suspend, .resume = mdio_bus_resume, .freeze = mdio_bus_suspend,