mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Petko Manolov <petkan@nucleusys.com>
Cc: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] drivers: net: usb: rtl8150: making the code a bit better looking
Date: Mon, 20 May 2013 15:52:15 +0100	[thread overview]
Message-ID: <1369061535.4616.2.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1305182314500.16874@fry.nucleusys.com>

On Sat, 2013-05-18 at 23:21 +0300, Petko Manolov wrote:
[...]
> @@ -681,16 +681,15 @@ static int rtl8150_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
>  }
>  
>  static const struct net_device_ops rtl8150_netdev_ops = {
> -	.ndo_open		= rtl8150_open,
> -	.ndo_stop		= rtl8150_close,
> -	.ndo_do_ioctl		= rtl8150_ioctl,
> -	.ndo_start_xmit		= rtl8150_start_xmit,
> -	.ndo_tx_timeout		= rtl8150_tx_timeout,
> -	.ndo_set_rx_mode	= rtl8150_set_multicast,
> -	.ndo_set_mac_address	= rtl8150_set_mac_address,
> -
> -	.ndo_change_mtu		= eth_change_mtu,
> -	.ndo_validate_addr	= eth_validate_addr,
> +	.ndo_open = rtl8150_open,
> +	.ndo_stop = rtl8150_close,
> +	.ndo_do_ioctl = rtl8150_ioctl,
> +	.ndo_start_xmit = rtl8150_start_xmit,
> +	.ndo_tx_timeout = rtl8150_tx_timeout,
> +	.ndo_set_rx_mode = rtl8150_set_multicast,
> +	.ndo_set_mac_address = rtl8150_set_mac_address,
> +	.ndo_change_mtu	= eth_change_mtu,
> +	.ndo_validate_addr = eth_validate_addr,
>  };
>  
>  static int rtl8150_probe(struct usb_interface *intf,
[...]
> @@ -771,12 +770,12 @@ static void rtl8150_disconnect(struct usb_interface *intf)
>  }
>  
>  static struct usb_driver rtl8150_driver = {
> -	.name		= driver_name,
> -	.probe		= rtl8150_probe,
> -	.disconnect	= rtl8150_disconnect,
> -	.id_table	= rtl8150_table,
> -	.suspend	= rtl8150_suspend,
> -	.resume		= rtl8150_resume,
> +	.name = driver_name,
> +	.probe = rtl8150_probe,
> +	.disconnect = rtl8150_disconnect,
> +	.id_table = rtl8150_table,
> +	.suspend = rtl8150_suspend,
> +	.resume = rtl8150_resume,
>  	.disable_hub_initiated_lpm = 1,
>  };

These looked better before.  Lining up initialisers in a structure
definition is good style.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2013-05-20 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-18 20:21 Petko Manolov
2013-05-20 14:52 ` Ben Hutchings [this message]
2013-05-20 19:16   ` Petko Manolov

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=1369061535.4616.2.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=petkan@nucleusys.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

all inboxes | Powered by JetHome®