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 8A45FC433FE for ; Fri, 21 Oct 2022 03:26:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BBBEF8E0002; Thu, 20 Oct 2022 23:26:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B6C098E0001; Thu, 20 Oct 2022 23:26:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A33DE8E0002; Thu, 20 Oct 2022 23:26:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 946538E0001 for ; Thu, 20 Oct 2022 23:26:39 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 771C51A058B for ; Fri, 21 Oct 2022 03:26:39 +0000 (UTC) X-FDA: 80043519318.05.FEED57D Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf18.hostedemail.com (Postfix) with ESMTP id 0FFA71C0006 for ; Fri, 21 Oct 2022 03:26:37 +0000 (UTC) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29L3O57M022345; Fri, 21 Oct 2022 03:26:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=f3AP5kqyIwg0Bv2zrCocVKvk3NIrgaKA+HTSGhNavN0=; b=H5JjmPTH4bqA1lKTsNgu06G2vD2toCwuFUQdyP6lDfj3BJyFIUFksOnvQr7WDzF/veph 7I9unrMnvl0/yQl+EnV2UxJi3v5xBIys5nqlynajY52PjixChubdC8gcblhX1SLsusqk kwrDltkOpeTcK7PA55OcnYVZPva0PvDZp6iB27iH5NvLk9k9iR07dBimrCWBdRZIWUbf C1XNUo4bNaIe9IseLAbpuE8i3z0SZbxKmF3JElRNZbz4knPmfM66hVaxTaDiFFv4f8H1 zhivWeeVq/xCuKlcn6H29fH2O4n83ZTk98FsinNvwYwb8Xy8Lkay1V6OejrdymouqLVr rg== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3kak1c48nj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 03:26:29 +0000 Received: from pps.filterd (NASANPPMTA04.qualcomm.com [127.0.0.1]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 29L3QS35007486; Fri, 21 Oct 2022 03:26:28 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NASANPPMTA04.qualcomm.com (PPS) with ESMTPS id 3kbk4004b4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 03:26:28 +0000 Received: from NASANPPMTA04.qualcomm.com (NASANPPMTA04.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29L3QSkt007480; Fri, 21 Oct 2022 03:26:28 GMT Received: from nasanex01a.na.qualcomm.com ([10.52.223.231]) by NASANPPMTA04.qualcomm.com (PPS) with ESMTPS id 29L3QSnw007478 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 03:26:28 +0000 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; Thu, 20 Oct 2022 20:26:26 -0700 Message-ID: <23081249-229b-b745-50f5-53e394b623c9@quicinc.com> Date: Fri, 21 Oct 2022 11:26:22 +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] mm/page_isolation: fix clang deadcode warning To: Matthew Wilcox CC: , , , , , , References: <20221021030953.34925-1-quic_aiquny@quicinc.com> From: "Aiqun(Maria) Yu" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: y-L6IDjjMTL25isIJZjQS4pvsxeUkVZ3 X-Proofpoint-ORIG-GUID: y-L6IDjjMTL25isIJZjQS4pvsxeUkVZ3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-20_13,2022-10-20_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 clxscore=1011 mlxscore=0 mlxlogscore=776 priorityscore=1501 phishscore=0 adultscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210210018 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666322798; a=rsa-sha256; cv=none; b=5BSIOnmCzhb92uvfCV+UVelUnRez1XLCESDg4t8v+wDM0y/xycNaPmzsoQOH66FWZzVKcW t+WIrtaGb2lO1pHTPRY+sg2VAiX7HJOgUhdCkk1F/+be+fMiSzb/Bkdqpr+BZXz7FeMhOF UANCVbu0HmycuyQhL+3s/WEcCkICs58= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=H5JjmPTH; spf=pass (imf18.hostedemail.com: domain of quic_aiquny@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_aiquny@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666322798; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=f3AP5kqyIwg0Bv2zrCocVKvk3NIrgaKA+HTSGhNavN0=; b=7AjTHqJaIXJjYTxAqB5Vk599T/dxVu2HhZhZrDxnVgwzjrjoeBgsfP6kLNtRzx39ws0YOI d7suN+J9AKmpbw7UYOh/ZDmgSB3cQ9AvqGJF8RSQGLAT23ZhAZSj4SK6U/kr7nJqZ67e6o ladRbse3u+nmVLYXP8g1e4WH6EsUW+k= X-Stat-Signature: pq3gifcwssqc39scnczhrbwz75p3qt65 X-Rspamd-Queue-Id: 0FFA71C0006 X-Rspam-User: X-Rspamd-Server: rspam03 Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=H5JjmPTH; spf=pass (imf18.hostedemail.com: domain of quic_aiquny@quicinc.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=quic_aiquny@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com X-HE-Tag: 1666322797-152758 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 10/21/2022 11:19 AM, Matthew Wilcox wrote: > 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. I don't like this long either. While the current Deadcode warning is also annoying for our clang tidy check. will the CONFIG check can be acceptable? like: #ifdef CONFIG_DEBUG_VM or if (IS_ENABLED(CONFIG_DEBUG_VM)) Any good ideas? > >> - 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)))); -- Thx and BRs, Aiqun(Maria) Yu