[PATCH RESEND 1/1] staging: ion: debugfs invalid gfp mask

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

 



From drivers/staging/android TODO file - sparse errors.

The current code attempts assignment of -1 to an unsigned type. Note that in a downstream function ion_page_pool_shrink this mask is only ever evaluated against __GFP_HIGHMEM (drivers/staging/android/ion/ion_page_pool.c, line 125).

Signed-off-by: Derek Yerger <dy@xxxxxxxxxx>
---
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index c97e82b..a9c8861 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1524,7 +1524,7 @@ static int debug_shrink_set(void *data, u64 val)
 	struct shrink_control sc;
 	int objs;

-	sc.gfp_mask = -1;
+	sc.gfp_mask = GFP_HIGHUSER;
 	sc.nr_to_scan = val;

 	if (!val) {
@@ -1542,7 +1542,7 @@ static int debug_shrink_get(void *data, u64 *val)
 	struct shrink_control sc;
 	int objs;

-	sc.gfp_mask = -1;
+	sc.gfp_mask = GFP_HIGHUSER;
 	sc.nr_to_scan = 0;

 	objs = heap->shrinker.count_objects(&heap->shrinker, &sc);
_______________________________________________
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