Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2608138imb; Mon, 4 Mar 2019 09:18:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyTZRZ/Al0A/LQycodoDKPyx6zX8LqbxKP4zPC8bY3lKc5wJHvg70pGwgKN2WOTkT/HV+HA X-Received: by 2002:a17:902:7881:: with SMTP id q1mr20677010pll.301.1551719903480; Mon, 04 Mar 2019 09:18:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551719903; cv=none; d=google.com; s=arc-20160816; b=edtkBGDIiv0JKQzhCoxJnf68122Dv977cTl3EMsC3Mm18Y6HPRC+NA9Jb6lL6pywAT G7cjwPIiVcUCeC1XGNsBgm14IdkQgqEPVTocndk7E6bQG7acDU8X+vnqE6MQyT1bbb3W 26wOBtIp0tm4x/ZGnkXYkY5RqgE5RbDGXxepoFCpLprl+Rds4dzEMtgZSyNxj9Dcr2Zf U8KlPshGRqdA/hn4mVP/vWpYrpvdJklzd93z77nfXyAvW/wXHo8s+cr9t3ne++ZiFfEI BiKxXssNlAc82VNhmjpKxxAZHOtK5aOrGTVC1fsfXNcJrikteQESQpEMrSsXjlge4y8m 5d4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=y9YtX+guuq4jzTb5p6KJENEt5MDOMi6rFV456jle65Q=; b=U4Zl0QpJLGpxOtA4wmWnhp7Pl3oAnw7QzYSbK87BDiPUA5sh/DXAJ+vXSSLVvT3gA3 PPPgAH1lGDh+ucuOeyL5K3dH07Yozba+R1p8ZiekpghMP9CaUICxE60p+1aFV9KAF1Xw zvB/TxGylMZCws8BJ+5CDEcY0JwJZLa3vm3Euy3ECpaOSrpdxeS1VXfn91t6XbU8pdum HastaP9PtMldJHGBZBLOPRkH/FhSXwzpRwy5PGvAP20eP7mR1MJg1e2fO4UXq0ucGYxE z0On6g1gKJmE7zlrWQAMFbTCMyoe7EnFawm9wHEovB7lVUFfGYCNlaJSW6fonkFHYc+I PF5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CWqRYwOg; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8si5521487pff.277.2019.03.04.09.18.08; Mon, 04 Mar 2019 09:18:23 -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=@google.com header.s=20161025 header.b=CWqRYwOg; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727163AbfCDREv (ORCPT + 99 others); Mon, 4 Mar 2019 12:04:51 -0500 Received: from mail-qk1-f202.google.com ([209.85.222.202]:42816 "EHLO mail-qk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfCDREu (ORCPT ); Mon, 4 Mar 2019 12:04:50 -0500 Received: by mail-qk1-f202.google.com with SMTP id 207so4888397qkf.9 for ; Mon, 04 Mar 2019 09:04:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=y9YtX+guuq4jzTb5p6KJENEt5MDOMi6rFV456jle65Q=; b=CWqRYwOgcRdTy/1Zuf8A3CD/jL6JjEg15KYHyTccY8wV9VTBQZFKPDp7YcXEOJ24fR MSdmCSL73tkBebZK9OULfdflqqbl8LZsrwI17gQTN8ko6agIOf/R4gBl/HiR07eTdbER BaKm8iyStIOkCK7UjmOug4DEMbA+SZXW64b0UHxsMx7QR7LuZx6DYzI9kA52c99QZkuj +fdLeqGmGuzjo/8YIKNUuAqkd28EmzlINQz118sDfQJsa7kNKx5FPov5yz1VsMLkpI7Z Vx0NFv+uUFcHtx4VehXMJz8fL9q/Fq/o4b2kTqjb+cVZWg1o5vBMXZzzr3wZ8Fk+hgCY Ri7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=y9YtX+guuq4jzTb5p6KJENEt5MDOMi6rFV456jle65Q=; b=q9EFBTRij4v77Q6LLAWP8mctS7mAwa7TXbzYrf052o8inHWTqfkmQl+n5fW0M1F0V0 PbOFB+B7Y9+aHtQE/LxYGOlSKboZAp2ScYs4PUh4UyDJfb/kde/pIZiGSF8rx8yxxYmc lYxHJd5StHbK8kagh1TdiHC4tRW4oqMe6W+HJmPnya3ehFpnhhYMM6puodtuBP+DEyvh sxTLYJzwDBMrupmLWUWT7vnEWWSfC1fH+XlmlqmF6dq9xi+WToyp3HJJU50nIi/hlfUq U3HtcTQTJ1/uXaLBMvLPg7oAswj21AfMlOqHHRZRdzyv8vs7JQ7HSoLzFXIvWlYUe9B+ VGAg== X-Gm-Message-State: APjAAAV5z/Ruj8+sDd4LidzQiAcP3yzBkZsmTZdouKzQp10oE+Y6ta0j tQb0g6mEL6OON23H5Za9H3vVYEltskpsiwSs X-Received: by 2002:ac8:2539:: with SMTP id 54mr11239168qtm.45.1551719089934; Mon, 04 Mar 2019 09:04:49 -0800 (PST) Date: Mon, 4 Mar 2019 18:04:45 +0100 Message-Id: <1fa6fadf644859e8a6a8ecce258444b49be8c7ee.1551716733.git.andreyknvl@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.21.0.352.gf09ad66450-goog Subject: [PATCH] kasan: fix coccinelle warnings in kasan_p*_table From: Andrey Konovalov To: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Kostya Serebryany , Andrey Konovalov , 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 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 --- 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; -- 2.21.0.352.gf09ad66450-goog