* re: qede: Add support for coalescing config read/update.
@ 2016-06-27 19:42 Dan Carpenter
2016-06-28 4:41 ` Sudarsana Kalluru
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dan Carpenter @ 2016-06-27 19:42 UTC (permalink / raw)
To: kernel-janitors
Hello Sudarsana Reddy Kalluru,
The patch d552fa84cb35: "qede: Add support for coalescing config
read/update." from Jun 21, 2016, leads to the following static
checker warning:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:435 qede_get_coalesce()
warn: passing casted pointer '&coal->rx_coalesce_usecs' to 'edev->ops->common->get_coalesce()' 32 vs 16.
drivers/net/ethernet/qlogic/qede/qede_ethtool.c
429 static int qede_get_coalesce(struct net_device *dev,
430 struct ethtool_coalesce *coal)
431 {
432 struct qede_dev *edev = netdev_priv(dev);
433
434 memset(coal, 0, sizeof(struct ethtool_coalesce));
435 edev->ops->common->get_coalesce(edev->cdev,
436 (u16 *)&coal->rx_coalesce_usecs,
437 (u16 *)&coal->tx_coalesce_usecs);
This won't work on big endian systems. Fix it so the function takes a
u32 or make ->rx_coalesce_usecs a u16.
438
439 return 0;
440 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: qede: Add support for coalescing config read/update.
2016-06-27 19:42 qede: Add support for coalescing config read/update Dan Carpenter
@ 2016-06-28 4:41 ` Sudarsana Kalluru
2016-06-28 7:17 ` walter harms
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Sudarsana Kalluru @ 2016-06-28 4:41 UTC (permalink / raw)
To: kernel-janitors
Hi Dan carpenter,
Thanks for your mail. Will address it.
Thanks,
Sudarsana
-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
Sent: 28 June 2016 01:12
To: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Cc: kernel-janitors@vger.kernel.org
Subject: re: qede: Add support for coalescing config read/update.
Hello Sudarsana Reddy Kalluru,
The patch d552fa84cb35: "qede: Add support for coalescing config read/update." from Jun 21, 2016, leads to the following static checker warning:
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:435 qede_get_coalesce()
warn: passing casted pointer '&coal->rx_coalesce_usecs' to 'edev->ops->common->get_coalesce()' 32 vs 16.
drivers/net/ethernet/qlogic/qede/qede_ethtool.c
429 static int qede_get_coalesce(struct net_device *dev,
430 struct ethtool_coalesce *coal)
431 {
432 struct qede_dev *edev = netdev_priv(dev);
433
434 memset(coal, 0, sizeof(struct ethtool_coalesce));
435 edev->ops->common->get_coalesce(edev->cdev,
436 (u16 *)&coal->rx_coalesce_usecs,
437 (u16 *)&coal->tx_coalesce_usecs);
This won't work on big endian systems. Fix it so the function takes a
u32 or make ->rx_coalesce_usecs a u16.
438
439 return 0;
440 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: qede: Add support for coalescing config read/update.
2016-06-27 19:42 qede: Add support for coalescing config read/update Dan Carpenter
2016-06-28 4:41 ` Sudarsana Kalluru
@ 2016-06-28 7:17 ` walter harms
2016-06-28 7:26 ` Yuval Mintz
2016-06-28 9:05 ` walter harms
3 siblings, 0 replies; 5+ messages in thread
From: walter harms @ 2016-06-28 7:17 UTC (permalink / raw)
To: kernel-janitors
Am 28.06.2016 06:41, schrieb Sudarsana Kalluru:
> Hi Dan carpenter,
> Thanks for your mail. Will address it.
>
> Thanks,
> Sudarsana
>
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: 28 June 2016 01:12
> To: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
> Cc: kernel-janitors@vger.kernel.org
> Subject: re: qede: Add support for coalescing config read/update.
>
> Hello Sudarsana Reddy Kalluru,
>
> The patch d552fa84cb35: "qede: Add support for coalescing config read/update." from Jun 21, 2016, leads to the following static checker warning:
>
> drivers/net/ethernet/qlogic/qede/qede_ethtool.c:435 qede_get_coalesce()
> warn: passing casted pointer '&coal->rx_coalesce_usecs' to 'edev->ops->common->get_coalesce()' 32 vs 16.
>
> drivers/net/ethernet/qlogic/qede/qede_ethtool.c
> 429 static int qede_get_coalesce(struct net_device *dev,
> 430 struct ethtool_coalesce *coal)
> 431 {
> 432 struct qede_dev *edev = netdev_priv(dev);
> 433
> 434 memset(coal, 0, sizeof(struct ethtool_coalesce));
> 435 edev->ops->common->get_coalesce(edev->cdev,
> 436 (u16 *)&coal->rx_coalesce_usecs,
> 437 (u16 *)&coal->tx_coalesce_usecs);
>
> This won't work on big endian systems. Fix it so the function takes a
> u32 or make ->rx_coalesce_usecs a u16.
>
given you do a memset before, what are the chances that coal->rx_coalesce_usecs != 0 ?
Is there a dynamic update in the background ?
re,
wh
> 438
> 439 return 0;
> 440 }
>
> regards,
> dan carpenter
> --
> 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] 5+ messages in thread
* RE: qede: Add support for coalescing config read/update.
2016-06-27 19:42 qede: Add support for coalescing config read/update Dan Carpenter
2016-06-28 4:41 ` Sudarsana Kalluru
2016-06-28 7:17 ` walter harms
@ 2016-06-28 7:26 ` Yuval Mintz
2016-06-28 9:05 ` walter harms
3 siblings, 0 replies; 5+ messages in thread
From: Yuval Mintz @ 2016-06-28 7:26 UTC (permalink / raw)
To: kernel-janitors
> > drivers/net/ethernet/qlogic/qede/qede_ethtool.c
> > 429 static int qede_get_coalesce(struct net_device *dev,
> > 430 struct ethtool_coalesce *coal)
> > 431 {
> > 432 struct qede_dev *edev = netdev_priv(dev);
> > 433
> > 434 memset(coal, 0, sizeof(struct ethtool_coalesce));
> > 435 edev->ops->common->get_coalesce(edev->cdev,
> > 436 (u16 *)&coal->rx_coalesce_usecs,
> > 437 (u16 *)&coal->tx_coalesce_usecs);
> >
> > This won't work on big endian systems. Fix it so the function takes a
> > u32 or make ->rx_coalesce_usecs a u16.
> >
> given you do a memset before, what are the chances that coal-
> >rx_coalesce_usecs != 0 ?
> Is there a dynamic update in the background ?
It's a getter; The entire purpose of the `get_coalesce' function is to fill
those fields with actual values.
[Although I noticed that the memset is clearing the `cmd' field,
which isn't an intended result]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: qede: Add support for coalescing config read/update.
2016-06-27 19:42 qede: Add support for coalescing config read/update Dan Carpenter
` (2 preceding siblings ...)
2016-06-28 7:26 ` Yuval Mintz
@ 2016-06-28 9:05 ` walter harms
3 siblings, 0 replies; 5+ messages in thread
From: walter harms @ 2016-06-28 9:05 UTC (permalink / raw)
To: kernel-janitors
Am 28.06.2016 09:26, schrieb Yuval Mintz:
>>> drivers/net/ethernet/qlogic/qede/qede_ethtool.c
>>> 429 static int qede_get_coalesce(struct net_device *dev,
>>> 430 struct ethtool_coalesce *coal)
>>> 431 {
>>> 432 struct qede_dev *edev = netdev_priv(dev);
>>> 433
>>> 434 memset(coal, 0, sizeof(struct ethtool_coalesce));
>>> 435 edev->ops->common->get_coalesce(edev->cdev,
>>> 436 (u16 *)&coal->rx_coalesce_usecs,
>>> 437 (u16 *)&coal->tx_coalesce_usecs);
>>>
>>> This won't work on big endian systems. Fix it so the function takes a
>>> u32 or make ->rx_coalesce_usecs a u16.
>>>
>> given you do a memset before, what are the chances that coal-
>>> rx_coalesce_usecs != 0 ?
>> Is there a dynamic update in the background ?
>
> It's a getter; The entire purpose of the `get_coalesce' function is to fill
> those fields with actual values.
> [Although I noticed that the memset is clearing the `cmd' field,
> which isn't an intended result]
>
ok i understand, wrong direction :)
re,
wh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-28 9:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 19:42 qede: Add support for coalescing config read/update Dan Carpenter
2016-06-28 4:41 ` Sudarsana Kalluru
2016-06-28 7:17 ` walter harms
2016-06-28 7:26 ` Yuval Mintz
2016-06-28 9:05 ` walter harms
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.