Message ID | 20230505174204.2665599-2-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 AD656C77B7C for <linux-mm@archiver.kernel.org>; Fri, 5 May 2023 17:44:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D7D16B0083; Fri, 5 May 2023 13:44:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2C1456B0085; Fri, 5 May 2023 13:44:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0C4546B0087; Fri, 5 May 2023 13:44:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by kanga.kvack.org (Postfix) with ESMTP id E0FC26B0083 for <linux-mm@kvack.org>; Fri, 5 May 2023 13:44:07 -0400 (EDT) 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 345HhMIR003021; Fri, 5 May 2023 17:43:47 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=PO0W61VFFcUaz53IVxUaRxBQyFx/sbKsCEqLpzGF0n4=; b=LqEgasWrIA95Hxyv76IReGM536nr5WfgCJM6tUZkmg9tXemBCINBeh+EidHQPwyMpi8I jTkUywFWQfUhXWgWGl/Hdysr0Y8Xt4HVQGnbW7A+ZhH2xEDPCujPYQYc6KBD24vVxQVq y9Ub9N7I/ifI794KlHHeiA4wkHLsUJytZdms5fsIQ+5u8OKFCf7FDBPcoey53Qotmull J7q29TZ6du3h/u08h4aTTaTciuplRa9go2Ah68WTUkR9yJrCNOV7bVB5p2Y2WeLaekZN l8BKV/447qw1ScsXVal7mLNzFtH8K+SXFu4QHca7PSJ9FO8/UGdUuzWW7F+xK9RBGkju fQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qburgdkc3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 May 2023 17:43:46 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 345GctAA020798; Fri, 5 May 2023 17:43:46 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3q8spa5ev6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 05 May 2023 17:43:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=huoa2cqSggt1G2osgKmHveOHAQNKB935oGkMhOs1onULOZzhAaQ3sEOmuqSlUJRVJtrJCX30IEKv+31F9spN+9RtGsIUBGfzV0YdN2zdT4oK9JEx2enqqrxU7FTGndjU5na/LACbXn6vV+8jFWYTASQhubGyYjL4WyWUA0lfFCWz92fic8ilWUQVPCV5eaAN/u3Yj665cf2EDM7NA9g3mtSOfK+pGkQWgaoARJ5pklb3VDfIo76yVofXxwjHZAsL1g0n8UmTVs/zvLLG7izEcvQKvtm7/fPq49tVC/GJ641E5B6AsbsDY0kGbhbxhTmvy7zA3gR2/W1vtyHP+rX7hw== 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=PO0W61VFFcUaz53IVxUaRxBQyFx/sbKsCEqLpzGF0n4=; b=CcAmIajLUezrQOWQ0AaGpOw24wYz7CouU+LYZhQru7fTLHOFqyflullcYQIDyw9XsStSiCA3BPaGxU+ndfoAdLZX9mOuRR02Ur6TfH9+DEgrJAuvYldtYvi9M0d9MaX5RPSljEHdqApGvX40FZA9N/evQGSs8AUd5RcJeY0tUa1/Ulf9FX5dWcvX6V3JWL7xl2i/IQOEv8uGoE+tjdCXl4wG+LfMaaNsCWOml9PDBkJe84H+xSQKhigQukXenIeVKzsvDz/y9EnC4o2DSP2ljPDRSYYRkeB7uKyWhWlN8EPSJZtQ/lvWt50NfEbTDnyCaYMrplc6Pg8yub3pmCrwfA== 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=PO0W61VFFcUaz53IVxUaRxBQyFx/sbKsCEqLpzGF0n4=; b=uxKBO8wSHAr/Nhd1NX9uljPc/YqnMMHwnWUVdSXr02t9adO/mdiKHP47gTeoOue31s9slXroXh3ggoWwuaMRl5WAqFwrxMSiN8WmcFWy16VxSJ4+cnYkNKtI6hLg/dSKwwzf4AOB5NWnS+0o8b2N2C54BFUvhq1OjvOiAJjBW3k= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by BL3PR10MB6089.namprd10.prod.outlook.com (2603:10b6:208:3b5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.27; Fri, 5 May 2023 17:43:43 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8bb9:2bb7:3930:b5da]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8bb9:2bb7:3930:b5da%7]) with mapi id 15.20.6363.022; Fri, 5 May 2023 17:43:43 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" <Liam.Howlett@oracle.com>, David Binderman <dcb314@hotmail.com>, Peng Zhang <zhangpeng.00@bytedance.com> Subject: [PATCH v2 01/36] maple_tree: Fix static analyser cppcheck issue Date: Fri, 5 May 2023 13:41:29 -0400 Message-Id: <20230505174204.2665599-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230505174204.2665599-1-Liam.Howlett@oracle.com> References: <20230505174204.2665599-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT2PR01CA0026.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:38::31) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|BL3PR10MB6089:EE_ X-MS-Office365-Filtering-Correlation-Id: 25fdad31-8e33-428c-e0e4-08db4d9044ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QQZijbijfWTGdAINkQODhrZZnAbATtGmdSvOto+x2uZSdEIdwzy6O7Tjb1TT/El2dFvxveXWbwLnSJXP5azk28Q0miPca/1FU+1rQT8iR1hDbnVk10iY/AbKdpv6WEqoAkHSBLpqZWZEX41VFASG7ZoFGiUaUhAvI3sLOi9kH9DwC6+k1PS3FQEc23IdTXzKd30u9oIedsJ3CEEai4nyb89T8Hh8lkrFWJTI+0LcJFOaBzwxDLpGqwcxKeVjgsnD3OEvh5nGDV/P7viLUX5LSyai5Q1Yg791fNbLgwmz7D9soObvZuV9GUOi8pN9rdAd2ZQSD3gMUKS2jsdty3XhKXfJjVOHwhMoEK2TFhSBCZPIilUyiur/s9OOB+qRet+i+u81OmbsxYnlpbZ1M0lC+kXLDhXSq0t7o/sNrWic9AS38g1uKv4AubRxkS2vhDjFksYdzbJ5r2t5y5L953WrA9RhqVQrdYF8PN4y+o8y5I+oPg+AALwfn07NIGMu7qru/d4VpKXSNP+YqK5tyExlUWfURDF4IHhn9bqVBFXmADESmRs8h9fLg3N2EfwHjqcf 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)(396003)(346002)(366004)(39860400002)(376002)(136003)(451199021)(66476007)(6916009)(4326008)(66946007)(66556008)(45080400002)(6666004)(478600001)(6486002)(316002)(54906003)(36756003)(86362001)(83380400001)(2616005)(6506007)(1076003)(26005)(6512007)(8936002)(5660300002)(8676002)(2906002)(41300700001)(186003)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: M5wW2raEKgyPH9xhWQAyAjzLQL+fHOwRerCaROBtB1GCcj/A/KeVQQ67yf20eKein7DxP1d3ZVFDTqKFt/MhCsYnad5pLYPh1WkwlhnlpzJEHJoormswvGsVJsYuJa47IZkjukg9JwRT9V5kaa/cq/RXjWfGacQ6MBDr5/IquSawhSmdvBb6EwVYXNZY7bRWuAqZFaQ0rECkF62L+SksKJqeIti91EuM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x9VLaVuMXNQufpGdlO7/vM7MBpUbS6bW733EDGQBAV0Ayr8tBUDm8+e6VtWEwFNqZm+LSwSGGtIAutfbETIJVopCXPmRTQeFEkE1Qj9WWrjdosUDl8aKdA/tlZiPUza/laPs1Eh++FRuyJbmU7Bgr5JePYxO6s5znQFgzJ93AVhBPyJD+q8rgh67mfUKHeSO17rnHGrS9m365tQbaztqeOGupfSLsKcyMSwTzm7Rk/SKWgqQ3g3OHCVC2cdA7boWnYccSD9+szK9yAFg7hodka9BeJoVU+4Z/+O0a7g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25fdad31-8e33-428c-e0e4-08db4d9044ec X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2023 17:43:43.1435 (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: 9kmt97bm4KhIoXfaX+3gDkh0irWBzApfw1CJfP4gLkCMxoBMw2CCz0jQOyoci9cJmCzIT4CoEB4Yw6IOqXxf5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR10MB6089 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-05_24,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305050146 X-Proofpoint-GUID: pMvzGaO3rIQXOkPOgtlMkyif9g1N5z3f X-Proofpoint-ORIG-GUID: pMvzGaO3rIQXOkPOgtlMkyif9g1N5z3f 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: <linux-mm.kvack.org> |
Series |
Maple tree mas_{next,prev}_range() and cleanup
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 110a36479dced..9cf4fca42310c 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++; }