From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch] Staging: et131x: fix | vs & typos
Date: Sat, 09 Jun 2012 09:17:01 +0000 [thread overview]
Message-ID: <20120609091701.GE877@elgon.mountain> (raw)
These two places seem like they should be using bitwise OR instead of
bitwise AND. The first one is a noop which is equivalent to:
imr |= (0x0100 & 0x0004 & 0x0001);
The second is sets lcr2 to zero instead of just clearing the high bits.
lcr2 &= (0x00F0 & 0x000F);
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I don't have this hardware.
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 5b11c5e..0582183 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -1767,8 +1767,8 @@ static void et131x_xcvr_init(struct et131x_adapter *adapter)
/* Set the link status interrupt only. Bad behavior when link status
* and auto neg are set, we run into a nested interrupt problem
*/
- imr |= (ET_PHY_INT_MASK_AUTONEGSTAT &
- ET_PHY_INT_MASK_LINKSTAT &
+ imr |= (ET_PHY_INT_MASK_AUTONEGSTAT |
+ ET_PHY_INT_MASK_LINKSTAT |
ET_PHY_INT_MASK_ENABLE);
et131x_mii_write(adapter, PHY_INTERRUPT_MASK, imr);
@@ -1784,7 +1784,7 @@ static void et131x_xcvr_init(struct et131x_adapter *adapter)
if ((adapter->eeprom_data[1] & 0x4) = 0) {
et131x_mii_read(adapter, PHY_LED_2, &lcr2);
- lcr2 &= (ET_LED2_LED_100TX & ET_LED2_LED_1000T);
+ lcr2 &= (ET_LED2_LED_100TX | ET_LED2_LED_1000T);
lcr2 |= (LED_VAL_LINKON_ACTIVE << LED_LINK_SHIFT);
if ((adapter->eeprom_data[1] & 0x8) = 0)
next reply other threads:[~2012-06-09 9:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-09 9:17 Dan Carpenter [this message]
2012-06-11 21:48 ` [patch] Staging: et131x: fix | vs & typos Mark Einon
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=20120609091701.GE877@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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