* [PATCH 2/2] IB/hfi1: Clean up type used and casting
@ 2016-08-26 4:49 Christophe JAILLET
2016-08-26 14:26 ` Doug Ledford
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2016-08-26 4:49 UTC (permalink / raw)
To: mike.marciniszyn, dennis.dalessandro, dledford, sean.hefty,
hal.rosenstock
Cc: linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
drivers/infiniband/hw/hfi1/mad.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
index 2c6c138c41b2..b9e47d1c462b 100644
--- a/drivers/infiniband/hw/hfi1/mad.c
+++ b/drivers/infiniband/hw/hfi1/mad.c
@@ -2599,7 +2599,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;
@@ -2634,7 +2634,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
port_mask = be64_to_cpu(req->port_select_mask[3]);
port_num = find_first_bit((unsigned long *)&port_mask, 64);
- if ((u8)port_num != port) {
+ if (port_num != port) {
pmp->mad_hdr.status |= IB_SMP_INVALID_FIELD;
return reply((struct ib_mad_hdr *)pmp);
}
--
2.7.4
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] IB/hfi1: Clean up type used and casting
2016-08-26 4:49 [PATCH 2/2] IB/hfi1: Clean up type used and casting Christophe JAILLET
@ 2016-08-26 14:26 ` Doug Ledford
0 siblings, 0 replies; 2+ messages in thread
From: Doug Ledford @ 2016-08-26 14:26 UTC (permalink / raw)
To: Christophe JAILLET, mike.marciniszyn, dennis.dalessandro,
sean.hefty, hal.rosenstock
Cc: linux-rdma, linux-kernel, kernel-janitors
[-- Attachment #1.1: Type: text/plain, Size: 399 bytes --]
On 8/26/2016 12:49 AM, Christophe JAILLET wrote:
> 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>
Thanks, applied.
--
Doug Ledford <dledford@redhat.com>
GPG Key ID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-26 14:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 4:49 [PATCH 2/2] IB/hfi1: Clean up type used and casting Christophe JAILLET
2016-08-26 14:26 ` Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).