From: Andre Guedes <andre.guedes@intel.com>
To: netdev@vger.kernel.org
Cc: mkubecek@suse.cz
Subject: [PATCH ethtool] igc: Fix output values case
Date: Mon, 20 Jul 2020 12:00:38 -0700 [thread overview]
Message-ID: <20200720190038.11193-1-andre.guedes@intel.com> (raw)
This patch changes the output values to be lowercase and replaces
"True"/"False" by "yes"/"no" so the output from the IGC driver is
consistent with other Intel drivers.
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
---
igc.c | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/igc.c b/igc.c
index 9c0a750..2c4abce 100644
--- a/igc.c
+++ b/igc.c
@@ -81,17 +81,17 @@
static const char *bit_to_boolean(u32 val)
{
- return val ? "True" : "False";
+ return val ? "yes" : "no";
}
static const char *bit_to_enable(u32 val)
{
- return val ? "Enabled" : "Disabled";
+ return val ? "enabled" : "disabled";
}
static const char *bit_to_prio(u32 val)
{
- return val ? "Low" : "High";
+ return val ? "low" : "high";
}
int igc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
@@ -138,23 +138,23 @@ int igc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
bit_to_enable(reg & RCTL_LPE),
(reg & RCTL_LBM) == RCTL_LBM_PHY ? "PHY" :
(reg & RCTL_LBM) == RCTL_LBM_MAC ? "MAC" :
- "Undefined",
- (reg & RCTL_HSEL) == RCTL_HSEL_MULTICAST ? "Multicast Only" :
- (reg & RCTL_HSEL) == RCTL_HSEL_UNICAST ? "Unicast Only" :
- (reg & RCTL_HSEL) == RCTL_HSEL_BOTH ? "Multicast and Unicast" :
- "Reserved",
- (reg & RCTL_MO) == RCTL_MO_47_36 ? "Bits [47:36]" :
- (reg & RCTL_MO) == RCTL_MO_43_32 ? "Bits [43:32]" :
- (reg & RCTL_MO) == RCTL_MO_39_28 ? "Bits [39:28]" :
- "Bits [35:24]",
+ "undefined",
+ (reg & RCTL_HSEL) == RCTL_HSEL_MULTICAST ? "multicast only" :
+ (reg & RCTL_HSEL) == RCTL_HSEL_UNICAST ? "unicast only" :
+ (reg & RCTL_HSEL) == RCTL_HSEL_BOTH ? "multicast and unicast" :
+ "reserved",
+ (reg & RCTL_MO) == RCTL_MO_47_36 ? "bits [47:36]" :
+ (reg & RCTL_MO) == RCTL_MO_43_32 ? "bits [43:32]" :
+ (reg & RCTL_MO) == RCTL_MO_39_28 ? "bits [39:28]" :
+ "bits [35:24]",
bit_to_enable(reg & RCTL_BAM),
- (reg & RCTL_BSIZE) == RCTL_BSIZE_2048 ? "2048 Bytes" :
- (reg & RCTL_BSIZE) == RCTL_BSIZE_1024 ? "1024 Bytes" :
- (reg & RCTL_BSIZE) == RCTL_BSIZE_512 ? "512 Bytes" :
- "256 Bytes",
+ (reg & RCTL_BSIZE) == RCTL_BSIZE_2048 ? "2048 bytes" :
+ (reg & RCTL_BSIZE) == RCTL_BSIZE_1024 ? "1024 bytes" :
+ (reg & RCTL_BSIZE) == RCTL_BSIZE_512 ? "512 bytes" :
+ "256 bytes",
bit_to_enable(reg & RCTL_VFE),
bit_to_enable(reg & RCTL_CFIEN),
- reg & RCTL_CFI ? "Discarded" : "Accepted",
+ reg & RCTL_CFI ? "discarded" : "accepted",
bit_to_enable(reg & RCTL_PSP),
bit_to_enable(reg & RCTL_DPF),
bit_to_enable(reg & RCTL_PMCF),
@@ -187,7 +187,7 @@ int igc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
" Address Valid: %s\n",
offset + i, i,
reg & RAH_RAH,
- reg & RAH_ASEL ? "Source" : "Destination",
+ reg & RAH_ASEL ? "source" : "destination",
(reg & RAH_QSEL) >> RAH_QSEL_SHIFT,
bit_to_boolean(reg & RAH_QSEL_EN),
bit_to_boolean(reg & RAH_AV));
--
2.26.2
next reply other threads:[~2020-07-20 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 19:00 Andre Guedes [this message]
2020-07-20 21:32 ` [PATCH ethtool] igc: Fix output values case Michal Kubecek
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=20200720190038.11193-1-andre.guedes@intel.com \
--to=andre.guedes@intel.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/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).