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 08062C4332F for ; Fri, 21 Oct 2022 03:19:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 691808E0002; Thu, 20 Oct 2022 23:19:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 642028E0001; Thu, 20 Oct 2022 23:19:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 530BE8E0002; Thu, 20 Oct 2022 23:19:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 42D1A8E0001 for ; Thu, 20 Oct 2022 23:19:15 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 10C9E1404D6 for ; Fri, 21 Oct 2022 03:19:15 +0000 (UTC) X-FDA: 80043500670.09.BAE47F1 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf12.hostedemail.com (Postfix) with ESMTP id CFC7C4001B for ; Fri, 21 Oct 2022 03:19:13 +0000 (UTC) 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> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666322354; a=rsa-sha256; cv=none; b=g9xRs62P+/zPEC9/8wtscp2YHWZpbIseV/xxp9IqosQgngH1gHAvQsQd1b4BYNqYZgXpos 9kre423V6OYb6n8rKk6qrRy0/8dtKhsMiQ8NpiRbyeQlsXsGLubUza5+Lx+P6R5tASjEdh QP3rKYqQ7UEYeq8N019nQej24P2xiTw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VRkt09LE; spf=none (imf12.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666322354; 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=Q2CsU9j35e4opIsKqxE71Di4rOM/M7grRBS9sfeC9eM=; b=XYfdTaMwTog2wzmLzBu7Zy9pCo/CiKAOdV5UfIJyCXNsCtnyxnaH9qdhUZGXlZqGE7AK0B miodnTuSEi/lj2iJN20jl61iqSJ2Qr6/IX1dIX1lYIEYP577bT9cBqM02lGVpikRhaIs+o b66qviZ1hRefVfbLnTphXPhK8MSKBLI= X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=VRkt09LE; spf=none (imf12.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: w51b8rz1jd4erpp8bzjt4akxeqpx9zar X-Rspamd-Queue-Id: CFC7C4001B X-Rspamd-Server: rspam10 X-HE-Tag: 1666322353-732864 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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))));