[PATCH] staging: lustre: mgc: Fix incorrect type in assignment

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

 



Fix the following sparse warnings:
mgc_request.c:68:25: warning: incorrect type in assignment (different base types)
mgc_request.c:68:25:    expected unsigned long long [unsigned] [long] [long long] <noident>
mgc_request.c:68:25:    got restricted __le64 [usertype] <noident>
mgc_request.c:82:25: warning: incorrect type in assignment (different base types)
mgc_request.c:82:25:    expected unsigned long long [unsigned] [long] [long long] <noident>
mgc_request.c:82:25:    got restricted __le64 [usertype] <noident>

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx>
---
 drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index eee0b667a33c..93819bb84ef8 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -65,7 +65,7 @@ static int mgc_name2resid(char *name, int len, struct ldlm_res_id *res_id,
 
 	/* Always use the same endianness for the resid */
 	memset(res_id, 0, sizeof(*res_id));
-	res_id->name[0] = cpu_to_le64(resname);
+	res_id->name[0] = resname;
 	/* XXX: unfortunately, sptlprc and config llog share one lock */
 	switch (type) {
 	case CONFIG_T_CONFIG:
@@ -79,7 +79,7 @@ static int mgc_name2resid(char *name, int len, struct ldlm_res_id *res_id,
 	default:
 		LBUG();
 	}
-	res_id->name[1] = cpu_to_le64(resname);
+	res_id->name[1] = resname;
 	CDEBUG(D_MGC, "log %s to resid %#llx/%#llx (%.8s)\n", name,
 	       res_id->name[0], res_id->name[1], (char *)&res_id->name[0]);
 	return 0;
-- 
2.9.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux