From: Jiri Pirko Date: Fri, 8 Apr 2016 17:11:20 +0000 (+0200) Subject: devlink: remove implicit type set in port register X-Git-Tag: v4.9.8~2112^2~329^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9844881ba19d15d274bd684d4de0758bbd71c90;p=platform%2Fkernel%2Flinux-rpi3.git devlink: remove implicit type set in port register 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 Signed-off-by: David S. Miller --- diff --git a/net/core/devlink.c b/net/core/devlink.c index 590fa56..44f880d 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -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);