Upinder Malhi (umalhi <umalhi@...> writes:
> diff --git a/drivers/infiniband/hw/usnic/usnic_abi.h
b/drivers/infiniband/hw/usnic/usnic_abi.h
> +#define USNIC_UVERBS_ABI_VERSION     2

An ABI ? Is this an ABI between user space and kernel space, or perhaps an
ABI between kernel driver and firmware ? Please document.

> +/* Start of netdev section */
> +static inline const char *usnic_ib_netdev_event_to_string(unsigned long
event)
> +{
> +     char *event2str[] = { "NETDEV_NONE", "NETDEV_UP", "NETDEV_DOWN",
> +             "NETDEV_REBOOT", "NETDEV_CHANGE",
> +             "NETDEV_REGISTER", "NETDEV_UNREGISTER", "NETDEV_CHANGEMTU",
> +             "NETDEV_CHANGEADDR", "NETDEV_GOING_DOWN", "NETDEV_FEAT_CHANGE",
> +             "NETDEV_BONDING_FAILOVER", "NETDEV_PRE_UP",
> +             "NETDEV_PRE_TYPE_CHANGE", "NETDEV_POST_TYPE_CHANGE",
> +             "NETDEV_POST_INT", "NETDEV_UNREGISTER_FINAL", "NETDEV_RELEASE",
> +             "NETDEV_NOTIFY_PEERS", "NETDEV_JOIN"
> +     };

const char *[] ?

> +     if (event >= sizeof(event2str) / sizeof(event2str[0]))

ARRAY_SIZE() ?

Fubo.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to