From patchwork Thu May 18 14:55:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13246935 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 11CC0C7EE25 for ; Thu, 18 May 2023 14:56:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C885C90000B; Thu, 18 May 2023 10:56:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C603F900003; Thu, 18 May 2023 10:56:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A8A8D90000B; Thu, 18 May 2023 10:56:15 -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 9AAA2900003 for ; Thu, 18 May 2023 10:56:15 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 7A15E16084F for ; Thu, 18 May 2023 14:56:15 +0000 (UTC) X-FDA: 80803676310.27.A06BC04 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf15.hostedemail.com (Postfix) with ESMTP id DC0D6A000F for ; Thu, 18 May 2023 14:56:11 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=tUSgWHxp; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=K1BWzRg7; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1684421772; a=rsa-sha256; cv=pass; b=6hXn06uvlPuqvnS2GfvyL2IPI6wclOOAp3vWrSKTPOClCxlN93qXqkzuQ44PuJV05doIsu HyTRLSPKl/5SzFFUikn3fXkNkoDw8inOYAvSjF0b5joMm8kpw1Quif2LEuN2EuvgnQeY1n 0StQi9DCPHTV9iAp1YL6y3eFuMu0zlI= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=tUSgWHxp; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=K1BWzRg7; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf15.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684421772; 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=FZc89H8cc3jCASthTOjGzkEfMxavJWu8DLVc2e6ZxQ0=; b=rdkU0ysrSSW4GM15qCHBiJcPw9GrP4SkQ2i15QzsgytH7z69E8v/dSmK89NGcq1cXpvRPq FyM+xhyrlN/Sp5HLGEzeZvNNKa3KbZO8ckKoCVngZEndl+AdjODYdVzxbwdOAwcSPSvv8G t1XWdvfqYmn6I5TrxUuLy+pFtHH8uIE= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34I6Ir7f012413; Thu, 18 May 2023 14:55:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=FZc89H8cc3jCASthTOjGzkEfMxavJWu8DLVc2e6ZxQ0=; b=tUSgWHxp5dOcpVKMLY+NBufRXIHQulwLgrXU5O9hIUIJSDUIOakObWh5+NoQNYyupPml 8cUtspTFSMTulBIjk6jFoMXL1MSLUat6r/8EFqpmOlOQUHsPF24gngKlL8Z46HPDKfRf eKONDH2RFKx5oNQRUrEwW1v3S2dHRXqlBmc7FJ0Ozh1Ko1NRAd3e//rL5Rrk5f/7WkH8 4wQpgC1S8QGiOeJLuUufBrNkrRjfzTIArN3VmktGK2t1O0Wtoz09V97bAOccKGuc3zqd 0NMpkZJZO7Dbe06NYXw/ja6ehQ1uEFVOziUWJLK/7TNuhYd0mKeQDdUoHSJLf48114Tj Xw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qmxwpjr85-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 May 2023 14:55:53 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34IE8DIw004253; Thu, 18 May 2023 14:55:53 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2105.outbound.protection.outlook.com [104.47.70.105]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qj10d66jp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 May 2023 14:55:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L26YVZQfOFQcycfoS1mdW5ipR7KMXwFssJKTxaa8DmDwuK/MRVmsd4i7GR/yfWjx/+VkSxGu4WGrNbxBYlnGSDu7OTyXxbzDlWNxHRGPgeTWFZr/whQrPATuKHj0+Fe2fWVA45ZLFO46dY83UOhYYftpLETjByVF9Zhzo/W5PA7X+yh+i3Qu6wP0TaWYTUDbUpKAmZhqIRdI36Qw43DO/c3zlGQXtAVJWyElhysXFTL7PFquVOTJEPwppbGNP2XDrgcfAUNb590bVSXsRlqVSAopKJKXsJIMveyA0tLVkmXceVdZhihHGBeKXnlaDWAgYf6fx9UEpykNhoeS3GX+7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FZc89H8cc3jCASthTOjGzkEfMxavJWu8DLVc2e6ZxQ0=; b=S/MSgTUHt/GaLWNhGeNxPEQFGZXuX6aE337L36wsqAh4jXbQcs22kaPTsM2RWmr4NtQlDXRxHzYoZVG6lafdnML2zX38cT59K1t9kAIpsXC5YTxg8/XUfW8HS+h0I1VHl+/bWELKSGhvvrYYuhSSBrxuKNDhOHhoYKo1l7m5c41QgPLXYh2OlITWMzW+f3AJGaL9BgLXmOtrnLPFrZ5DNxucNhIfio12AOcU5J9Jq1qAjbfE9bCyrHx+UJElpXLq/2ateyFjMWka3yvdZmcG+UiHT0p30tZVs1bH64sbj6BGcHqwY9Oarbcqtu/D+8BPohLVSJKxFp9UQoKiZpW72g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FZc89H8cc3jCASthTOjGzkEfMxavJWu8DLVc2e6ZxQ0=; b=K1BWzRg7EiO1+SY+Iiba4AoIDvqn2XjLz/BLklGmmL6yt3psOdGuTcN5jBtyuaJPsXlHnwYtyYZ0irSCsIoOYYcg3r3hy1OYwE5WwRG7Yy2efNdlT8BfurFK54h+O+rEJtV6K5hoigsYfFGMCOXdvNC5xbRnJFklIweOV9zewG4= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by DM6PR10MB4347.namprd10.prod.outlook.com (2603:10b6:5:211::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19; Thu, 18 May 2023 14:55:51 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::998f:d221:5fb6:c67d%7]) with mapi id 15.20.6411.017; Thu, 18 May 2023 14:55:51 +0000 From: "Liam R. Howlett" To: Andrew Morton Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" , David Binderman , Peng Zhang Subject: [PATCH v4 01/35] maple_tree: Fix static analyser cppcheck issue Date: Thu, 18 May 2023 10:55:10 -0400 Message-Id: <20230518145544.1722059-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230518145544.1722059-1-Liam.Howlett@oracle.com> References: <20230518145544.1722059-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0141.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d5::12) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|DM6PR10MB4347:EE_ X-MS-Office365-Filtering-Correlation-Id: 44f98ea4-4e4c-4aab-84c8-08db57aff91a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LbT0IxPcBLkgNgRxryjbeGWpH3mqD31jIswB9OR0u2fPOXRSobFYl/yOlKm4DD7pquc4MXQsomyfgJqEDSnX6+TM/F5S6BdN2RLBjoao2YT1gf9VteAjuD8iKMxHNCNvjAwGSIP27bqREIYYuUt6B4KaKHH65ROc3IOhdXFhznuiKUaxe3amcS3L5ZlAJAYX1/992OvY83qY5CXc55zwbYCmqBz9QfcNFxHKtr9+s0kyfmExsR4huaVFXKGZ8hD3HvjO8HjGV25slhhjwoKevDpexOKz82QmNB7iyeMaSZAuZStOp2mvo0Pi4+Z6aheIzFSr1oAI1wIIfXZY/xa+NPvHbS50NZ55ch8iBpd9V2itZkrni8RkkO7kgBl68U8SQK4VO2utWpird52sSd7Yno64CTCutibbikeJqzb2bSlND3R9fDNlszC0Kh4rDyEt6AXBFDg0d6I7NKLXXq5EP99poHMxME4wjwZEKfJcxkJl2zB7LHiRIAK7/oFkwRRqEIVLMuEoIw685HpdmWT/IqVfc/4l/1NcDqYDpkLJIwGhBwJ6QlFS2lr5f+cgvLHH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(376002)(366004)(136003)(346002)(396003)(451199021)(86362001)(2616005)(4326008)(6666004)(26005)(6506007)(6512007)(1076003)(6486002)(6916009)(66556008)(66476007)(66946007)(316002)(38100700002)(36756003)(186003)(478600001)(8936002)(8676002)(54906003)(2906002)(41300700001)(45080400002)(83380400001)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hhuvzDaaEs3k87y9ZPdJH2veIHXWfdyUDsYUWIuldnwu0jN1DsXyX/EgKr096qnIZ/6YjlM0UGpqCxH8tK5TpsQFPb/ZCrOt9zKXWz9MeR9Ym9qZ0kFmhEKCtvcr+R2dV69ZuD17JxUULbaeDItrFVj+vTaVUHZ8Cg6OBUKy9mJtIvOg2APTMU0aqpC2cdbPgK5TYFgjMDyWaxJVa0Qq6en4sylXqQWCt/NTZscOaw5/Gm/mK9RRtlm9xUxLE2Mf1/jaP+PKiHRlJvmMUmjXIXZlohOScF3dinJHJZjME2y6vCMJOxhgcVzA+HLNv3yjyx4MmHUdgSbI96kVIbt/jJtfDIIv9irLJdS7upM/vz9bNtSD36qAkKud4MweJx/4n/1TvAA3bLjGiedWGcImPjICCvWEqzcQwigSQkeqUCkrrBonL325bRdrUEJhjNry92BXQLPubh7gFQlbE79eOTzo3LNvqj1nXF7wSLinZOAqlYQxOk/QLo39GPjsY4XN5fL/FwvhQQb4F+w1dGcsRYNkAsK5e4ScS3I6S0EML4PVJro0YQO60E3Ce7Jihg7sH0XeEpB/XYsZZGML9OvFVVC6C/s2Q9HazatZWrr8iQKrSSODF33G6NCjwgAXwE0VGZdWCNb0Gf1dn0a7tgLyNZr9KXVrh4NWJxA5hxck3GhKWvjIQmteie2xrSVXzb/w/6xYMIG5cUenmzu+LrtNhX/cu0dBwuFuxpjgXyHkp6QsibX7uBc2GoSEQPTDFUwGjgkyFPrSrHctwxZYZ2TTVb3gvV240JwRLHt5vac7mr4FKIBpHiJAMsV48SSi3uplTHESqNgFmaEyBchrUOA6TcX9wrEHP/gTxgdBBLzEyjE5JBIUFILLWut0AW8t+dey1J0P0v3RiLyKHrUtMJlmL17B+RLRw30c6CsqROP0tu5ZqXS2LgKYCGPtLY1xb2J0lsW2hUR/eqhrNdDIfzNdvhoOTnwlQjOW6XFwX2ZwcK4vRcl1hxEDsNLocxNEW+EBKVnxwSFvRszbuwhjd7ksIwlwsu3ADV3bur9KMcvkkoQ8e+ZDVN7WjuttDzOJik4VKCyuGiHYAlOod15OILyQtgkLsd43XKj67x/J2enQ0cW/GpjDm9VcVACJWDonCS6X/McELo0o1sNtGHbeLwwTnYThJJeFeJzo82iHffvSYXOrRCHSIjEj99F4rs7uN5I5CffLShtQEiZtsuq2zncV+LBWGHows0p6Oqp+oGDnpkjg9pqYWoOpGdYM4FIeX4whL8zsnMND0nd7RZJJz60wEw7qVuXbb/+QAQpyKGH75/YDSWBK8ernlqNiVUL9r4h3LUr0BgLBodFUGmShjEaHRJOOZXRi5um5buogbiBMSygR2yPUVUQR4qwPWzi7iEkbTMtavemHxnUf34Bj6jC121iKcb8RkMUZ/ELma/S1T67PcBnLCEA1cuj1VevQ7lwTLoZ3TKsXX4/1i8UciIc7aLDhljjnqIyGmy4ouVxyK4sV58ASkvdYkJYj3YNq5pwcWn3OCYvo7xHLo1kUrWpWYnbGIKiWEgdmQN6cJKsZjoocMbSWuBWsfHJUwrSIedKKi+Uz0hzwt+yuZe8csl/iHA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Nmr/qphyWK/o8lLzB44F/ookJYYjDkQtxM0EQtsf9KzHsd1YQucKNTlVDByol2JgGNsNR0NRo9hL37XeBbWLS/EIpGDIisrYkK4v8i5hMc9Lzh4z6nf8TuaX2/+0j9ghxS0e2utoDdSAEqKz1gwOuLzVZQToA+JHUFopXUPlMSV72Mw9J5Iuy/npuameCS3Xoj/KMKxDX6SkyTAwVfraNE02EoYkBysdFOUDyRnRSeBd5Eunf+fmZWb403Ak+ZImGpxaar416yjM1Z89F1Tm38PbkGIuNJ3I//7SzW2cWkTvQqkl6xuSbqH3z/LfZdIWaUn45ilAFnHNmWUnpzvaVQZFxB+2yzsUMuY6T83iVaUDubvhvTQ8bsLAhiSGqa+uRr7cGWzzym4CPtihXpIfrJdlEYpxP9i4SHk9M6pR6RPo4LvH17wJlRB5e8Fmaf5bQfUnhIWha0TJee66JRjHgSSB2vMYDms1WOoo1bY45I4Lk5EbXGoUUKr7lkZfIUmoaB1Ri2kD0KWw1XtQMKykRe5y9EXyDA5GKfNF+qR5UojcrQ56g6zPzaYfUuFa6nxqRdU53W6gb8b6E3/pOSSHBdFNq27pNLDuMwZBldBu2QZEhM0bYgda4q+c/MQMAeq1wAXOb24Z/0byNxMSTryeMc3JMmW6gVHMyHqfbwf8bP5UZLZ+phbJm2Vx/eYNs+gWxgoHYLFlc9bnJG0IakdLjelKuSIajp67d7yDs2tpZb3Xp33/nad09TytRmmeqeHOFuCBCcmBvBcYcZC8ibyKMA2hi59EfPJLYyh4ETZVilayYh2EGrUjDDHnR7hOUIVExzZXJjjwcA6uWct8tpUrVl7C1YriKJyUTlPZvl9lBzfESnkXnZB3D0AJSi2fhzrcpLovSOdoYx1R1uPeRcPczWvxuyURvN8CmNALu0mdIjlQ0FOmZFLxh8l/mPa9Oj0qlYPx//+gA4Hf7WAhpsy46A== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44f98ea4-4e4c-4aab-84c8-08db57aff91a X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 14:55:51.4470 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RgCKL9i+gPwGIPHirTd5MqkvPVXSwAwpanWI+eOjKOuPREdgLE3NUEto88EnnrP7H340BDv5/6TJ2AuDl3ebnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4347 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-18_11,2023-05-17_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 adultscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305180120 X-Proofpoint-GUID: NMKOVRtQiQ2mXTf_azDIsyeWanyjEtnL X-Proofpoint-ORIG-GUID: NMKOVRtQiQ2mXTf_azDIsyeWanyjEtnL X-Rspam-User: X-Stat-Signature: 85iiy5otdpdaqd3emr6bmnok5x16g4ay X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: DC0D6A000F X-HE-Tag: 1684421771-630412 X-HE-Meta: U2FsdGVkX1+bPU2wU29aTAeL/6aVhdXft1yB3XBuYBaL/dCTuB7AjfBNvA8PQwX1cS/z0+5e2fgBEQc677q0VTEyyV/3x62/wRMJQ/cPwNf0fvKUSUnyTzCCfga6x5/ysy54AmJiSfe68b3nTfEgxP0254L7fGNqidQIDBbCPqJKQKoiXEj0DagyVwT8WybqLSQCBF/27CMVM1VDawmV/L5bh2xK4mdCQ13VFY3BOxl6Eva6Dwk6Rm0Sub40eg+QhtXvDG1KYIMK/MMuAY/N1Uo6NRAxYIKBNQDG8IEARhD1p/auSQ1zSdB0eRb83ju/dFQgFlcu0rJXlcaZV8aY2vCNhylss+HzgVDHd7H/e4Ir+BwnHwTOIzL7Gp6aGugHqT5JIoM6z3E1RAm8I1Ij9ThrPV3QX53UxlFQrvFdeNFHsNNXJoI1Vx5LbXZrHBA/A4Z4XybLE7xjGgIPRIzPJy7EHRegwfAGZyofY30VyxKYGjrXEVzTGtuv24i+fvpy5cn8SQrTD4wM26aJLNyna40KTEMZyfrfJ5uqF3mrVmWpTXDmBwzMzQ9/kQXjRX5C0GNOC2yqYx/3kyRVmctCLaavYDNNEArHfAwD3cZ2svljFER8/mzgZBlnwb6HIRUWBf8+NVCQz4TQ5Wu359wORa6t6l3Ut+us5TJ+XhGadgKYCliOlow/z5XsWxgC0ZfziYXQn2eWIMYCi0djO3vfm0VsHHPMHC2/Mp58iGAK+jYYIl+9PQn1rNO2sMIsmMV1rhzYnQoZak9JZib87PHoUzn8S+AxB8sGY5i2R9ZsixHvmMKj2hVQCQhnXZjlhK8FwFSugqCQ5zI/ceA6aLRztalSlppb6uYQfAHIeJ1WvYnq3XLZsNZdSm57iMrITb3EcI9EK7qzuy9JjbUJffQbO0806IouP3GlPqoKaJQA4yNUZHICwPdEbP+v357oEetR0cWLMcHuXIVWEBDSml8 wuD/icTx M5gEqDwMo2omysyoGd07utGshjvRxGoJaqjy4BCpVHRk89yd086simp7LgaHr/cK11VdadnhEERR7ror0jR/uL6M5cyrnHEHIBlFWQY0kiXdDvnugekQni+G3vMsme7XSzyPXEEN2ssjrvyV+Hh2VmyvyBuDZBHYWdfoEiCX3MATanTkHl6ElkRSpbnvwnMmqEra29fJ84wOG6+xR6EhjNwo2yN67UgmBVFBvtKUJTAhHGRMbqfRAOqCCecmLwfecbh3XEJ2MwgmSiGLX7hTecTGgU1dZG/4RbBEve5Yg0STpSOc+rbyfmfwtL6gVyU9roz0BVUUg8U039svbSRMX14Qvvr8QIQqhSuySrN9la+ppSN9GsbQG3a7BLE0g+Y79K58zdtGCjMxjjMXlHLe+nIksPbDkH6BVQfb6jXKW1B0JDD28VJOu79OZgHIBvsLtZnikbsyCOkRJhznBgUNP7/ehak6G8nhmc61AhYLDDprNOhVAZrTHIv7ZIpKhpAO2Duf5 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: Static analyser of the maple tree code noticed that the split variable is being used to dereference into an array prior to checking the variable itself. Fix this issue by changing the order of the statement to check the variable first. Reported-by: David Binderman Signed-off-by: Liam R. Howlett Reviewed-by: Peng Zhang --- lib/maple_tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 110a36479dce..9cf4fca42310 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1943,8 +1943,9 @@ static inline int mab_calc_split(struct ma_state *mas, * causes one node to be deficient. * NOTE: mt_min_slots is 1 based, b_end and split are zero. */ - while (((bn->pivot[split] - min) < slot_count - 1) && - (split < slot_count - 1) && (b_end - split > slot_min)) + while ((split < slot_count - 1) && + ((bn->pivot[split] - min) < slot_count - 1) && + (b_end - split > slot_min)) split++; }