On 5/2/2018 6:12 AM, Leon Romanovsky wrote:
static int _gid_table_setup_one(struct ib_device *ib_dev)
@@ -790,19 +787,14 @@ static int _gid_table_setup_one(struct ib_device *ib_dev)
for (port = 0; port < ib_dev->phys_port_cnt; port++) {
u8 rdma_port = port + rdma_start_port(ib_dev);
- table =
- alloc_gid_table(
+ table = alloc_gid_table(
ib_dev->port_immutable[rdma_port].gid_tbl_len);
Normally I'd say don't make ineffectual whitespace changes, but it was
extra ugly before.
if (!table) {
err = -ENOMEM;
goto rollback_table_setup;
}
- err = gid_table_reserve_default(ib_dev,
- port + rdma_start_port(ib_dev),
- table);
- if (err)
- goto rollback_table_setup;
+ gid_table_reserve_default(ib_dev, rdma_port, table);
So removing the rdma_port calculation I'm fine with. Lets us get rid of
a goto as well if you want to do that. Otherwise...
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html