devlink: remove implicit type set in port register
authorJiri Pirko <jiri@mellanox.com>
Fri, 8 Apr 2016 17:11:20 +0000 (19:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Apr 2016 19:38:42 +0000 (15:38 -0400)
As we rely on caller zeroing or correctly set the struct before the call,
this implicit type set is either no-op (DEVLINK_PORT_TYPE_NOTSET is 0)
or it rewrites wanted value. So remove this.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c

index 590fa561cb7fc72db52b4afa9d98d3dbbc38bdcb..44f880d3b8168b9eac1998764c3c3bc73940be3a 100644 (file)
@@ -630,7 +630,6 @@ int devlink_port_register(struct devlink *devlink,
        }
        devlink_port->devlink = devlink;
        devlink_port->index = port_index;
-       devlink_port->type = DEVLINK_PORT_TYPE_NOTSET;
        devlink_port->registered = true;
        list_add_tail(&devlink_port->list, &devlink->port_list);
        mutex_unlock(&devlink_port_mutex);