Skip to content

Commit

Permalink
ibdiags: Add missing endian conversions on constants
Browse files Browse the repository at this point in the history
These constants are all the same in both endians so this is no functional
change. Found by sparse.

Reviewed-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
  • Loading branch information
jgunthorpe authored and weiny2 committed Apr 15, 2019
1 parent ba9e4e0 commit c6eb396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ibsendtrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static void build_trap256_local(ib_mad_notice_attr_t * n, ib_portid_t * port)
n->g_or_v.generic.trap_num = htobe16(256);
n->issuer_lid = htobe16((uint16_t) port->lid);
n->data_details.ntc_256.lid = n->issuer_lid;
n->data_details.ntc_256.dr_slid = 0xffff;
n->data_details.ntc_256.dr_slid = htobe16(0xffff);
n->data_details.ntc_256.method = 1;
n->data_details.ntc_256.attr_id = htobe16(0x15);
n->data_details.ntc_256.attr_mod = htobe32(0x12);
Expand Down
4 changes: 2 additions & 2 deletions src/smpdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ static void drsmp_get_init(void *umad, DRPath * path, int attr, int mod)
smp->attr_id = htons(attr);
smp->attr_mod = htonl(mod);
smp->tid = htobe64(drmad_tid++);
smp->dr_slid = 0xffff;
smp->dr_dlid = 0xffff;
smp->dr_slid = htobe16(0xffff);
smp->dr_dlid = htobe16(0xffff);

umad_set_addr(umad, 0xffff, 0, 0, 0);

Expand Down

0 comments on commit c6eb396

Please sign in to comment.