[PATCH][2.6] Virtual Etherne Driver
Linda Xie
lxiep at us.ibm.com
Thu Jan 8 03:42:24 EST 2004
> +static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
> +{
> + int rc;
> + struct net_device *netdev;
> + struct ibmveth_adapter *adapter;
> +
> + unsigned int *mac_addr_p;
> + unsigned int *mcastFilterSize_p;
> +
> +
> + ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%lx\n",
> + dev->unit_address);
> +
> + mac_addr_p = (unsigned int *) vio_get_attribute(dev, VETH_MAC_ADDR, 0);
> + if(!mac_addr_p) {
> + ibmveth_printk(KERN_WARNING "Can't find VETH_MAC_ADDR attribute\n");
> + return 0;
> + }
Should a non-zero value be returned from here? Since "0" usually means
"SUCCESS". I would suggest that probe should return "-ENODEV"(not valid
vio_dev) in this case.
> +
> + mcastFilterSize_p= (unsigned int *) vio_get_attribute(dev, VETH_MCAST_FILTER_SIZE, 0);
> + if(!mcastFilterSize_p) {
> + ibmveth_printk(KERN_WARNING "Can't find VETH_MCAST_FILTER_SIZE attribute\n");
> + return 0;
> + }
For the same reason.
Thanks,
Linda
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list