From a9c08f08519ac0e83e499305a0fa326615b57cdf Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 10 Feb 2016 16:42:47 +1100 Subject: [PATCH] kernel/memremap: fix up dev_WARN invocation Signed-off-by: Stephen Rothwell --- kernel/memremap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index 76fa01cee76b..ba845c368876 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -226,10 +226,9 @@ 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 (percpu_ref_tryget_live(pgmap->ref)) { - dev_WARN(dev, "%s: page mapping is still live!\n", __func__); + if (dev_WARN(dev, percpu_ref_tryget_live(pgmap->ref), + "%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); -- 2.39.5