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

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

 



On 02/25/2016 09:19 PM, Derek Yerger wrote:
 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).


Did you send this same patch before? If so, I didn't see it in the archive. If
you are sending an updated version of the same patch which fixes bugs,
please mark it as v2 instead of RESEND.

Also please make sure the commit message is line-wrapped. It's probably
best if you send out a v3 version with the commit message fixed up.

For the actual patch itself, you can add

Reviewed-by: Laura Abbott <labbott@xxxxxxxxxx>

when you resend.

Thanks,
Laura

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

_______________________________________________
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