On 24 Aug 2024, at 9:40, Hongbo Li wrote: > Let's use max() to simplify the code and fix the > Coccinelle/coccicheck warning reported by minmax.cocci. > > Signed-off-by: Hongbo Li <lihongb...@huawei.com> The change looks good to me. Acked-by: Eelco Chaudron <echau...@redhat.com> > --- > net/openvswitch/vport.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c > index 8732f6e51ae5..859208df65ea 100644 > --- a/net/openvswitch/vport.c > +++ b/net/openvswitch/vport.c > @@ -534,7 +534,7 @@ static int packet_length(const struct sk_buff *skb, > * account for 802.1ad. e.g. is_skb_forwardable(). > */ > > - return length > 0 ? length : 0; > + return max(length, 0); > } > > void ovs_vport_send(struct vport *vport, struct sk_buff *skb, u8 mac_proto) > -- > 2.34.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
- Re: [ovs-dev] [PATCH net-next 1/8] net/mac8... Kalle Valo via dev
- [ovs-dev] [PATCH net-next 2/8] net/rds: Use max(... Hongbo Li via dev
- Re: [ovs-dev] [PATCH net-next 2/8] net/rds:... Allison Henderson via dev
- Re: [ovs-dev] [PATCH net-next 2/8] net/rds:... Simon Horman via dev
- [ovs-dev] [PATCH net-next 4/8] net/core: Use min... Hongbo Li via dev
- Re: [ovs-dev] [PATCH net-next 4/8] net/core... kernel test robot
- Re: [ovs-dev] [PATCH net-next 4/8] net/core... kernel test robot
- Re: [ovs-dev] [PATCH net-next 4/8] net/core... Simon Horman via dev
- [ovs-dev] [PATCH net-next 3/8] net/ipv4: Use min... Hongbo Li via dev
- [ovs-dev] [PATCH net-next 6/8] net/openvswitch: ... Hongbo Li via dev
- Re: [ovs-dev] [PATCH net-next 6/8] net/open... Eelco Chaudron
- Re: [ovs-dev] [PATCH net-next 6/8] net/open... Aaron Conole
- Re: [ovs-dev] [PATCH net-next 6/8] net/open... Simon Horman via dev
- Re: [ovs-dev] [PATCH net-next 7/8] net/rxrpc: Us... David Howells
- Re: [ovs-dev] [PATCH net-next 7/8] net/rxrp... Hongbo Li via dev
- Re: [ovs-dev] [PATCH net-next 7/8] net/rxrp... Hongbo Li via dev
- Re: [ovs-dev] [PATCH net-next 7/8] net/... Simon Horman via dev
- Re: [ovs-dev] [PATCH net-next 7/8] net/rxrp... David Howells
- Re: [ovs-dev] [PATCH net-next 7/8] net/... David Laight
- [ovs-dev] [PATCH net-next 7/8] net/rxrpc: Use mi... Hongbo Li via dev
- [ovs-dev] [PATCH net-next 8/8] net/ceph: Use min... Hongbo Li via dev