Commit 61a28d2b authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Doug Ledford

IB/hfi1: Clean up type used and casting

In all other places in this file where 'find_first_bit' is called,
port_num is defined as a 'u8' and no casting is done.

Do the same here in order to be more consistent.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent b71121b4
...@@ -2604,7 +2604,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp, ...@@ -2604,7 +2604,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
u8 lq, num_vls; u8 lq, num_vls;
u8 res_lli, res_ler; u8 res_lli, res_ler;
u64 port_mask; u64 port_mask;
unsigned long port_num; u8 port_num;
unsigned long vl; unsigned long vl;
u32 vl_select_mask; u32 vl_select_mask;
int vfi; int vfi;
...@@ -2640,7 +2640,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp, ...@@ -2640,7 +2640,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
port_num = find_first_bit((unsigned long *)&port_mask, port_num = find_first_bit((unsigned long *)&port_mask,
sizeof(port_mask)); sizeof(port_mask));
if ((u8)port_num != port) { if (port_num != port) {
pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)pmp); return reply((struct ib_mad_hdr *)pmp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment