Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2261034rwi; Fri, 21 Oct 2022 01:31:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7yBN0P90DVzR3Qes1UEKeYQHQQNWx6XLrnwUp1eyZfzrW+XMs3WsdoJ1iwybYQ/5Z/B6Cg X-Received: by 2002:a05:6402:35cc:b0:45d:4a39:2a43 with SMTP id z12-20020a05640235cc00b0045d4a392a43mr16344186edc.304.1666341087659; Fri, 21 Oct 2022 01:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666341087; cv=none; d=google.com; s=arc-20160816; b=BC0nIE9uYWThu1nGDCH78tFSuxCzd7ZFofRez1dH27K39NfZYr3EYr979qJHhLOnpX gyErw4vi7OYhQrEE5cwdMymXYlKjatKf73F+c1/VQFlCk08t70hr6vPKwMySrf+6S4iQ elWcOrq2JSz2aL7stPJhadnquIF3tF/wWnvQ/ukPsaQeTtpFg0L3XCSx1jnzjy7rCHSf +sov2YXwSXUQ5QNxzoigPXtnNBO6Am4sanUOvPl1ZPDw1kSLXVh0AEim9/3viVFH28GS SdBetZ8ZF2uNxIzb0ltzLCAiOao4aQFxziynGhWpLjyWRGdC0rE3dYZYSZP81Zz/mAu6 1JvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=h2fCMR48Gpr6g0cjkfiTbdcqeaJO7CWEJP2WPO9iyJM=; b=r7KGkPbIdKIUH2BRLThMxN2z83DOPDwEz5p4OyvdqatU+oQiQD6zCDqDyBVdTJTsUd rFQZwN8gAxLq8amrUsey34nnrfsdTubxezp3Y2ElMNjE15mDRRupaw4bbxSn50GJzVhG g7Dv3e4lJsA7d3/FZw7+ua35iif8tI5hMVnQ0O+1Sn6wZOShEdrNl704tRumqqw4QRRY 8qHMXoplsA7cgXi0lu3Dhb4aZbr3vcUZVBxBzrwpqRDvtGNHgWFHDEVbZ7f8vLDK9I42 zgzxJ+jUFsbH9qYcT505uMKrkdUCjd5bKyKKZwKPZr21pwnA1KWmXYstAKTM8utLetXj Nm0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=PtIo4+qA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb8-20020a170907160800b0078239e3f846si21865032ejc.1.2022.10.21.01.31.02; Fri, 21 Oct 2022 01:31:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=PtIo4+qA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230104AbiJUIW2 (ORCPT + 99 others); Fri, 21 Oct 2022 04:22:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230096AbiJUIVk (ORCPT ); Fri, 21 Oct 2022 04:21:40 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D226624C97B for ; Fri, 21 Oct 2022 01:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1666340491; x=1697876491; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=h2fCMR48Gpr6g0cjkfiTbdcqeaJO7CWEJP2WPO9iyJM=; b=PtIo4+qAQX0n8RhFRCFEbafYWJLibRuiy5LQmU4UzPP8CBS9P0ISHwQw khbB1dgAjrVw0KZtdlOK8dVBPFJfmcgMzDfSkyFtEnsLlbyehDv8RI73u +pX00z79BJtosp+EyQCQ4GzkEmvT7JWl+nd1tBCRffT9FrqBN7cUKsWG1 A=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 21 Oct 2022 01:21:31 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2022 01:21:31 -0700 Received: from [10.239.133.73] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 21 Oct 2022 01:21:29 -0700 Message-ID: <1dd08ecb-2b08-0556-64ac-3f39a8fec76c@quicinc.com> Date: Fri, 21 Oct 2022 16:21:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH v2 1/1] mm/page_isolation: fix clang deadcode warning To: David Hildenbrand , , , , CC: , References: <20221021051936.15346-1-quic_aiquny@quicinc.com> <20221021051936.15346-2-quic_aiquny@quicinc.com> From: "Aiqun(Maria) Yu" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/21/2022 2:54 PM, David Hildenbrand wrote: > On 21.10.22 07:19, Maria Yu wrote: >> When !CONFIG_VM_BUG_ON, there is warning of >> clang-analyzer-deadcode.DeadStores: >> Value stored to 'mt' during its initialization >> is never read. >> >> Signed-off-by: Maria Yu >> --- >>   mm/page_isolation.c | 5 ++--- >>   1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/mm/page_isolation.c b/mm/page_isolation.c >> index 04141a9bea70..a7a478a22123 100644 >> --- a/mm/page_isolation.c >> +++ b/mm/page_isolation.c >> @@ -330,9 +330,8 @@ static int isolate_single_pageblock(unsigned long >> boundary_pfn, int flags, >>                         zone->zone_start_pfn); >>       if (skip_isolation) { >> -        int mt = >> get_pageblock_migratetype(pfn_to_page(isolate_pageblock)); > > __maybe_unused should work as well. Was that considered? > good idea. -- Thx and BRs, Aiqun(Maria) Yu