[PATCH ibdiags 13/16] ibdiags: Removing unneeded casting around endian conversions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 src/smpdump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/smpdump.c b/src/smpdump.c
index 7c5d6ffb3d69d3..cdd783600b602b 100644
--- a/src/smpdump.c
+++ b/src/smpdump.c
@@ -90,7 +90,7 @@ static void drsmp_get_init(void *umad, DRPath * path, int attr, int mod)
 	smp->class_version = 1;
 
 	smp->method = 1;
-	smp->attr_id = (uint16_t) htons((uint16_t) attr);
+	smp->attr_id = htons(attr);
 	smp->attr_mod = htonl(mod);
 	smp->tid = htobe64(drmad_tid++);
 	smp->dr_slid = 0xffff;
@@ -115,7 +115,7 @@ static void smp_get_init(void *umad, int lid, int attr, int mod)
 	smp->class_version = 1;
 
 	smp->method = 1;
-	smp->attr_id = (uint16_t) htons((uint16_t) attr);
+	smp->attr_id = htons(attr);
 	smp->attr_mod = htonl(mod);
 	smp->tid = htobe64(drmad_tid++);
 
-- 
2.21.0




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux