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 28971FA373E for ; Tue, 25 Oct 2022 20:14:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B4DE8E0002; Tue, 25 Oct 2022 16:14:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 664E88E0001; Tue, 25 Oct 2022 16:14:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 505DB8E0002; Tue, 25 Oct 2022 16:14:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3E1028E0001 for ; Tue, 25 Oct 2022 16:14:03 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E8BD340DE1 for ; Tue, 25 Oct 2022 20:14:02 +0000 (UTC) X-FDA: 80060573124.27.A4546B4 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by imf13.hostedemail.com (Postfix) with ESMTP id 6C1062001B for ; Tue, 25 Oct 2022 20:14:02 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id x2so10843267edd.2 for ; Tue, 25 Oct 2022 13:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=vzUdb+11OKpC0haeLKMasIe3sD0mOGH9tVf3ZkY+4u8=; b=E8BpASHZAVf03zN2kUs0l9qsat9fcsLBjkGkz0CFaixaOoXBDDyu38xMRanCH0dok2 vurzNRXSLSvP59d3cMpirp/LO0FnlfQdk1iQ56926JxbcMmPfuBbY37BoFgj1awrmvbP IRK1KwnOkWF2yiew6XmGbPGtGsA6CxbzBezpTRbni4JUmSMfrbj6j1n7AWQoM7oufwTE aU9P0iNnnXWQdv87zdObKZN19cwAz/BvTvvr8xHpUEzfC1KEfN6ZCYbnQvKilUfGfXYm yp3xrPIIVztII5ylLDi2SmdfxGZKQyxSzXi3NRJ3c96UBNZ7L+miuxqDWm0jbaxLYMzo PbHw== 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:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vzUdb+11OKpC0haeLKMasIe3sD0mOGH9tVf3ZkY+4u8=; b=hzNZHG4JG/7q79Ux70tZHQrkvrZPr3I9vYdzR1hqCl9B0U7uTZfPrhtCcOFB9oI4qX a6PtRsexMxqgTUERSqVGF2G9rBPSRhvL0CqCpXz5YQU/mIPb0PxztUb4QCaT2X+jdXpA 6Ur/yoCdg+/gupNDqXbtnJYdiL51LZPJ6HmkwngED4ZnRXD1lyEj/KfGB8frnykjDcuJ 3b8y9SyZyl9ZiKgGDrJ1mixx6FHxFh0w23GCC0/ISBCS2FnhdrA+tKL/7UyAml6tQxLL tSNkNx0fUBSMInVFBV/fp68Vb/cpaQHTNVoQEeltoBkE9oxvcorpPneNuK/LA9hzV40t Gxmg== X-Gm-Message-State: ACrzQf2ZjEmEyvCd8wbfzQh2+lJATqbYE7NNsmQ6sU7ngXA38daSZ3c+ IwDCmyv14PRl7gQypjafphY4kJoxckLfbzIxdxFfO3QCZMw/KQ== X-Google-Smtp-Source: AMsMyM5SO8H54i1MFlQl3A+CbWaIQWqLYJjvjJKFKcyHUUIdiSyyXkGpoP0d+pDsONsQ4EqSyaQXI6dJKF6OaNJIbJc= X-Received: by 2002:aa7:d996:0:b0:461:88b8:c581 with SMTP id u22-20020aa7d996000000b0046188b8c581mr16617249eds.111.1666728839942; Tue, 25 Oct 2022 13:13:59 -0700 (PDT) MIME-Version: 1.0 From: Naresh Kamboju Date: Wed, 26 Oct 2022 01:43:48 +0530 Message-ID: Subject: clang: mm/khugepaged.c:1729:7: error: variable 'index' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] To: linux-mm , open list , lkft-triage@lists.linaro.org, llvm@lists.linux.dev Cc: Andrew Morton , Gautam Menghani , David Hildenbrand , Steven Rostedt , Vlastimil Babka , Yang Shi , "Zach O'Keefe" , "Kirill A. Shutemov" , Masami Hiramatsu Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666728842; a=rsa-sha256; cv=none; b=q8awSyKMOruNcAQh66YR7Lblep0dXdA4Uh0zlUcFeRGGkZ91VCmAWn0Y84hAPORr0sP9so ppnNBgEq/fGvmrLdKWyM9Vx5suNSCDTzJ5jKUoxr2dAeNL5H5DEtM3AEMFDT27bvRdBww2 kSnPNrTzSB6BS9xiPyDPumfEqZ22e8k= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=E8BpASHZ; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf13.hostedemail.com: domain of naresh.kamboju@linaro.org designates 209.85.208.50 as permitted sender) smtp.mailfrom=naresh.kamboju@linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666728842; 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: references:dkim-signature; bh=vzUdb+11OKpC0haeLKMasIe3sD0mOGH9tVf3ZkY+4u8=; b=jMT7iJz17uP3MxZlnBVwNbSnt3e3EimQITXUG0IWC1Skt1z34nOWcIagDB26IdWPYX8tnf /d7oS1kk/xDol33uS6iuYN02WDB5ZSNeLq/KOlBjPj7gyiZ4uanU7J2l1g6axZIhkrfXQS ZXV0Clz+I8AkMST9nL7wqy+jnkk8ZB0= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 6C1062001B X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=E8BpASHZ; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf13.hostedemail.com: domain of naresh.kamboju@linaro.org designates 209.85.208.50 as permitted sender) smtp.mailfrom=naresh.kamboju@linaro.org X-Stat-Signature: e5mudtxqxcq9saqy7q7wxjgtaknox6ri X-HE-Tag: 1666728842-370385 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Following build warning / errors noticed while building x86_64 with clang on Linux next-20221025 tag. Reported-by: Linux Kernel Functional Testing ## Build * kernel: 6.1.0-rc2 * git: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next * git branch: master * git commit: 89bf6e28373beef9577fa71f996a5f73a569617c * git describe: next-20221025 * test details: https://qa-reports.linaro.org/lkft/linux-next-master-sanity/build/next-20221025 ## Test Regressions (compared to next-20221024) Regressions found on x86_64: - clang-nightly-lkftconfig - clang-12-lkftconfig - clang-14-lkftconfig - clang-13-lkftconfig - clang-14-lkftconfig-kcsan make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build LLVM=1 LLVM_IAS=1 ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- 'HOSTCC=sccache clang' 'CC=sccache clang' mm/khugepaged.c:1729:7: error: variable 'index' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!xas_nomem(&xas, GFP_KERNEL)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:2063:47: note: uninitialized use occurs here trace_mm_khugepaged_collapse_file(mm, hpage, index, is_shmem, ^~~~~ mm/khugepaged.c:1729:3: note: remove the 'if' if its condition is always false if (!xas_nomem(&xas, GFP_KERNEL)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:1716:6: error: variable 'index' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (result != SCAN_SUCCEED) ^~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:2063:47: note: uninitialized use occurs here trace_mm_khugepaged_collapse_file(mm, hpage, index, is_shmem, ^~~~~ mm/khugepaged.c:1716:2: note: remove the 'if' if its condition is always false if (result != SCAN_SUCCEED) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:1705:15: note: initialize the variable 'index' to silence this warning pgoff_t index, end = start + HPAGE_PMD_NR; ^ = 0 mm/khugepaged.c:1729:7: error: variable 'nr' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (!xas_nomem(&xas, GFP_KERNEL)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:2064:15: note: uninitialized use occurs here addr, file, nr, result); ^~ mm/khugepaged.c:1729:3: note: remove the 'if' if its condition is always false if (!xas_nomem(&xas, GFP_KERNEL)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:1716:6: error: variable 'nr' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (result != SCAN_SUCCEED) ^~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:2064:15: note: uninitialized use occurs here addr, file, nr, result); ^~ mm/khugepaged.c:1716:2: note: remove the 'if' if its condition is always false if (result != SCAN_SUCCEED) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mm/khugepaged.c:1710:8: note: initialize the variable 'nr' to silence this warning int nr; ^ = 0 4 errors generated. make[3]: *** [scripts/Makefile.build:250: mm/khugepaged.o] Error 1 steps to reproduce: # To install tuxmake on your system globally: # sudo pip3 install -U tuxmake # # See https://docs.tuxmake.org/ for complete documentation. # Original tuxmake command with fragments listed below. # tuxmake --runtime podman --target-arch x86_64 --toolchain clang-14 --kconfig defconfig --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft.config --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/lkft-crypto.config --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/distro-overrides.config --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/systemd.config --kconfig-add https://raw.githubusercontent.com/Linaro/meta-lkft/kirkstone/meta/recipes-kernel/linux/files/virtio.config --kconfig-add CONFIG_IGB=y --kconfig-add CONFIG_UNWINDER_FRAME_POINTER=y LLVM=1 LLVM_IAS=1 tuxmake --runtime podman --target-arch x86_64 --toolchain clang-14 --kconfig https://builds.tuxbuild.com/2Gc0JDbUOIN0veL39dqIt03qgEi/config LLVM=1 LLVM_IAS=1 Build link, - https://builds.tuxbuild.com/2Gc0JDbUOIN0veL39dqIt03qgEi/ -- Linaro LKFT https://lkft.linaro.org