* [PATCH] drivers/net/mlx4: Adjust constant
@ 2009-07-19 16:09 Julia Lawall
2009-07-19 18:24 ` Joe Perches
2009-07-21 20:01 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Julia Lawall @ 2009-07-19 16:09 UTC (permalink / raw)
To: netdev, linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
The values in the advertising field are typically ADVERTISED_xxx, not
SUPPORTED_xxx. Both SUPPORTED_10000baseT_Full and
ADVERTISED_1000baseT_Full have the same value.
The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
struct ethtool_cmd E;
@@
*E.advertising = SUPPORTED_10000baseT_Full
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/net/mlx4/en_ethtool.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mlx4/en_ethtool.c b/drivers/net/mlx4/en_ethtool.c
index 091f990..86467b4 100644
--- a/drivers/net/mlx4/en_ethtool.c
+++ b/drivers/net/mlx4/en_ethtool.c
@@ -220,7 +220,7 @@ static int mlx4_en_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
cmd->autoneg = AUTONEG_DISABLE;
cmd->supported = SUPPORTED_10000baseT_Full;
- cmd->advertising = SUPPORTED_10000baseT_Full;
+ cmd->advertising = ADVERTISED_1000baseT_Full;
if (netif_carrier_ok(dev)) {
cmd->speed = SPEED_10000;
cmd->duplex = DUPLEX_FULL;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] drivers/net/mlx4: Adjust constant
2009-07-19 16:09 [PATCH] drivers/net/mlx4: Adjust constant Julia Lawall
@ 2009-07-19 18:24 ` Joe Perches
2009-07-19 19:08 ` Julia Lawall
2009-07-21 20:01 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2009-07-19 18:24 UTC (permalink / raw)
To: Julia Lawall; +Cc: netdev, linux-kernel, kernel-janitors
On Sun, 2009-07-19 at 18:09 +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> The values in the advertising field are typically ADVERTISED_xxx, not
> SUPPORTED_xxx. Both SUPPORTED_10000baseT_Full and
> ADVERTISED_1000baseT_Full have the same value.
other possibles:
drivers/net/sungem.c:#define ADVERTISE_MASK (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \
SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \
SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full | \
SUPPORTED_Pause | SUPPORTED_Autoneg)
drivers/net/s2io.c: info->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
drivers/net/spider_net.c: advertise |= SUPPORTED_1000baseT_Full;
drivers/net/spider_net.c: advertise |= SUPPORTED_1000baseT_Half;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/net/mlx4: Adjust constant
2009-07-19 18:24 ` Joe Perches
@ 2009-07-19 19:08 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2009-07-19 19:08 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, linux-kernel, kernel-janitors
Thanks for pointing this out. I will look into it.
julia
On Sun, 19 Jul 2009, Joe Perches wrote:
> On Sun, 2009-07-19 at 18:09 +0200, Julia Lawall wrote:
> > From: Julia Lawall <julia@diku.dk>
> >
> > The values in the advertising field are typically ADVERTISED_xxx, not
> > SUPPORTED_xxx. Both SUPPORTED_10000baseT_Full and
> > ADVERTISED_1000baseT_Full have the same value.
>
> other possibles:
>
> drivers/net/sungem.c:#define ADVERTISE_MASK (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full | \
> SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full | \
> SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full | \
> SUPPORTED_Pause | SUPPORTED_Autoneg)
> drivers/net/s2io.c: info->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
> drivers/net/spider_net.c: advertise |= SUPPORTED_1000baseT_Full;
> drivers/net/spider_net.c: advertise |= SUPPORTED_1000baseT_Half;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers/net/mlx4: Adjust constant
2009-07-19 16:09 [PATCH] drivers/net/mlx4: Adjust constant Julia Lawall
2009-07-19 18:24 ` Joe Perches
@ 2009-07-21 20:01 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-07-21 20:01 UTC (permalink / raw)
To: julia; +Cc: netdev, linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
Date: Sun, 19 Jul 2009 18:09:25 +0200 (CEST)
> From: Julia Lawall <julia@diku.dk>
>
> The values in the advertising field are typically ADVERTISED_xxx, not
> SUPPORTED_xxx. Both SUPPORTED_10000baseT_Full and
> ADVERTISED_1000baseT_Full have the same value.
>
> The semantic match that finds this problem is as follows:
> (http://www.emn.fr/x-info/coccinelle/)
...
> Signed-off-by: Julia Lawall <julia@diku.dk>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-21 20:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-19 16:09 [PATCH] drivers/net/mlx4: Adjust constant Julia Lawall
2009-07-19 18:24 ` Joe Perches
2009-07-19 19:08 ` Julia Lawall
2009-07-21 20:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox