Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1971945rwi; Thu, 20 Oct 2022 20:52:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6h8YUatfh5ONY7vbE0uOdMwS4GxnAXJZi7P8OoOo/9Mf3LUge6bgvUESZUwGaWwyxmbfQ/ X-Received: by 2002:a05:6402:414f:b0:456:c2c1:23ec with SMTP id x15-20020a056402414f00b00456c2c123ecmr15707596eda.420.1666324325964; Thu, 20 Oct 2022 20:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666324325; cv=none; d=google.com; s=arc-20160816; b=xM30ewaWB4DOr5JmdLa3EGBx8dToG++t4wZt/cEazScNVFpxCHkuZAKXNcU0yHs6CI qbXk+7TuGluoQxazFZb+v6yf4jt1r5P5X6GAYCUCjQusDFEMcLAUJPp5oa5MMhzkPb3I nfKvyJPZOx5siaffHLBsIaYNjvPRBqx8d0+VhOMK2ktynZVAJlgAvuQ7hytWG00qZYZz UwyCkHIM1B/B3++i2Znta1W+c3hofou6BUtCOIn5PAf7VxA0NodZyMg/4HyCxMm6MIyQ n29zh19hBQJyUKACJJUnZ1oflkY3YTn5NSiYF+XPmEZz2t2hLk3UkaifBGylHB2p7dgn KVXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q2CsU9j35e4opIsKqxE71Di4rOM/M7grRBS9sfeC9eM=; b=uIR/hJl70cvyMmIU7MIlfvuvUKd08iEdIncirNekhhm5wWJvszbhjMw/VhdU9jKwoX bd0savhiRUb2RY6u4gmAJWmBfQ34Hdn2dVE3mDq5C2avJbHZnd6w7Zkwhj5iie97dNI/ jhwR3RjwDbCr9LGhY0q6IJnSj3kSsxsz9/IxdZ3RC+9nsc4pm1ImSMLdEujO3pGHo4rV WCdc5oytAQxPw2pducSbV1qZ1KQg8YJrm6lmqngVLNyg/V76sby0svUIYN6uRfGo3t2P fR94znQZ/arGMnfPBuxPjEYRGnjGExZtE6wAJMftjAyBZ3ieDgxGsqouMet9RfRQen5a +G4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=VRkt09LE; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go7-20020a1709070d8700b00792e39c31dcsi6403656ejc.988.2022.10.20.20.51.40; Thu, 20 Oct 2022 20:52:05 -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=@infradead.org header.s=casper.20170209 header.b=VRkt09LE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbiJUDTT (ORCPT + 99 others); Thu, 20 Oct 2022 23:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229868AbiJUDTQ (ORCPT ); Thu, 20 Oct 2022 23:19:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDD361D93EE; Thu, 20 Oct 2022 20:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Q2CsU9j35e4opIsKqxE71Di4rOM/M7grRBS9sfeC9eM=; b=VRkt09LE12jN447t+9ZjNlQneq TG6kAL+F7qkxWLD8MJG4PD7/q7Q9z7SnToGHAdK6SpkKc0Qx24OqI4qE322xr8HW2IzEF8gBcE54c 2bExxK3EfSh+l8bNqn6RgaoyDekYLSjw+HM4Og6I13AgL7n8WsUhze1P28t/ZH1gm3eDTA0RV4byz 4GlsSsRpmpHllBMgf/sOZS3LAyNrmKXGz+7gry6mcOcG428wJ7fqJcRnxamMMn9gp9dICYwGiU2jO SdPc/4Hfi6lg4U46AVM9VXAovDohnJYFzWyb6TJiFKg/krY5NZ8Ig0s948CGEKeTry6tbgvlyVh58 7iDDJciw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oliYs-00Cqfq-Rs; Fri, 21 Oct 2022 03:19:07 +0000 Date: Fri, 21 Oct 2022 04:19:06 +0100 From: Matthew Wilcox To: Maria Yu Cc: akpm@linux-foundation.org, ziy@nvidia.com, david@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mike.kravetz@oracle.com, opendmb@gmail.com, stable@vger.kernel.org Subject: Re: [PATCH] mm/page_isolation: fix clang deadcode warning Message-ID: References: <20221021030953.34925-1-quic_aiquny@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221021030953.34925-1-quic_aiquny@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 Fri, Oct 21, 2022 at 11:09:53AM +0800, 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. Honestly, the cure is worse than the disease. I'd rather not have a line that's this long. > - int mt = get_pageblock_migratetype(pfn_to_page(isolate_pageblock)); > - > - VM_BUG_ON(!is_migrate_isolate(mt)); > + VM_BUG_ON(!is_migrate_isolate(get_pageblock_migratetype(pfn_to_page(isolate_pageblock))));