From patchwork Fri May 7 01:02:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12243725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1D4CC43460 for ; Fri, 7 May 2021 01:02:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9ED56610F7 for ; Fri, 7 May 2021 01:02:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9ED56610F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3B9366B0083; Thu, 6 May 2021 21:02:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3920A6B0085; Thu, 6 May 2021 21:02:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 27F7C6B0087; Thu, 6 May 2021 21:02:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id 0B4D46B0083 for ; Thu, 6 May 2021 21:02:45 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BEF66814D for ; Fri, 7 May 2021 01:02:44 +0000 (UTC) X-FDA: 78112635048.09.3D7FC6E Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf05.hostedemail.com (Postfix) with ESMTP id A817EE00011A for ; Fri, 7 May 2021 01:02:39 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id D7C6C61041; Fri, 7 May 2021 01:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1620349363; bh=dtN6/mDIhSYvL2dOinpwL3CnqAnD9YfcdeoYWOpIo2M=; h=Date:From:To:Subject:In-Reply-To:From; b=ufKzsR7/HpyTKMZ/F6J38cMdKa1Wr1Aohkxhcol7ufX9K033CMgfGGfITz56RQFXv aisfFTTip9ZuKFSi2lB+tJnu/Gu8u/cw81ch6oh3SRfJ4f5Qr9Y1Qkvasy1gsnlb6j s6xNQZf3BxOflyIrYf7Gt6e62jbkZDd2hHyP2x+0= Date: Thu, 06 May 2021 18:02:42 -0700 From: Andrew Morton To: aklimov@redhat.com, akpm@linux-foundation.org, andriy.shevchenko@linux.intel.com, arnd@arndb.de, dalias@libc.org, dennis@kernel.org, dsterba@suse.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, jianpeng.ma@intel.com, joe@perches.com, jpoimboe@redhat.com, linux-mm@kvack.org, linux@rasmusvillemoes.dk, mm-commits@vger.kernel.org, richard.weiyang@linux.alibaba.com, sbrivio@redhat.com, torvalds@linux-foundation.org, wsa+renesas@sang-engineering.com, ysato@users.osdn.me, yury.norov@gmail.com Subject: [patch 14/91] tools: disable -Wno-type-limits Message-ID: <20210507010242.ydCofRv4z%akpm@linux-foundation.org> In-Reply-To: <20210506180126.03e1baee7ca52bedb6cc6003@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="ufKzsR7/"; spf=pass (imf05.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: A817EE00011A X-Stat-Signature: h1ba8jfiyeju9zzu1nm11t36gehqdmk5 Received-SPF: none (linux-foundation.org>: No applicable sender policy available) receiver=imf05; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620349359-245616 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Yury Norov Subject: tools: disable -Wno-type-limits Patch series "lib/find_bit: fast path for small bitmaps", v6. Bitmap operations are much simpler and faster in case of small bitmaps which fit into a single word. In linux/bitmap.c we have a machinery that allows compiler to replace actual function call with a few instructions if bitmaps passed into the function are small and their size is known at compile time. find_*_bit() API lacks this functionality; but users will benefit from it a lot. One important example is cpumask subsystem when NR_CPUS <= BITS_PER_LONG. This patch (of 12): GENMASK(h, l) may be passed with unsigned types. In such case, type-limits warning is generated for example in case of GENMASK(h, 0). Link: https://lkml.kernel.org/r/20210401003153.97325-1-yury.norov@gmail.com Link: https://lkml.kernel.org/r/20210401003153.97325-2-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton --- tools/scripts/Makefile.include | 1 + 1 file changed, 1 insertion(+) --- a/tools/scripts/Makefile.include~tools-disable-wno-type-limits +++ a/tools/scripts/Makefile.include @@ -38,6 +38,7 @@ EXTRA_WARNINGS += -Wswitch-enum EXTRA_WARNINGS += -Wundef EXTRA_WARNINGS += -Wwrite-strings EXTRA_WARNINGS += -Wformat +EXTRA_WARNINGS += -Wno-type-limits # Makefiles suck: This macro sets a default value of $(2) for the # variable named by $(1), unless the variable has been set by