On Sat, Jun 16, 2018 at 08:37:14AM +0000, Xueming(Steven) Li wrote: > Reviewed-by: Xueming Li <xuemi...@mellanox.com> > > One minor issue we should be able to ignore. <snip> > > +static int > > +mlx5_cmp_ibv_name(const void *a, const void *b) { > > + const char *name_a = (*(const struct ibv_device *const *)a)->name; > > + const char *name_b = (*(const struct ibv_device *const *)b)->name; > > + size_t i = 0; > > + > > + while (name_a[i] && name_a[i] == name_b[i]) > > + ++i; > > + while (i && isdigit(name_a[i - 1]) && isdigit(name_b[i - 1])) > > name_a[i - 1] and name_b[i - 1] must be same here.
Indeed, I'll simplify it in v3, thanks. -- Adrien Mazarguil 6WIND