diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2016-08-26 07:49:25 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-08-26 17:01:49 +0300 |
commit | 61a28d2b690a8b6c383a075a12d62d711850f9d7 (patch) | |
tree | aece767d4e1be799dfb5f3a178a7ba3e4d4eafbf /drivers/infiniband/hw/hfi1/mad.c | |
parent | b71121b4b70a995c0b794026e84c880c4f26c361 (diff) | |
download | linux-61a28d2b690a8b6c383a075a12d62d711850f9d7.tar.xz |
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>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/mad.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/mad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c index 39e42c373a01..9912d2ca3ded 100644 --- a/drivers/infiniband/hw/hfi1/mad.c +++ b/drivers/infiniband/hw/hfi1/mad.c @@ -2604,7 +2604,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp, u8 lq, num_vls; u8 res_lli, res_ler; u64 port_mask; - unsigned long port_num; + u8 port_num; unsigned long vl; u32 vl_select_mask; int vfi; @@ -2640,7 +2640,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp, port_num = find_first_bit((unsigned long *)&port_mask, sizeof(port_mask)); - if ((u8)port_num != port) { + if (port_num != port) { pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD; return reply((struct ib_mad_hdr *)pmp); } |