From: Chad Williamson <chad@dahc.us>
To: gregkh@linuxfoundation.org
Cc: puff65537@bansheeslibrary.com, viro@zeniv.linux.org.uk,
tulinizer@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, Chad Williamson <chad@dahc.us>
Subject: [PATCH 2/6] Staging: silicom: capitalize labels in the bp_media_type enum
Date: Sun, 23 Jun 2013 02:02:24 -0500 [thread overview]
Message-ID: <1371970948-26802-3-git-send-email-chad@dahc.us> (raw)
In-Reply-To: <1371970948-26802-1-git-send-email-chad@dahc.us>
Capitalize the names of the media types in enum bp_media_type in
bpctl_mod.c, as is the preffered style.
Signed-off-by: Chad Williamson <chad@dahc.us>
---
drivers/staging/silicom/bpctl_mod.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c
index 33e226d..96cda96 100644
--- a/drivers/staging/silicom/bpctl_mod.c
+++ b/drivers/staging/silicom/bpctl_mod.c
@@ -53,10 +53,10 @@ if (down_interruptible(&bpctl_sema)) { \
/* Media Types */
enum bp_media_type {
- bp_copper = 0,
- bp_fiber,
- bp_cx4,
- bp_none,
+ BP_COPPER = 0,
+ BP_FIBER,
+ BP_CX4,
+ BP_NONE,
};
struct bypass_pfs_sd {
@@ -3400,7 +3400,7 @@ static int bypass_status(bpctl_dev_t *pbpctl_dev)
BP10G_SDP7_DATA_IN) != 0 ? 0 : 1);
}
- } else if (pbpctl_dev->media_type == bp_copper) {
+ } else if (pbpctl_dev->media_type == BP_COPPER) {
return (((BPCTL_READ_REG(pbpctl_dev_b, CTRL)) &
BPCTLI_CTRL_SWDPIN1) != 0 ? 1 : 0);
@@ -3646,7 +3646,7 @@ int tap_status(bpctl_dev_t *pbpctl_dev)
BP10G_SDP6_DATA_IN) != 0 ? 0 : 1);
}
- } else if (pbpctl_dev->media_type == bp_copper)
+ } else if (pbpctl_dev->media_type == BP_COPPER)
return (((BPCTL_READ_REG(pbpctl_dev, CTRL)) &
BPCTLI_CTRL_SWDPIN0) != 0 ? 1 : 0);
else {
@@ -3741,7 +3741,7 @@ int disc_off_status(bpctl_dev_t *pbpctl_dev)
BP10G_SDP2_DATA) != 0 ? 1 : 0);
}
- if (pbpctl_dev->media_type == bp_copper) {
+ if (pbpctl_dev->media_type == BP_COPPER) {
#if 0
return ((((read_reg(pbpctl_dev, STATUS_DISC_REG_ADDR)) &
@@ -4032,36 +4032,36 @@ void bypass_caps_init(bpctl_dev_t *pbpctl_dev)
}
#endif
if ((pbpctl_dev->bp_fiber5) || (pbpctl_dev->bp_10g9)) {
- pbpctl_dev->media_type = bp_fiber;
+ pbpctl_dev->media_type = BP_FIBER;
} else if (pbpctl_dev->bp_10gb) {
if (BP10GB_CX4_SERIES(pbpctl_dev->subdevice))
- pbpctl_dev->media_type = bp_cx4;
+ pbpctl_dev->media_type = BP_CX4;
else
- pbpctl_dev->media_type = bp_fiber;
+ pbpctl_dev->media_type = BP_FIBER;
}
else if (pbpctl_dev->bp_540)
- pbpctl_dev->media_type = bp_none;
+ pbpctl_dev->media_type = BP_NONE;
else if (!pbpctl_dev->bp_10g) {
ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
if ((ctrl_ext & BPCTLI_CTRL_EXT_LINK_MODE_MASK) == 0x0)
- pbpctl_dev->media_type = bp_copper;
+ pbpctl_dev->media_type = BP_COPPER;
else
- pbpctl_dev->media_type = bp_fiber;
+ pbpctl_dev->media_type = BP_FIBER;
} else {
if (BP10G_CX4_SERIES(pbpctl_dev->subdevice))
- pbpctl_dev->media_type = bp_cx4;
+ pbpctl_dev->media_type = BP_CX4;
else
- pbpctl_dev->media_type = bp_fiber;
+ pbpctl_dev->media_type = BP_FIBER;
}
if (is_bypass_fn(pbpctl_dev)) {
pbpctl_dev->bp_caps |= BP_PWOFF_ON_CAP;
- if (pbpctl_dev->media_type == bp_fiber)
+ if (pbpctl_dev->media_type == BP_FIBER)
pbpctl_dev->bp_caps |=
(TX_CTL_CAP | TX_STATUS_CAP | TPL_CAP);
@@ -5030,7 +5030,7 @@ static int get_bypass_link_status(bpctl_dev_t *pbpctl_dev)
if (!pbpctl_dev)
return -1;
- if (pbpctl_dev->media_type == bp_fiber)
+ if (pbpctl_dev->media_type == BP_FIBER)
return ((BPCTL_READ_REG(pbpctl_dev, CTRL) &
BPCTLI_CTRL_SWDPIN1));
else
--
1.8.1.4
next prev parent reply other threads:[~2013-06-23 7:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-23 7:02 [PATCH 0/6] Staging: silicom: Remove all typedefs from bpctl_mod.c Chad Williamson
2013-06-23 7:02 ` [PATCH 1/6] Staging: silicom: remove bp_media_type enum typedef Chad Williamson
2013-06-23 7:02 ` Chad Williamson [this message]
2013-06-23 7:02 ` [PATCH 3/6] Staging: silicom: remove the bpctl_dev_t typdef Chad Williamson
2013-06-24 23:11 ` Greg KH
2013-06-23 7:02 ` [PATCH 4/6] Staging: silicom: remove the board_t typedef in bpctl_mod.c Chad Williamson
2013-06-23 7:02 ` [PATCH 5/6] Staging: silicom: remove the typedef for bpmod_info_t Chad Williamson
2013-06-23 7:02 ` [PATCH 6/6] Staging: silicom: remove typedef for dev_desc_t Chad Williamson
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=1371970948-26802-3-git-send-email-chad@dahc.us \
--to=chad@dahc.us \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=puff65537@bansheeslibrary.com \
--cc=tulinizer@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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®