From patchwork Fri Oct 21 10:15:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aiqun Yu (Maria)" X-Patchwork-Id: 13014559 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 33169C433FE for ; Fri, 21 Oct 2022 10:16:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CAB9E8E0003; Fri, 21 Oct 2022 06:16:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C5BB38E0001; Fri, 21 Oct 2022 06:16:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B247D8E0003; Fri, 21 Oct 2022 06:16:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9B1A18E0001 for ; Fri, 21 Oct 2022 06:16:25 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7623BA1297 for ; Fri, 21 Oct 2022 10:16:25 +0000 (UTC) X-FDA: 80044551930.06.7406A9B Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by imf12.hostedemail.com (Postfix) with ESMTP id 00FF24001A for ; Fri, 21 Oct 2022 10:16:24 +0000 (UTC) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29L5vLe6017387; Fri, 21 Oct 2022 10:16:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=YBTN4+Jta8X8dJonAY3dttbWKhQZ92ZH82Q1zjZEpks=; b=G427AN2XjxnD7O5FHHKozQjhGI/bi9JNncwwLB8dkCAyxoUpx9apqa8uLb4dWBoyagDU OLM06w/gtdJmMZe7qRLAScsgFh1mwYIDaYusTZmIx/krgiHgrbFVHQzuc0qTDQqpY3pH ZQOVslE6BEZ9Ej12KU8H+wRBmmvXAd/KOZxzCxONs0VR0eTBWVgS7n8vyw486Cr8iBtZ c5R6ch7SrfOdeCAsEOjp7B8/vaZiachwPVyOh15bJOannWpQej2HwL2h76nWTZTBHKmN HiwLP5k5x/kfnbWHMuwav6F9BGEofb/sFQdxZF5bPIs3nhV46gHuv3faPlCVDuhuyQf/ kw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3kbnqt0va3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 10:16:22 +0000 Received: from pps.filterd (NASANPPMTA05.qualcomm.com [127.0.0.1]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 29LAERA6029357; Fri, 21 Oct 2022 10:16:22 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NASANPPMTA05.qualcomm.com (PPS) with ESMTPS id 3kb7446tg2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 10:16:22 +0000 Received: from NASANPPMTA05.qualcomm.com (NASANPPMTA05.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29LADbAv026999; Fri, 21 Oct 2022 10:16:21 GMT Received: from nasanex01a.na.qualcomm.com ([10.52.223.231]) by NASANPPMTA05.qualcomm.com (PPS) with ESMTPS id 29LAGL2b032647 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 10:16:21 +0000 Received: from aiquny2-gv.qualcomm.com (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 03:16:19 -0700 From: Maria Yu To: , , , , CC: Maria Yu , , Subject: [PATCH v3 1/1] mm/page_isolation: fix clang deadcode warning Date: Fri, 21 Oct 2022 18:15:55 +0800 Message-ID: <20221021101555.7992-2-quic_aiquny@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221021101555.7992-1-quic_aiquny@quicinc.com> References: <20221021101555.7992-1-quic_aiquny@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: RpJbLxNcBUeI17IOzer-Zz_yzKCC9XSe X-Proofpoint-ORIG-GUID: RpJbLxNcBUeI17IOzer-Zz_yzKCC9XSe 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-21_04,2022-10-21_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 mlxlogscore=701 phishscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210210059 ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=G427AN2X; spf=pass (imf12.hostedemail.com: domain of quic_aiquny@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_aiquny@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666347385; a=rsa-sha256; cv=none; b=CK2S4dQkkshR/Y6XEUMc9skfMRKsx1nXFcQCN0jsQlb6rvbwRf31+rCwNC81nMA7pn2Wz4 xdinDWxdXLcjFVHdSvhEQz6gGr/LNzl77Zmn77eRsLJEy8KthClWP7DJg3hhTdBqarrZzc w7cOcgr7Xgyt5cEA2ylSFv+WSrBVfi4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666347385; 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=YBTN4+Jta8X8dJonAY3dttbWKhQZ92ZH82Q1zjZEpks=; b=Of1cpDdJAjs01glOTFyp1t3yXdcQ8mVOqTI+JY1pidVO7I2uw/SF8SqbcwFEomFGGIzgYf JyCR2uAMZ/IuwakVP7Obc1Q41wMgrVwrUt69N5IxWu2DrSPgucRjrGmrjBYtsst1M7SSJZ pJ22XCLWo+iMSvqf5dj2WAoeirUU9rM= Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b=G427AN2X; spf=pass (imf12.hostedemail.com: domain of quic_aiquny@quicinc.com designates 205.220.168.131 as permitted sender) smtp.mailfrom=quic_aiquny@quicinc.com; dmarc=pass (policy=none) header.from=quicinc.com X-Stat-Signature: nb3ochri7km83ydq9rfh5bm1yp6t8e3i X-Rspamd-Queue-Id: 00FF24001A X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1666347384-584555 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: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 04141a9bea70..47fbc1696466 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -330,7 +330,7 @@ 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)); + int mt __maybe_unused = get_pageblock_migratetype(pfn_to_page(isolate_pageblock)); VM_BUG_ON(!is_migrate_isolate(mt)); } else {