Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp296421lqo; Tue, 7 May 2024 23:03:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVM5tCLWEdgfLQ7GK+tYCbkUsYCVhrlKG4YQ0aAXuYA0L6msPif7AyDaldxXb4RRBVLNLHY0xsf8ssaPg1pCSDaFuk+BOUA7pnWhGrH+g== X-Google-Smtp-Source: AGHT+IEaT2izyMUu1AKrRPQSw2ekXwmGFF9FTx4MYBKXF8unpQEqYl/o2SSLurfZQZKZbLts4p3I X-Received: by 2002:a17:90a:e2d5:b0:2a2:c16:d673 with SMTP id 98e67ed59e1d1-2b6169ddbadmr1670303a91.36.1715148231341; Tue, 07 May 2024 23:03:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715148231; cv=pass; d=google.com; s=arc-20160816; b=JEZUQ8uPxATDfTEKOYcpdnelFcBpbytENLgrdN3VcikKNMZe/0m0yi2bYOtcV7vD39 gD2uBg+ynsHyyAcZuLkFPuLL7ptXIpJYStIDuf5nK0U2SW9V4pVdLAERYGy75qnLvEXE 2r4yoooULkCz2PDmBZgqmdn2tlic9Y4ssH8tWtiGzH7QtYxv9xvBShrBh8zGsoxZOIXd TPlQsM93CwUR3uhAylFqf12dZiOtNRvWAU7xi+TWnBM5jbInReboxvmE6O/SCECQV30L bWpnC6DLFtkruy/aSlyK71Ye2MCwgt9Cl+9iMXZdPlja/nER8ZJoYhUSCHPNceb2Cprg oBTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=quezWr5QuXsegJOKyc01UZwoa4UGQB+lMfqaDG5ySt4=; fh=yxrTjsC1M/IfSetweoVw95f7LauUrIwU/+yxbqDLsyQ=; b=XsHJKkSz//YnZv4w0qS0lLrQYpntnhb8rmebIBiRrGPpS6j+GL8tWVrRBVI24CBZD9 n/HuAzTRGc+fgX5OEJNDjk8PDDTz/SJQM58H4FALQXf6SymFEjl91M38Ntu+2kmSliqM CU31ys3zWFQGfxw9rcm+fe8J/UaMcE/6G1Qf43oN0zVcuu677oUyxco1aD3pz1tb3W5c BBKXUxBNDDXYkZL3AjTIWV24EFQU7IppBG0fYAwtBne2byjfuLS7ggwgWvs4sZdDDkKd IX7qpyrCWUmSGGT7pKdZss6bgaFs1F/ggDMkcQC5rT54PeadGq0esDSY4deud5SW7uy4 f8AA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=M0dC76PS; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-172727-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j3-20020a17090a588300b002b070ca802dsi717324pji.2.2024.05.07.23.03.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 23:03:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172727-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=M0dC76PS; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-172727-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F1B3028535D for ; Wed, 8 May 2024 06:03:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77DCC17BD5; Wed, 8 May 2024 06:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="M0dC76PS" Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB0E08F6C for ; Wed, 8 May 2024 06:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715148224; cv=none; b=hKN7d3MA84jeViQL5sDtTIfECPRBIAcyh3Sv81TcAluRDUkWHSfzT5nCm+vSOejk4zyKKP8H9ltGk5yK5cxKsaTZmIgNbhBcvIpGKNXg7CN01ChpUVmhUIpFSGNT1KXgMk1Cezb8OAaafsag8CbcIep9oqu7mAPRvuLlHUNY8cY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715148224; c=relaxed/simple; bh=vR8MQjZ4OZFhEHYcpFtvdK1XRggMdo6jqFWufXUb6lw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=u1YgxRnA/1jISul7LcTiBrOsvtTtDN+6j+1DIJ34VmWgHKGCVQhD8lUWDV5SKu7zhwgS8j2QeW8nTvTOD7KFgmQb+rc91L8iExw8i51Y+uRBw4P+medsaOrzxaF/Qg315v7kwTjm5t/2rv+zV1Kkfd2ABkTLlr+yBRAFsMHBxyM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=M0dC76PS; arc=none smtp.client-ip=115.124.30.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1715148217; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=quezWr5QuXsegJOKyc01UZwoa4UGQB+lMfqaDG5ySt4=; b=M0dC76PSi5EJU+kfyDhPKEE/dF4SPcbeDfaMMu/z14myLJy/Ks0SylhLhtbTlegEv5b1bXKWS+17yLrU1NZrRbKFMfwIFTHIRLyeBeK/eBAXnqSfc9Rnfums6yk6Y+tTuYHR/4ZToXElUsDFleu8vtcysg+p4ubFUfS55orR1cg= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032014031;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0W62W8yi_1715148214; Received: from 30.97.56.69(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W62W8yi_1715148214) by smtp.aliyun-inc.com; Wed, 08 May 2024 14:03:35 +0800 Message-ID: <4a6c6c90-04bd-4a02-9080-0f98e8cf5ebe@linux.alibaba.com> Date: Wed, 8 May 2024 14:03:34 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/8] mm: shmem: add mTHP support for anonymous shmem To: kernel test robot , akpm@linux-foundation.org, hughd@google.com Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, willy@infradead.org, david@redhat.com, ioworker0@gmail.com, wangkefeng.wang@huawei.com, ying.huang@intel.com, 21cnbao@gmail.com, ryan.roberts@arm.com, shy828301@gmail.com, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <202405071820.2KY0UnDu-lkp@intel.com> From: Baolin Wang In-Reply-To: <202405071820.2KY0UnDu-lkp@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 2024/5/7 18:46, kernel test robot wrote: >>> mm/shmem.c:1780:10: warning: variable 'folio' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized] > 1780 | while (suitable_orders) { > | ^~~~~~~~~~~~~~~ > mm/shmem.c:1795:7: note: uninitialized use occurs here > 1795 | if (!folio) > | ^~~~~ > mm/shmem.c:1780:10: note: remove the condition if it is always true > 1780 | while (suitable_orders) { > | ^~~~~~~~~~~~~~~ > | 1 > mm/shmem.c:1750:21: note: initialize the variable 'folio' to silence this warning > 1750 | struct folio *folio; > | ^ > | = NULL > mm/shmem.c:1564:20: warning: unused function 'shmem_show_mpol' [-Wunused-function] > 1564 | static inline void shmem_show_mpol(struct seq_file *seq, struct mempolicy *mpol) Thanks for reporting. Will add below change to avoid the warning: diff --git a/mm/shmem.c b/mm/shmem.c index d603e36e0f4f..fd2cb2e73a21 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1747,7 +1747,7 @@ static struct folio *shmem_alloc_and_add_folio(struct vm_fault *vmf, struct shmem_inode_info *info = SHMEM_I(inode); struct vm_area_struct *vma = vmf ? vmf->vma : NULL; unsigned long suitable_orders; - struct folio *folio; + struct folio *folio = NULL; long pages; int error, order;