[PATCH] staging: lustre/lustre/libcfs: Fix type mismatch reported by sparse

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

 



The third argument to function kportal_memhog_alloc is expected to
be gfp_t whereas the actual argument was unsigned int. Fix this by
explicitly typecasting to gfp_t

Signed-off-by: Niranjan Dighe <niranjan.dighe@xxxxxxxxx>
---
 drivers/staging/lustre/lustre/libcfs/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
index 96d9d46..9c79f6e 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -268,7 +268,7 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile, unsigned long cmd,
 			/* XXX The ioc_flags is not GFP flags now, need to be fixed */
 			err = kportal_memhog_alloc(pfile->private_data,
 						   data->ioc_count,
-						   data->ioc_flags);
+					(__force gfp_t)data->ioc_flags);
 			if (err != 0)
 				kportal_memhog_free(pfile->private_data);
 		}
-- 
1.9.1

_______________________________________________
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