Alexey Dobriyan wrote:
> On Fri, Aug 18, 2006 at 01:33:22PM +0200, Jan-Bernd Themann wrote:
>> --- linux-2.6.18-rc4-orig/drivers/net/ehea/ehea_ethtool.c
>> +++ kernel/drivers/net/ehea/ehea_ethtool.c
>> +{
>> + strncpy(info->driver, DRV_NAME, sizeof(info->driver) - 1);
>> + strncpy(info->version, DRV_VERSION, sizeof(info->version) - 1);
>
> Use strlcpy() to not forget -1 accidently.
Done.
>
>> +static u32 netdev_get_msglevel(struct net_device *dev)
> ^^^^^^^^
>> +{
>> + struct ehea_port *port = netdev_priv(dev);
>> + return port->msg_enable;
> ^^^^^^
>
> Something is mis-named here.
The kernel requires a structure member of that name.
>> +struct ethtool_ops ehea_ethtool_ops = {
>> + .get_settings = netdev_get_settings,
>> + .get_drvinfo = netdev_get_drvinfo,
>> + .get_msglevel = netdev_get_msglevel,
>> + .set_msglevel = netdev_set_msglevel,
>> + .get_link = ethtool_op_get_link,
>> + .get_tx_csum = ethtool_op_get_tx_csum,
>
> Whitespace breakage.
Fixed.
>> + .set_settings = NULL,
>> + .nway_reset = NULL,
>> + .get_pauseparam = NULL,
>> + .set_pauseparam = NULL,
>> + .get_rx_csum = NULL,
>> + .set_rx_csum = NULL,
>> + .phys_id = NULL,
>> + .self_test = NULL,
>> + .self_test_count = NULL
>
> If you don't use them, don't mention them at all. Compiler will DTRT.
Agreed. Assignments removed.
Thanks again :-)
Thomas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]