Skip to contentSkip to conversation

atl1c: Atheros L1C Gigabit Ethernet driver

DISCUSSION Dan Carpenter 3 participants 4 messages Feb 15, 2013 – Feb 18, 2013 Kernel janitors

lore
Share & tools
lore
#0 lore 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

#1 lore raw

Jie Yang's email is bouncing. 2009 was a long time ago. Jay, Chris, any ideas?

regards,
dan carpenter

Quoted 25 lines · Dan Carpenter

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

#2 lore raw
In reply to Dan Carpenter

Xiong,

Is Jie still an active maintainer of atl1c?

Thanks,
Jay

Quoted 32 lines · Dan Carpenter

Jie Yang's email is bouncing. 2009 was a long time ago. Jay, Chris, any ideas?

regards,
dan carpenter

Quoted 25 lines · Dan Carpenter

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

#3 lore raw
In reply to Dan Carpenter

No, he has left this company. Can you please replace it with [email protected] ? thanks a lot !

-Xiong

Quoted 48 lines

-----Original Message-----
From: J. K. Cliburn [mailto:[email protected]]
Sent: Tuesday, February 19, 2013 5:54 AM
To: Dan Carpenter
Cc: Chris Snook; [email protected]; Huang, Xiong
Subject: Re: atl1c: Atheros L1C Gigabit Ethernet driver

Xiong,

Is Jie still an active maintainer of atl1c?

Thanks,
Jay

Quoted 12 lines · Dan Carpenter

Jie Yang's email is bouncing. 2009 was a long time ago. Jay, Chris, any ideas?

regards,
dan carpenter

Quoted 5 lines · Dan Carpenter

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()

Quoted 20 lines
Quoted 20 lines
	 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