From: Matthew Wilcox <willy@debian.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH] ethtool_ops bug
Date: Wed, 27 Aug 2003 16:56:02 +0100 [thread overview]
Message-ID: <20030827155602.GD22294@parcelfarce.linux.theplanet.co.uk> (raw)
C's switch statements need breaks. I know that.
Index: net/core/ethtool.c
===================================================================
RCS file: /var/cvs/linux-2.6/net/core/ethtool.c,v
retrieving revision 1.1
diff -u -p -r1.1 ethtool.c
--- net/core/ethtool.c 23 Aug 2003 02:47:29 -0000 1.1
+++ net/core/ethtool.c 27 Aug 2003 15:55:03 -0000
@@ -502,15 +502,15 @@ static int ethtool_get_strings(struct ne
switch (gstrings.string_set) {
case ETH_SS_TEST:
- if (ops->self_test_count)
- gstrings.len = ops->self_test_count(dev);
- else
+ if (!ops->self_test_count)
return -EOPNOTSUPP;
+ gstrings.len = ops->self_test_count(dev);
+ break;
case ETH_SS_STATS:
- if (ops->get_stats_count)
- gstrings.len = ops->get_stats_count(dev);
- else
+ if (!ops->get_stats_count)
return -EOPNOTSUPP;
+ gstrings.len = ops->get_stats_count(dev);
+ break;
default:
return -EINVAL;
}
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next reply other threads:[~2003-08-27 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-27 15:56 Matthew Wilcox [this message]
2003-08-27 21:55 ` [PATCH] ethtool_ops bug Jeff Garzik
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=20030827155602.GD22294@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=jgarzik@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.