From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D245BC433FE for ; Tue, 18 Oct 2022 13:50:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4DF1F6B0072; Tue, 18 Oct 2022 09:50:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4679D6B0075; Tue, 18 Oct 2022 09:50:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 307A06B0078; Tue, 18 Oct 2022 09:50:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1D8726B0072 for ; Tue, 18 Oct 2022 09:50:38 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 9E003161089 for ; Tue, 18 Oct 2022 13:50:37 +0000 (UTC) X-FDA: 80034205314.24.DB08946 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by imf03.hostedemail.com (Postfix) with ESMTP id 2DC9A2002F for ; Tue, 18 Oct 2022 13:50:35 +0000 (UTC) Received: by mail-ej1-f42.google.com with SMTP id fy4so32290815ejc.5 for ; Tue, 18 Oct 2022 06:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4wB631nR2ufn98xkxwjeGkfg7tpbIY9DF7gaZqGQ2F0=; b=FyhgUOcqf/42Eom8h+I3ww7dlLGs6xqifW84EHyBBYE/gEVk4Te1j/d5t0QM1xH4+4 cB5ELfFR0pqlmYyATk1VUARWb4Pidq8hi5zGl/HCDz3DZaT0ShTH9IzsFKjT2sP+pH1r alK81IFzQs9RzZ3L7Mryp5pCouUg7FlptsP0pp+hPeN5gMGU7NgKbVKHccqUbFfaLqDo v0icfKu7ER24FtnyIbZFl4VP0ndR+rh8E7O2qN1T3cDT7eWzvz/hPNWVgVDLVZfjBA77 Q4AzFkbtwlbBYnUCiRVJR34iZ71nem0YCDAMuPyVxbSKnlUXhZ1xkiUIhtL9JYgaqGcD mM7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4wB631nR2ufn98xkxwjeGkfg7tpbIY9DF7gaZqGQ2F0=; b=waGlc6l+arGcu9swOZPncfM21pULQKaMSK1Jmb0LDRYznEywBEW14Tw8EgPR66+nUj ScSwdIX2I2kB47m+r5oTZ9nW9HMymd0L27lVJkUHv1eNz0Z8Skyis2i3jH4Xiuxqhogc NL5VMFJ2qi+l69y84RwYFMZ7qbAYZzKrswjwZwyInSrOQXUA2vCbKMp83scUiPJaIiMd Ey1NRre4c5h239ulhqwoTmUAaqLOyMjh2Mm7rNBdPyZaQH6q47M0QUlQQXOrUGdZoCkN LJ6/Ib7yGiROK/tKgco/RAfJ+K/0SaMSuT4oQxRLgm1zNcvvrytva3xJKWEcYDINDcab PG+w== X-Gm-Message-State: ACrzQf1GBW2SbElqlZMcywFUivkf/oac6TolaaQl+HaOiqG+ycMzONMZ CLYxxIZAyHZCecVELXWeAKwVQKnTOZUsp96MZ30= X-Google-Smtp-Source: AMsMyM4M2kkaTjQaNSIcEbJSJ8+b27Nmni5Q4FPGnKfiZeWEyp32D1sTPdMjC+G0iSohUSx9aKDtfLeypPfBnuReInk= X-Received: by 2002:a17:906:9be9:b0:78d:2f63:10dd with SMTP id de41-20020a1709069be900b0078d2f6310ddmr2492010ejc.479.1666101034690; Tue, 18 Oct 2022 06:50:34 -0700 (PDT) MIME-Version: 1.0 References: <202210181318.WUNV3QRv-lkp@intel.com> In-Reply-To: From: Dongliang Mu Date: Tue, 18 Oct 2022 21:48:33 +0800 Message-ID: Subject: Re: [linux-next:master 1304/1443] fs/jfs/jfs_dmap.c:196:23: warning: result of comparison of constant 8796093022201 with expression of type 'int' is always false To: Dave Kleikamp Cc: kernel test robot , llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List Content-Type: text/plain; charset="UTF-8" ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FyhgUOcq; spf=pass (imf03.hostedemail.com: domain of mudongliangabcd@gmail.com designates 209.85.218.42 as permitted sender) smtp.mailfrom=mudongliangabcd@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666101036; a=rsa-sha256; cv=none; b=I8uDQguzPCEXLSpmpRl4FVLGVH7sC/ZNtPaO9OQppJ0+e5/dT5LCv7I/nY0809z/0zRibC 2w7AMQEUt1pIVkg0UJbnYABSAjuMKs6lHC5UhTuigVy9VXotGC/+CxOq41jon4nj6YkDQu yY2Wkd5zbl8XMulqC5c0YSVeZO/Fm/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666101036; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4wB631nR2ufn98xkxwjeGkfg7tpbIY9DF7gaZqGQ2F0=; b=wRYIiFvSHLC/+CZAwMKoYgvR29zwi2AU4h9AvKctGpbBsUc19kFWKniXKdDhcuXS84aYTM pdQnXRBwbuUeFmNH7Nm21+Ba5thz99Vohnsi+1jIL12Y2DZzs3ASzZHoZWRbjD/YRRQ5c7 EdxpHvwanA0CWICIGjJ9w/8WQ83eHqs= X-Stat-Signature: 44j1gg7cqyxsufbz7k4m9j6n55z5f3hj X-Rspamd-Queue-Id: 2DC9A2002F Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FyhgUOcq; spf=pass (imf03.hostedemail.com: domain of mudongliangabcd@gmail.com designates 209.85.218.42 as permitted sender) smtp.mailfrom=mudongliangabcd@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1666101035-130847 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000034, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Oct 18, 2022 at 9:39 PM Dave Kleikamp wrote: > > On 10/18/22 3:11AM, Dongliang Mu wrote: > > On Tue, Oct 18, 2022 at 1:50 PM kernel test robot wrote: > >> > >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > >> head: 4ca786ae6681b90b0ec3f4c55c89d12f835f8944 > >> commit: 920f4b7e923b35fd9d117fd3cb616b310cd41010 [1304/1443] fs: jfs: fix shift-out-of-bounds in dbAllocAG > >> config: mips-randconfig-r005-20221017 > >> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920) > >> reproduce (this is a W=1 build): > >> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > >> chmod +x ~/bin/make.cross > >> # install mips cross compiling tool for clang build > >> # apt-get install binutils-mipsel-linux-gnu > >> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=920f4b7e923b35fd9d117fd3cb616b310cd41010 > >> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > >> git fetch --no-tags linux-next master > >> git checkout 920f4b7e923b35fd9d117fd3cb616b310cd41010 > >> # save the config file > >> mkdir build_dir && cp config build_dir/.config > >> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash fs/jfs/ > >> > >> If you fix the issue, kindly add following tag where applicable > >> | Reported-by: kernel test robot > >> > >> All warnings (new ones prefixed by >>): > >> > >>>> fs/jfs/jfs_dmap.c:196:23: warning: result of comparison of constant 8796093022201 with expression of type 'int' is always false [-Wtautological-constant-out-of-range-compare] > >> if (bmp->db_agl2size > MAXMAPSIZE - L2MAXAG) { > >> ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ > >> 1 warning generated. > > > > Hi Dave, > > > > I did not double check the upper bound of db_agl2size. It seems the > > upper bound should be L2MAXL2SIZE - L2MAXAG, other than MAXMAPSIZE - > > L2MAXAG. > > > > And L2MAXL2SIZE = L2BPERDMAP + 3 * L2LPERCTL = 13+3*10 = 43. > > > > I will send a fixes commit. > > Thanks for fixing that correctly. This was my mistake, since that's the > value I asked you to use. > > I'll use your new patch. It's fine. I should double-check all my changed code in the patch. > > Shaggy