From: Vitaly Bordug <vitb@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: netdev@vger.kernel.org, jgarzik@pobox.com, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2/7] fs_enet: Whitespace cleanup.
Date: Thu, 23 Aug 2007 01:04:37 +0400 [thread overview]
Message-ID: <20070823010437.39a25b69@localhost.localdomain> (raw)
In-Reply-To: <20070817175359.GB9218@ld0162-tx32.am.freescale.net>
On Fri, 17 Aug 2007 12:53:59 -0500
Scott Wood wrote:
> Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Vitaly Bordug <vitb@kernel.crashing.org>
> ---
> drivers/net/fs_enet/fs_enet-main.c | 85
> ++++++++++++++++-------------------
> drivers/net/fs_enet/fs_enet.h | 4 +-
> drivers/net/fs_enet/mac-fcc.c | 1 -
> drivers/net/fs_enet/mii-fec.c | 1 - 4 files changed, 41
> insertions(+), 50 deletions(-)
>
> diff --git a/drivers/net/fs_enet/fs_enet-main.c
> b/drivers/net/fs_enet/fs_enet-main.c index a4a2a0e..f261b90 100644
> --- a/drivers/net/fs_enet/fs_enet-main.c
> +++ b/drivers/net/fs_enet/fs_enet-main.c
> @@ -353,7 +353,6 @@ static void fs_enet_tx(struct net_device *dev)
>
> do_wake = do_restart = 0;
> while (((sc = CBDR_SC(bdp)) & BD_ENET_TX_READY) == 0) {
> -
> dirtyidx = bdp - fep->tx_bd_base;
>
> if (fep->tx_free == fep->tx_ring)
> @@ -454,7 +453,6 @@ fs_enet_interrupt(int irq, void *dev_id)
>
> nr = 0;
> while ((int_events = (*fep->ops->get_int_events)(dev)) != 0)
> { -
> nr++;
>
> int_clr_events = int_events;
> @@ -710,45 +708,43 @@ static void fs_timeout(struct net_device *dev)
> *-----------------------------------------------------------------------------*/
> static void generic_adjust_link(struct net_device *dev)
> {
> - struct fs_enet_private *fep = netdev_priv(dev);
> - struct phy_device *phydev = fep->phydev;
> - int new_state = 0;
> -
> - if (phydev->link) {
> -
> - /* adjust to duplex mode */
> - if (phydev->duplex != fep->oldduplex){
> - new_state = 1;
> - fep->oldduplex = phydev->duplex;
> - }
> -
> - if (phydev->speed != fep->oldspeed) {
> - new_state = 1;
> - fep->oldspeed = phydev->speed;
> - }
> -
> - if (!fep->oldlink) {
> - new_state = 1;
> - fep->oldlink = 1;
> - netif_schedule(dev);
> - netif_carrier_on(dev);
> - netif_start_queue(dev);
> - }
> -
> - if (new_state)
> - fep->ops->restart(dev);
> -
> - } else if (fep->oldlink) {
> - new_state = 1;
> - fep->oldlink = 0;
> - fep->oldspeed = 0;
> - fep->oldduplex = -1;
> - netif_carrier_off(dev);
> - netif_stop_queue(dev);
> - }
> -
> - if (new_state && netif_msg_link(fep))
> - phy_print_status(phydev);
> + struct fs_enet_private *fep = netdev_priv(dev);
> + struct phy_device *phydev = fep->phydev;
> + int new_state = 0;
> +
> + if (phydev->link) {
> + /* adjust to duplex mode */
> + if (phydev->duplex != fep->oldduplex) {
> + new_state = 1;
> + fep->oldduplex = phydev->duplex;
> + }
> +
> + if (phydev->speed != fep->oldspeed) {
> + new_state = 1;
> + fep->oldspeed = phydev->speed;
> + }
> +
> + if (!fep->oldlink) {
> + new_state = 1;
> + fep->oldlink = 1;
> + netif_schedule(dev);
> + netif_carrier_on(dev);
> + netif_start_queue(dev);
> + }
> +
> + if (new_state)
> + fep->ops->restart(dev);
> + } else if (fep->oldlink) {
> + new_state = 1;
> + fep->oldlink = 0;
> + fep->oldspeed = 0;
> + fep->oldduplex = -1;
> + netif_carrier_off(dev);
> + netif_stop_queue(dev);
> + }
> +
> + if (new_state && netif_msg_link(fep))
> + phy_print_status(phydev);
> }
>
>
> @@ -792,7 +788,6 @@ static int fs_init_phy(struct net_device *dev)
> return 0;
> }
>
> -
> static int fs_enet_open(struct net_device *dev)
> {
> struct fs_enet_private *fep = netdev_priv(dev);
> @@ -978,7 +973,7 @@ static struct net_device *fs_init_instance(struct
> device *dev, #endif
>
> #ifdef CONFIG_FS_ENET_HAS_SCC
> - if (fs_get_scc_index(fpi->fs_no) >=0 )
> + if (fs_get_scc_index(fpi->fs_no) >= 0)
> fep->ops = &fs_scc_ops;
> #endif
>
> @@ -1069,9 +1064,8 @@ static struct net_device
> *fs_init_instance(struct device *dev,
> return ndev;
>
> - err:
> +err:
> if (ndev != NULL) {
> -
> if (registered)
> unregister_netdev(ndev);
>
> @@ -1262,7 +1256,6 @@ static int __init fs_init(void)
> err:
> cleanup_immap();
> return r;
> -
> }
>
> static void __exit fs_cleanup(void)
> diff --git a/drivers/net/fs_enet/fs_enet.h
> b/drivers/net/fs_enet/fs_enet.h index 569be22..72a61e9 100644
> --- a/drivers/net/fs_enet/fs_enet.h
> +++ b/drivers/net/fs_enet/fs_enet.h
> @@ -15,8 +15,8 @@
> #include <asm/commproc.h>
>
> struct fec_info {
> - fec_t* fecp;
> - u32 mii_speed;
> + fec_t *fecp;
> + u32 mii_speed;
> };
> #endif
>
> diff --git a/drivers/net/fs_enet/mac-fcc.c
> b/drivers/net/fs_enet/mac-fcc.c index 5603121..ad3c5fa 100644
> --- a/drivers/net/fs_enet/mac-fcc.c
> +++ b/drivers/net/fs_enet/mac-fcc.c
> @@ -86,7 +86,6 @@
> static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 mcn,
> u32 op) {
> const struct fs_platform_info *fpi = fep->fpi;
> -
> cpm2_map_t *immap = fs_enet_immap;
> cpm_cpm2_t *cpmp = &immap->im_cpm;
> u32 v;
> diff --git a/drivers/net/fs_enet/mii-fec.c
> b/drivers/net/fs_enet/mii-fec.c index 0a563a8..53db696 100644
> --- a/drivers/net/fs_enet/mii-fec.c
> +++ b/drivers/net/fs_enet/mii-fec.c
> @@ -113,7 +113,6 @@ static int fs_enet_fec_mii_read(struct mii_bus
> *bus , int phy_id, int location) }
>
> return ret;
> -
> }
>
> static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id,
> int location, u16 val)
--
Sincerely, Vitaly
next prev parent reply other threads:[~2007-08-22 21:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 17:53 [PATCH 0/7] fs_enet patches Scott Wood
2007-08-17 17:53 ` [PATCH 1/7] Generic bitbanged MDIO library Scott Wood
2007-08-31 13:23 ` Jeff Garzik
2007-08-31 15:16 ` Scott Wood
2007-08-17 17:53 ` [PATCH 2/7] fs_enet: Whitespace cleanup Scott Wood
2007-08-22 21:04 ` Vitaly Bordug [this message]
2007-08-31 13:19 ` Jeff Garzik
2007-08-17 17:54 ` [PATCH 3/7] fs_enet: Don't share the interrupt Scott Wood
2007-08-17 17:54 ` [PATCH 4/7] fs_enet: mac-fcc: Eliminate __fcc-* macros Scott Wood
2007-08-22 21:08 ` Vitaly Bordug
2007-08-22 21:17 ` Scott Wood
2007-08-17 17:54 ` [PATCH 5/7] fs_enet: Align receive buffers Scott Wood
2007-08-17 17:54 ` [PATCH 6/7] fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set Scott Wood
2007-08-17 17:54 ` [PATCH 7/7] fs_enet: sparse fixes Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070823010437.39a25b69@localhost.localdomain \
--to=vitb@kernel.crashing.org \
--cc=jgarzik@pobox.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).