]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kernel/memremap.c: add new arg to dev_WARN
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 9 Feb 2016 23:14:04 +0000 (10:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Feb 2016 05:52:38 +0000 (16:52 +1100)
Fixes: ee49ac85bc24b946 ("treewide: let dev_WARN() accept a condition")
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/memremap.c

index ba845c3688768123ff548ce0afc4a35fac85b487..49c82d4301cb38f90410f2e1eddcfc25040e9b96 100644 (file)
@@ -226,9 +226,11 @@ static void devm_memremap_pages_release(struct device *dev, void *data)
        resource_size_t align_start, align_size;
        struct dev_pagemap *pgmap = &page_map->pgmap;
 
-       if (dev_WARN(dev, percpu_ref_tryget_live(pgmap->ref),
-                    "%s: page mapping is still live!\n", __func__))
+       if (percpu_ref_tryget_live(pgmap->ref)) {
+               dev_WARN(dev, true, "%s: page mapping is still live!\n",
+                        __func__);
                percpu_ref_put(pgmap->ref);
+       }
 
        /* pages are dead and unused, undo the arch mapping */
        align_start = res->start & ~(SECTION_SIZE - 1);