Message ID | 20170519202736.5685-4-joe@ovn.org |
---|---|
State | Accepted |
Headers | show |
On Fri, 2017-05-19 at 13:27 -0700, Joe Stringer wrote: > The vport_type_to_kind() call at the top of dpif_netlink_rtnl_verify() > ensures that these cases can never be hit, so use OVS_NOT_REACHED() > instead of setting the err to EOPNOTSUPP. > > Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Greg Rose <gvrose8192@gmail.com> > --- > lib/dpif-netlink-rtnl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c > index 76ab0fe3fdec..c57923756f42 100644 > --- a/lib/dpif-netlink-rtnl.c > +++ b/lib/dpif-netlink-rtnl.c > @@ -256,7 +256,7 @@ dpif_netlink_rtnl_verify(const struct netdev_tunnel_config *tnl_cfg, > case OVS_VPORT_TYPE_UNSPEC: > case __OVS_VPORT_TYPE_MAX: > default: > - err = EOPNOTSUPP; > + OVS_NOT_REACHED(); > } > > ofpbuf_delete(reply);
On Fri, May 19, 2017 at 01:27:36PM -0700, Joe Stringer wrote: > The vport_type_to_kind() call at the top of dpif_netlink_rtnl_verify() > ensures that these cases can never be hit, so use OVS_NOT_REACHED() > instead of setting the err to EOPNOTSUPP. > > Signed-off-by: Joe Stringer <joe@ovn.org> > --- > lib/dpif-netlink-rtnl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c > index 76ab0fe3fdec..c57923756f42 100644 > --- a/lib/dpif-netlink-rtnl.c > +++ b/lib/dpif-netlink-rtnl.c > @@ -256,7 +256,7 @@ dpif_netlink_rtnl_verify(const struct netdev_tunnel_config *tnl_cfg, > case OVS_VPORT_TYPE_UNSPEC: > case __OVS_VPORT_TYPE_MAX: > default: > - err = EOPNOTSUPP; > + OVS_NOT_REACHED(); > } > > ofpbuf_delete(reply); > -- > 2.11.1 > Acked-by: Eric Garver <e@erig.me> Thanks for the clean ups, Joe. Eric.
On 22 May 2017 at 10:42, Eric Garver <e@erig.me> wrote: > On Fri, May 19, 2017 at 01:27:36PM -0700, Joe Stringer wrote: >> The vport_type_to_kind() call at the top of dpif_netlink_rtnl_verify() >> ensures that these cases can never be hit, so use OVS_NOT_REACHED() >> instead of setting the err to EOPNOTSUPP. >> >> Signed-off-by: Joe Stringer <joe@ovn.org> >> --- >> lib/dpif-netlink-rtnl.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c >> index 76ab0fe3fdec..c57923756f42 100644 >> --- a/lib/dpif-netlink-rtnl.c >> +++ b/lib/dpif-netlink-rtnl.c >> @@ -256,7 +256,7 @@ dpif_netlink_rtnl_verify(const struct netdev_tunnel_config *tnl_cfg, >> case OVS_VPORT_TYPE_UNSPEC: >> case __OVS_VPORT_TYPE_MAX: >> default: >> - err = EOPNOTSUPP; >> + OVS_NOT_REACHED(); >> } >> >> ofpbuf_delete(reply); >> -- >> 2.11.1 >> > > Acked-by: Eric Garver <e@erig.me> > > Thanks for the clean ups, Joe. > Eric. Thanks, applied to master.
diff --git a/lib/dpif-netlink-rtnl.c b/lib/dpif-netlink-rtnl.c index 76ab0fe3fdec..c57923756f42 100644 --- a/lib/dpif-netlink-rtnl.c +++ b/lib/dpif-netlink-rtnl.c @@ -256,7 +256,7 @@ dpif_netlink_rtnl_verify(const struct netdev_tunnel_config *tnl_cfg, case OVS_VPORT_TYPE_UNSPEC: case __OVS_VPORT_TYPE_MAX: default: - err = EOPNOTSUPP; + OVS_NOT_REACHED(); } ofpbuf_delete(reply);
The vport_type_to_kind() call at the top of dpif_netlink_rtnl_verify() ensures that these cases can never be hit, so use OVS_NOT_REACHED() instead of setting the err to EOPNOTSUPP. Signed-off-by: Joe Stringer <joe@ovn.org> --- lib/dpif-netlink-rtnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)