From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: atl1c: Atheros L1C Gigabit Ethernet driver
Date: Fri, 15 Feb 2013 10:34:28 +0000 [thread overview]
Message-ID: <20130215103428.GA4609@elgon.mountain> (raw)
Hello Jie Yang,
The patch 43250ddd75a3: "atl1c: Atheros L1C Gigabit Ethernet driver"
from Feb 18, 2009, leads to the following Smatch warning:
"drivers/net/ethernet/atheros/atl1c/atl1c_hw.c:472 atl1c_phy_setup_adv()
warn: odd binop '0x300 & 0xfffffffffffffcff'"
[ This check as too many false positives so I haven't released it ]
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
472 u16 mii_giga_ctrl_data = GIGA_CR_1000T_DEFAULT_CAP &
473 ~GIGA_CR_1000T_SPEED_MASK;
The defines are set up like this:
#define GIGA_CR_1000T_SPEED_MASK 0x0300
#define GIGA_CR_1000T_DEFAULT_CAP 0x0300
So we're just setting mii_giga_ctrl_data to zero. It seems odd. Did
you intend to do the bitwise negate of GIGA_CR_1000T_SPEED_MASK?
They're only used one time so I can't tell from the context what was
intented.
regards,
dan carpenter
next reply other threads:[~2013-02-15 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 10:34 Dan Carpenter [this message]
2013-02-15 11:12 ` atl1c: Atheros L1C Gigabit Ethernet driver Dan Carpenter
2013-02-18 21:54 ` J. K. Cliburn
2013-02-18 23:39 ` Huang, Xiong
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=20130215103428.GA4609@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 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.