From: Jeff Garzik <jgarzik@pobox.com>
To: Art Haas <ahaas@airmail.net>
Cc: netdev@oss.sgi.com, "David S. Miller" <davem@redhat.com>
Subject: Re: [PATCH] Add C99 initializers to ethtool.c
Date: Thu, 19 Feb 2004 19:24:54 -0500 [thread overview]
Message-ID: <403553D6.60101@pobox.com> (raw)
In-Reply-To: <20040219001633.GC9704@artsapartment.org>
Art Haas wrote:
> Hi.
>
> Here's a little patch adding C99 initializers to ethtool.c. The patch is
> against the current BK, and the file has been recompiled with the
> changes successfully.
>
> This patch and the one I just sent for the netfilter file were changed
> to make the code easier to read and to remove warnings if a '-W' flag is
> added to the compile command.
>
> Art Haas
>
> ===== net/core/ethtool.c 1.9 vs edited =====
> --- 1.9/net/core/ethtool.c Sun Oct 12 06:18:38 2003
> +++ edited/net/core/ethtool.c Wed Feb 18 17:22:52 2004
> @@ -76,7 +76,7 @@
>
> static int ethtool_get_settings(struct net_device *dev, void *useraddr)
> {
> - struct ethtool_cmd cmd = { ETHTOOL_GSET };
> + struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };
> int err;
>
> if (!dev->ethtool_ops->get_settings)
> @@ -168,7 +168,7 @@
>
> static int ethtool_get_wol(struct net_device *dev, char *useraddr)
> {
> - struct ethtool_wolinfo wol = { ETHTOOL_GWOL };
> + struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
>
> if (!dev->ethtool_ops->get_wol)
> return -EOPNOTSUPP;
Since it doesn't warn without -W, I would rather leave it in its more
compact form...
Jeff
prev parent reply other threads:[~2004-02-20 0:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 0:16 [PATCH] Add C99 initializers to ethtool.c Art Haas
2004-02-20 0:24 ` Jeff Garzik [this message]
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=403553D6.60101@pobox.com \
--to=jgarzik@pobox.com \
--cc=ahaas@airmail.net \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.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).