RE: [patch net-next 3/3] mlxsw: spectrum_router: Align RIF index allocation with existing code flat view From: David Laight <hidden> Date: 2017-06-06 09:11:59 From: Jiri PirkoSent: 04 June 2017 15:54 The way we usually allocate an index is by letting the allocation function return an error instead of an invalid index....-static int mlxsw_sp_avail_rif_get(struct mlxsw_sp *mlxsw_sp) +static int mlxsw_sp_rif_index_alloc(struct mlxsw_sp *mlxsw_sp, u16 *p_rif_index) You typically get much better code from returning an invalid index. This is why PTR_ERR() exists. David
Keyboard shortcuts hback out one level jnext message in thread kprevious message in thread ldrill in Escclose help / fold thread tree ?toggle this help