Skip to content

Commit 61a28d2

Browse files
tititiou36dledford
authored andcommitted
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent b71121b commit 61a28d2

File tree

1 file changed

+2
-2
lines changed
  • drivers/infiniband/hw/hfi1

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/hfi1/mad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,7 +2604,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
26042604
u8 lq, num_vls;
26052605
u8 res_lli, res_ler;
26062606
u64 port_mask;
2607-
unsigned long port_num;
2607+
u8 port_num;
26082608
unsigned long vl;
26092609
u32 vl_select_mask;
26102610
int vfi;
@@ -2640,7 +2640,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
26402640
port_num = find_first_bit((unsigned long *)&port_mask,
26412641
sizeof(port_mask));
26422642

2643-
if ((u8)port_num != port) {
2643+
if (port_num != port) {
26442644
pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD;
26452645
return reply((struct ib_mad_hdr *)pmp);
26462646
}

0 commit comments

Comments
 (0)