From: Andrew Morton Date: Tue, 9 Feb 2016 23:14:04 +0000 (+1100) Subject: kernel/memremap.c: add new arg to dev_WARN X-Git-Tag: next-20160210~1^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6578ecb316f198bae11212df8aa0bd679cec16f5;p=karo-tx-linux.git kernel/memremap.c: add new arg to dev_WARN Fixes: ee49ac85bc24b946 ("treewide: let dev_WARN() accept a condition") Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: Jiri Kosina Signed-off-by: Andrew Morton --- diff --git a/kernel/memremap.c b/kernel/memremap.c index ba845c368876..49c82d4301cb 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -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);