Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5545569imb; Thu, 7 Mar 2019 19:04:20 -0800 (PST) X-Google-Smtp-Source: APXvYqz1fpIz/78aUw5ihiMmb96uk3SLBDr+WWsYxs/4A/OBn5RPRGuq4bthR2m7lRsAVzLCYKNs X-Received: by 2002:a62:2008:: with SMTP id g8mr15918438pfg.121.1552014260528; Thu, 07 Mar 2019 19:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552014260; cv=none; d=google.com; s=arc-20160816; b=Cn6YHrKBa1NCSG0PDVusugRTPgjq4qIZ7Zp9zLmKhm1LT4Tp+/a4PruceE0rCjPKAg M3uLkuR8vxXD7M1CzqB0xSJrZmWEjxXg8gT7kppG3oCX7BAyT2cy33kGt9CY5KQBurLS f9yA2hn09oBXPU/s1fuLsa0cFr5iyj/WQqso2syJ8tVdCbxxXrDkmfcjnlQ/4rrnmvkG CCwupSTsbXuyin0wVW+xIsFfKuUJuA2aGLe2OeN0eXIB0z0Gs2tk9m2kIpeKLN3ZJ83R sc9udwFxJ9AR2H+4IVFJVqVg9qFbVb7Pnin9vCTp911pzFNX+CZ+fyd18a104BNq7hxr WBEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XOdoGoPqsBrpNR+sr6f/M0KLXQUMtWTZm9TpBp/xnVE=; b=KDWZufg38U8XYaeT/RR4Wzbj2mrFEYV3rdGX6HW9GeviRDaPjUvv1Dn75WavYubKyH n7kw55D9YYFlZInB3mQILQfXJ3UoXyssQ6WxzvbikIcAoZfmRdYoHv2kvdcJBGqVlsKM njSlhnnP5SLwSmAOQ/QBenCAyQ3l+kxaVrtqdYefX2Q8+CmiOa5/xjrkAbPFehg3o2tW H+tOIU4UQl/H4SPBN+erbIp77U46i7krm+AwiTp1unwSoCNkGTwZu5YsPkbpHAiwxN02 uafmy1HPz2OxUPLksiKPoXVZAGH6RhQa/UfHBzZHE8MX0hs2YzvMB13aMbWZ1dFy+ESX qTCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="c//MCzmW"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si5513009plt.342.2019.03.07.19.04.04; Thu, 07 Mar 2019 19:04:20 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="c//MCzmW"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726361AbfCHDDq (ORCPT + 99 others); Thu, 7 Mar 2019 22:03:46 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34685 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbfCHDDq (ORCPT ); Thu, 7 Mar 2019 22:03:46 -0500 Received: by mail-lj1-f194.google.com with SMTP id l5so16171737lje.1 for ; Thu, 07 Mar 2019 19:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XOdoGoPqsBrpNR+sr6f/M0KLXQUMtWTZm9TpBp/xnVE=; b=c//MCzmWZjEMLa/ETbqKv4K5xOSGukyK1EuO0WPQRdOpZ19Elf6Dl1xbq1RjyPgOOs KQFkVDGyamEx4nam/ZOSAzD9ebRTOBLrrIvLwzXLq0nloCneuCoAsljmbHQMOE6jKACV rLEhjEFKbflhXSgqCCtcXv2/2ovenW69yG83AThl+FlrGfgw5DPab6dqmPe/qTz+2ncV S/TuawnXt+S5i+N2A72lQL7I9hDy2E8ZVAnixb7jNGSJWKmvkzrdtxDPdgUPtcd4uL6Y u6e4YJARy6xWa5MpFaJ5KMlyBT8tspQ6mZqv8WQXkJq0MyT4Oh+ATJR3MEislHBB3+j8 9u3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XOdoGoPqsBrpNR+sr6f/M0KLXQUMtWTZm9TpBp/xnVE=; b=Er2But+xqbUPgrfQXTu6bz8YavbtcUbOmeknu28TJavILPpbsguD+ABCA1VYi7Jx0y WLNUHo5gZjLXpd+8BZS7wt8z/lIEHo51d1GGSG0RtnAS+mPxCnKdhypQXuOwUmCqOLl8 r3OrFhwugTIZoEIpIYXQ0Dmbe7qsml+cLZ2dlloTGISP74L7CiFcUQOdP1NWV1dm6pUH UNbcfF8rT1r7g3JHs6np5EsM1i3RO7xSLHDvXCQpat0NmbIxn9N23eYUFT9voe95Mhz1 zy4vFjvrZgNNLnV01j6oiWex8t7HTWKOPcHLlK0yDS5eGEpCO1rl/Xx3l/eb5f7xZgRY vx6A== X-Gm-Message-State: APjAAAU3UiUq3wAFyj5WSMynpKT5jXnD28yj42JjreQJKcyodabqnPLZ J9qyHSk9jDPEanHbGv19gV9NKiTTpcza9G99k/4= X-Received: by 2002:a2e:8886:: with SMTP id k6mr8258223lji.43.1552014223831; Thu, 07 Mar 2019 19:03:43 -0800 (PST) MIME-Version: 1.0 References: <1fa6fadf644859e8a6a8ecce258444b49be8c7ee.1551716733.git.andreyknvl@google.com> <67536e1d-2819-553d-521c-bae21a51e0f7@virtuozzo.com> In-Reply-To: <67536e1d-2819-553d-521c-bae21a51e0f7@virtuozzo.com> From: Souptick Joarder Date: Fri, 8 Mar 2019 08:33:31 +0530 Message-ID: Subject: Re: [PATCH] kasan: fix coccinelle warnings in kasan_p*_table To: Andrey Ryabinin Cc: Andrey Konovalov , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, Linux-MM , linux-kernel@vger.kernel.org, Andrew Morton , Kostya Serebryany , kbuild test robot Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 5, 2019 at 9:43 PM Andrey Ryabinin wrote: > > > > 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; > > > Acked-by: Souptick Joarder