Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3394465imb; Tue, 5 Mar 2019 08:15:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzUu/CU4wZzEvh9xDlZ8ERzNgF3jao05EPEJW7KND4bNOKrO6UgUh7gwhsWXfHjoCE8GMJY X-Received: by 2002:a63:2882:: with SMTP id o124mr2049323pgo.446.1551802543465; Tue, 05 Mar 2019 08:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551802543; cv=none; d=google.com; s=arc-20160816; b=wQmOeAnn1bTDJZfx2wMLSmhOpL2h/Mb04uJ3ILQJqMcLc8dzVASHb/OqSx3/0KbQTj EEyTjoyUZkbkmel1d6Tm+B52l0AA1jPhYrAwu/NFQWn0ZcbHlQKmbObS4HZOC3PyUz6Z vlKFRoWD6273Qeyp1Z4vPY4MPt9l0Snk4jbmvGZ4yduCWyhf1ju0jBzJSuLPHYbvXB/7 jO/KUSS1F1W15KdgwyExZOsHQI9ysEdK8SMO8DT7F9766V9otHVyshs5Au0od7gMKnsb 3ay1kqcb46MPtQepM+WyPWVlCecQ6tKvZmNErfHgcs7CB6lWGxv+A6ONmXoVR4wC+AtU hXow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=/+iQ/NWnjHqdJA8QkOn4/7Qo1jgd18s0LYbRadum3cE=; b=WtKM9lotOZ6iCU6apPOOEJ/9/xJbsfgVUFY2GeWFKHPlP9QKSIG2fOdt9s4IJw8LCk glNvrUxxkCtJybZODlGlV1Uu0CosrFQAba/Q6+pkdADJL5TaAFvnUQWKWqQSIWEkS/zC kLXhMKh+R9WkOYQ97vQ3U6Yjb1EUtJoMQXJX876Yjzd3ADB5w4eYstBsBAfxioBAYXSX 0R6qHBdfW9JeZJvG/sJaioGh+bxohlAvCJHX+yDX4Cu2cm69P0K8YoTcF4TSFV19ROHo wMAu08EpvDOwdLY44YTL+5wTgHRqOunHHu1NPxj+oodMDMPxr4xd5n5NHfRCqMzfUAyV z45Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si8577482plp.100.2019.03.05.08.15.27; Tue, 05 Mar 2019 08:15:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726619AbfCEQNq (ORCPT + 99 others); Tue, 5 Mar 2019 11:13:46 -0500 Received: from relay.sw.ru ([185.231.240.75]:34556 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfCEQNq (ORCPT ); Tue, 5 Mar 2019 11:13:46 -0500 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1h1ChE-0006No-Bx; Tue, 05 Mar 2019 19:13:36 +0300 Subject: Re: [PATCH] kasan: fix coccinelle warnings in kasan_p*_table To: Andrey Konovalov , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton Cc: Kostya Serebryany , kbuild test robot References: <1fa6fadf644859e8a6a8ecce258444b49be8c7ee.1551716733.git.andreyknvl@google.com> From: Andrey Ryabinin Message-ID: <67536e1d-2819-553d-521c-bae21a51e0f7@virtuozzo.com> Date: Tue, 5 Mar 2019 19:14:05 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: <1fa6fadf644859e8a6a8ecce258444b49be8c7ee.1551716733.git.andreyknvl@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/4/19 8:04 PM, Andrey Konovalov wrote: > kasan_p4d_table, kasan_pmd_table and kasan_pud_table are declared as > returning bool, but return 0 instead of false, which produces a coccinelle > warning. Fix it. > > Fixes: 0207df4fa1a8 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN") > Reported-by: kbuild test robot > Signed-off-by: Andrey Konovalov > --- Acked-by: Andrey Ryabinin > mm/kasan/init.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/kasan/init.c b/mm/kasan/init.c > index 45a1b5e38e1e..fcaa1ca03175 100644 > --- a/mm/kasan/init.c > +++ b/mm/kasan/init.c > @@ -42,7 +42,7 @@ static inline bool kasan_p4d_table(pgd_t pgd) > #else > static inline bool kasan_p4d_table(pgd_t pgd) > { > - return 0; > + return false; > } > #endif > #if CONFIG_PGTABLE_LEVELS > 3 > @@ -54,7 +54,7 @@ static inline bool kasan_pud_table(p4d_t p4d) > #else > static inline bool kasan_pud_table(p4d_t p4d) > { > - return 0; > + return false; > } > #endif > #if CONFIG_PGTABLE_LEVELS > 2 > @@ -66,7 +66,7 @@ static inline bool kasan_pmd_table(pud_t pud) > #else > static inline bool kasan_pmd_table(pud_t pud) > { > - return 0; > + return false; > } > #endif > pte_t kasan_early_shadow_pte[PTRS_PER_PTE] __page_aligned_bss; >