提交 cf046908 编写于 作者: S Stefan Roscher 提交者: Roland Dreier

IB/ehca: Fix function return types

Also remove duplicate assignment of local_ca_ack_delay and change
min_t check for local_ca_ack_delay to u8 instead of int.

Signed-off-by: Stefan Roscher <stefan.roscher at de.ibm.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 77a8d574
...@@ -101,7 +101,6 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) ...@@ -101,7 +101,6 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
props->max_ee = limit_uint(rblock->max_rd_ee_context); props->max_ee = limit_uint(rblock->max_rd_ee_context);
props->max_rdd = limit_uint(rblock->max_rd_domain); props->max_rdd = limit_uint(rblock->max_rd_domain);
props->max_fmr = limit_uint(rblock->max_mr); props->max_fmr = limit_uint(rblock->max_mr);
props->local_ca_ack_delay = limit_uint(rblock->local_ca_ack_delay);
props->max_qp_rd_atom = limit_uint(rblock->max_rr_qp); props->max_qp_rd_atom = limit_uint(rblock->max_rr_qp);
props->max_ee_rd_atom = limit_uint(rblock->max_rr_ee_context); props->max_ee_rd_atom = limit_uint(rblock->max_rr_ee_context);
props->max_res_rd_atom = limit_uint(rblock->max_rr_hca); props->max_res_rd_atom = limit_uint(rblock->max_rr_hca);
...@@ -115,7 +114,7 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) ...@@ -115,7 +114,7 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
} }
props->max_pkeys = 16; props->max_pkeys = 16;
props->local_ca_ack_delay = limit_uint(rblock->local_ca_ack_delay); props->local_ca_ack_delay = min_t(u8, rblock->local_ca_ack_delay, 255);
props->max_raw_ipv6_qp = limit_uint(rblock->max_raw_ipv6_qp); props->max_raw_ipv6_qp = limit_uint(rblock->max_raw_ipv6_qp);
props->max_raw_ethy_qp = limit_uint(rblock->max_raw_ethy_qp); props->max_raw_ethy_qp = limit_uint(rblock->max_raw_ethy_qp);
props->max_mcast_grp = limit_uint(rblock->max_mcast_grp); props->max_mcast_grp = limit_uint(rblock->max_mcast_grp);
...@@ -136,7 +135,7 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) ...@@ -136,7 +135,7 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
return ret; return ret;
} }
static int map_mtu(struct ehca_shca *shca, u32 fw_mtu) static enum ib_mtu map_mtu(struct ehca_shca *shca, u32 fw_mtu)
{ {
switch (fw_mtu) { switch (fw_mtu) {
case 0x1: case 0x1:
...@@ -156,7 +155,7 @@ static int map_mtu(struct ehca_shca *shca, u32 fw_mtu) ...@@ -156,7 +155,7 @@ static int map_mtu(struct ehca_shca *shca, u32 fw_mtu)
} }
} }
static int map_number_of_vls(struct ehca_shca *shca, u32 vl_cap) static u8 map_number_of_vls(struct ehca_shca *shca, u32 vl_cap)
{ {
switch (vl_cap) { switch (vl_cap) {
case 0x1: case 0x1:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册