From patchwork Wed Sep 27 14:01:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13400898 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 E5B8EE80AAF for ; Wed, 27 Sep 2023 14:04:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 802A88D008F; Wed, 27 Sep 2023 10:04:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B2F78D0082; Wed, 27 Sep 2023 10:04:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 604CF8D008F; Wed, 27 Sep 2023 10:04:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 4C3198D0082 for ; Wed, 27 Sep 2023 10:04:49 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 1E56EA0A0B for ; Wed, 27 Sep 2023 14:04:49 +0000 (UTC) X-FDA: 81282548298.22.1A63F12 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2055.outbound.protection.outlook.com [40.107.241.55]) by imf27.hostedemail.com (Postfix) with ESMTP id BB0C740021 for ; Wed, 27 Sep 2023 14:04:37 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YBszuH0c; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YBszuH0c; dmarc=pass (policy=none) header.from=arm.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.241.55 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695823477; 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=kFEjo2t9rOVduPNAJeqfskeri2ER5SQruQHq8BWJZ6w=; b=Ly8G41gNRsuD8x2TbAxnCAHttV6eFyLwf7PNq6a6jHlAxgOq5HkTsl5BcezPn0uyuH4d2q oqaM5DhORAd4G6QNDhXt/AIAFwslCfUrEv1k5vXwq6LMVPKVrTS/vECB1qXlWmMEfkvhwd yocbBCe6uH1mBHpxiUYkvkViqtygz50= ARC-Authentication-Results: i=2; imf27.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YBszuH0c; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YBszuH0c; dmarc=pass (policy=none) header.from=arm.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf27.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.241.55 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1695823477; a=rsa-sha256; cv=pass; b=UjhmfkdGFqBtptbSCB3gDI7T6plZlA1WEtqoiVZ51/23sJo9ZKIUYhJWxsNPGEHNnoRKEy kJgRoytbZCgjlTt8QSCTM+ZsMoXRCCbvAYHSot0CVUSW4r2x8c0Vn/UJDKe/xIAY1nX4IJ NEgqLQgN+VE+8QReU40cZfe4/rqDkVI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kFEjo2t9rOVduPNAJeqfskeri2ER5SQruQHq8BWJZ6w=; b=YBszuH0cAsq/i9GkKK54G7LGt1+ciPk18NcE440w5s1rYJpuFMbQQ2Dhx0rHR2HPilO8YaNatJjQBFtbOdIYDd0IKzASdGHZc/DoZ4Xz/9GGL/f61kvGNgShP81TOB1b6baAjiFB9eJhAxl++moX4LeaT7tIJUcNeTAB9mRkBr8= Received: from AS9PR06CA0464.eurprd06.prod.outlook.com (2603:10a6:20b:49a::22) by AS8PR08MB6549.eurprd08.prod.outlook.com (2603:10a6:20b:33d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 14:04:33 +0000 Received: from AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49a:cafe::7f) by AS9PR06CA0464.outlook.office365.com (2603:10a6:20b:49a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:04:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT017.mail.protection.outlook.com (100.127.140.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:04:33 +0000 Received: ("Tessian outbound d219f9a4f5c9:v211"); Wed, 27 Sep 2023 14:04:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 115ef5d33959daa6 X-CR-MTA-TID: 64aa7808 Received: from b618c45c74c0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E6CA58FB-CBCF-4860-9E12-600891D4B576.1; Wed, 27 Sep 2023 14:01:59 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b618c45c74c0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Sep 2023 14:01:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JlJSBRrQd9zuF0qGFRfJXE4x5iSynws/+DTgoCGPghUf8zA7MlKixoJEJ07jGEREcJkbJSE7RHmk5SX7Jps8YWbsTMPGZY1mwmRcqkwUIWChzuKxeT1bBrC9VK68F4XxJkHaFaW7w/U38FpFLneLB4W0slmFLWP8JrV/LjumirReC4nXs8SgwH7nSvqEhtzKCtIT3elIwtJtpA8W3+EYznoWElI4axybEC88eQuaOMlkpDAyODdW7/7Q0YMpkg//+3TeWqAYuh6C8Cc59Uk/tzmUPIfwpwo4+Gbl7JJHE1MYHXFA9iPoP28w6C3GE4RXxL8kAgjYJchlbv6p36pXpg== 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=kFEjo2t9rOVduPNAJeqfskeri2ER5SQruQHq8BWJZ6w=; b=HuR9MoBSG4WO5/udbccZNmcDRuRPj1tLaYXCGmHfDzjmH4q7LkUYtJjHXBeYLOb2Bg+z3vb2KtG6Tgftbm7f49e5DIVRNr/UqGf/xAg8nJlraURiOJJAxuc69dDDfdiBkOecKxJi63afVqRRHNJsbrn8qOyZfbDqUwX6y7P5SNUOMcDsdpIMEjFOJzaOlweAC58EQj3q6LAswAzTibdGhTXtxfA96mtC4WfZzqrsWPKYptKNZW/Gm1r5ujwbujs5V0vgPPwPn9pLnTXJyS+uwQHytCb0onWiSePYEbJ4gg4n5Yb+QEsCNRtSYiXN0IEknWcBPbYxBHm+zH2kr4pe7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kFEjo2t9rOVduPNAJeqfskeri2ER5SQruQHq8BWJZ6w=; b=YBszuH0cAsq/i9GkKK54G7LGt1+ciPk18NcE440w5s1rYJpuFMbQQ2Dhx0rHR2HPilO8YaNatJjQBFtbOdIYDd0IKzASdGHZc/DoZ4Xz/9GGL/f61kvGNgShP81TOB1b6baAjiFB9eJhAxl++moX4LeaT7tIJUcNeTAB9mRkBr8= Received: from AS9P194CA0005.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::13) by AS8PR08MB8275.eurprd08.prod.outlook.com (2603:10a6:20b:56f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Wed, 27 Sep 2023 14:01:56 +0000 Received: from AM7EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46d:cafe::7d) by AS9P194CA0005.outlook.office365.com (2603:10a6:20b:46d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:01:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT013.mail.protection.outlook.com (100.127.140.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:01:56 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 27 Sep 2023 14:01:43 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 27 Sep 2023 14:01:42 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Wed, 27 Sep 2023 14:01:42 +0000 From: Joey Gouly To: CC: , , , , , , , , , , , , , Subject: [PATCH v1 18/20] kselftest/arm64: move get_header() Date: Wed, 27 Sep 2023 15:01:21 +0100 Message-ID: <20230927140123.5283-19-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230927140123.5283-1-joey.gouly@arm.com> References: <20230927140123.5283-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT013:EE_|AS8PR08MB8275:EE_|AM7EUR03FT017:EE_|AS8PR08MB6549:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ff15cdb-c7a1-4ecb-f471-08dbbf62ad5c x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: jFDFJ73sw6DGXXsVRdE2jbsvQ66GIiN8BVTv6KPgRx9n5Y4Ecgj9LeeXkb7MeFfka5D6mnTreBUIMhXKa48S2FxVXe5dY0ETh5dAay10vRMCqGVPtN42CBovbNCxOqlGL8rDv9jRPz/TFBMZTShLoxZzq7XZRY2PwztUh7uoIfn7d2hE7wLahlFt2fm3PW30ZDznxAO2+/vXtlHmCT9cpIww9gEBwYJ8uGAN/i9c3TQDjIiN0TPuI2RVLMrpGK8HjacTlNkuJhNdrGyDbLC3f9Vh2nNHYNJs6H5hw5zbC7D0DbEg+isl99hODMo3CgGqKjdi9oRsiR9AfOru9zLKqBHJsrSiGPRYob6iDJUdg2N2NH2+7nVj7Wf6uIapwkQdXxPj7P9Pwrk9qYD6rcOQsTgOSMESi0nVa2PhX4o3E2rSEBLYzPVy5lkT2Cga7nCh+xbbCQ2bOOfT+wsdz/HlsjLdL3mjPPEgv39m/DeVZkepT/JK+FJjwutP61NUOovuZhUBMYtM94sIP6/MiStoVz75RoG9cKDPI5DP6Ct1DmUq0+WpX2QC6KZxRRPlR+MX7n8SlfkWhXg8bI7eQwuHQLuAkZF365ldtJ46sb5Budc7kwxrrEyUBLgeyCHI8H9ct6fMq869vY+gYxtqBwBcKadVES3vm/kC2eHW0msTN8/kvHqeeoqbTaDuEFFtVnJ0fmBS4TCEa1O6dFAFSKjpUtiWBsstWOO4wZoz1e8J8g1sU/hQV7ZVZHYcW7ksHGkBAzNidN4H6OJ/eUYAAtbDZA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(136003)(346002)(396003)(376002)(230922051799003)(82310400011)(451199024)(1800799009)(186009)(40470700004)(46966006)(36840700001)(6666004)(40460700003)(36860700001)(36756003)(7696005)(82740400003)(356005)(83380400001)(86362001)(81166007)(47076005)(2616005)(426003)(6916009)(316002)(26005)(1076003)(54906003)(70206006)(40480700001)(7416002)(41300700001)(2906002)(70586007)(8936002)(5660300002)(44832011)(8676002)(4326008)(336012)(478600001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8275 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e400a40d-5a52-4a00-a7c2-08dbbf624f53 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AKiukEpKtuuV5PlW3fdxLBRrqglIMNtxMiQkh2+pNfm/NAm6ZtBBdQfasEdXMlpnY8jmKBMaq437nmH9BQGvD4so9p4lQcqRhWySS2T+GFVSn3CaKo7FYGc8u58HnamoR6d040DzNbq9So8R8jVgNezsqbf5Q9/BYA90k1vmaTWJTDiDSurXiPXScLiwSjBwwd6csFXczwv6oWTF24qiIICkwKqUaFe+aKXTWtIINAfWV/SYfsrKGNSuJUSAYgDvzXyzf899FZsZmP4JDXcjaOuhRTJw2r7fuZEsmKQcs+uT39KZ5cNI61sh6qFGhf/9lKmgW6GEmwp1b/LKE+dZiXTvxSZKyaE1WQdGYZzfIqUwDzKy0/tznT6ZlScqdjEEwfqIZaT3IT4HgffFk9gXmxi8o5x4bDnrZH9wXIUCcLcWLiM6nzHYOZkdDyLVks6YI1xOSPnRjOwmq5mwjzAAgITIM1cnHCYtwIBe5xtZnqemGE1/Y5hZWFMBDhb9JvIAwv4jKQlJ+ZZ/Xw1BCGBGDpBkLTtd2QMyn08MMwVoz51Gg5qu9bXVx8mtSE4uFNnBi5/KsaJon7fLdDXBNuyxZJ0w5EGjLEjfNKnogEB58zTF2JKqFvAm5/SlY2NyflJ+jTLB8vS0lDKYtNQ0as4bXq5AQCZu2riGcJRGairEE6S0zPRILGjF6qSVpy0kdKhjGYHKYyz5zbc0kgkY4zuYv4K3XMz94Qtku6zncLmhrtLCaUjoHx0kxyWkhY2zBb9Y X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230031)(4636009)(346002)(39860400002)(396003)(376002)(136003)(230922051799003)(82310400011)(451199024)(186009)(1800799009)(40470700004)(36840700001)(46966006)(40460700003)(336012)(70586007)(5660300002)(316002)(54906003)(83380400001)(44832011)(40480700001)(41300700001)(8676002)(8936002)(36756003)(2616005)(6862004)(70206006)(4326008)(86362001)(1076003)(6666004)(426003)(7696005)(107886003)(82740400003)(26005)(81166007)(2906002)(36860700001)(47076005)(478600001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 14:04:33.8682 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ff15cdb-c7a1-4ecb-f471-08dbbf62ad5c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6549 X-Rspamd-Queue-Id: BB0C740021 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: pm5ob1w1ui8q56egr4bq3gk4dmrmngdi X-HE-Tag: 1695823477-956998 X-HE-Meta: U2FsdGVkX1/fJ5jyNhxwGhxJ85nfHUIp7jU4YhYtcvREx1+AdzPB/LiDL48CLp/NFqr3htkGOfna3HzmgnJfnZU7nZoMRzt+pz1oFp89+pZDdbhC/cXG8Bxahk0AGxstfsG1UrZ7fNA9xUuE5Q3BJZvDhi9/cyYsqQuQrnzzOZVFMXCHsoEqBdGxIDAm2lSI7MYoDag4PayMYgrnEjV+0IPIxDuLkWPBQOJZe/9SagzfWYMpY8qCaMtJrQpr/TAhSoIz4ivO+bssTiJVo85GKSeAxFroPaQjUJ45g3hhumGNW0dZNNyOldmtI92H3axfjC+p7hqaaKfszv2KK/th6Sjprxs6tRnadhNfqqlUh9oW3wycz2dThEOfWGcepbqXZwbZkkItI0mEIGZlDExSF6Mx2iFoM2yytRranuJGdlHakmjSTwUapUVYcwu3Mj5Uf7hUglLs3i6st2fOnOGdujlHH+vgTB6Oem9tQzMhYYSHZyD8sqLAV9/7A2sQPVgdcufV9+gQY8UXCtxiY57sRb1+w59TtkLD3JAsRzyWAMOLd3HPep6tFpnhcINI3uCArRlTwvY5hQYabRr7yF23amwUEL1DnWMrVLS8aQceW9sOZzlmMZuBd/2m3fIft7/FpguvYgdTlWzAKIRipdTG6cubamEhbE0yBjw2qkNcmeiFMlEUmGs9cfmfzi6l6NSRpUP3rf9aFAJRDHF9qjm2keuR6GaXw9PYibrK5oO23hVnhhNoDrbEDx7env8GB1pfh1KhCQDrXY5Oeaf195M/iqJGhF+ScWC2p4s0mOp53xSeJvJq4b92LqLIHJsOSbJhMnYZsAVekuJ34nyVxb5XYVxwxps8TexXA+OpPugLMxRWWSipcexq53kCPrL9NF6r5cVLy8OAFT/vC1AEmmtyF6EISS91aPEZw4B7mWYaX+S1J3MFYWzY+v5iNmjDLeLagD1E/4PxuNMdvEnPLVe TTYlWlbP NERpuGR0wDf7G9eppGP8JL7CvSYccOTTgqpO4FX2OdEl927IbDf8gYf+m4inKZDt0CeB5vTBzaMz+9ltE/p0/maPT6ayfcqM5OoE7yNYjd8+nFARNoXgqzUG9KIWefOk1Y9rJbPS8FOfikYvB+BwvWmt+6sgLs0q1CJ7IImBKQKP6r2VW87t3L9CLWgs54fPHxZIJYDvXmnrXkQ1b4p+viqMxfWYGkEWoRVc8ZLohqonJhNRXmuAukwdX7R0RHA+8JWBMX08lhfECrHt2vK/sZ4uEnj82T27K9EzEPO0t2+U7ST5wGH8/Gu+x25aXYA68R1IEYMnOoFD52RXCZZ8sfjcPymggoAW6LwCNo+Rv9Dw0cYs5Fq27jKd9FcI4YpwQBMBNHziJpWkSV3KFXR0Kob79Km29g/9DdN1bspbTYTqq0IYsvLSLTukPitCLnIMsY+WlAP1rSlEtB4jAk0QMt+6mEjV4wU3dqM7tksGJpOJXZ6rg8ODHgrBFFHj+z55PIcIAWZ0xgm+cPb4DTSuF5v8FIgUNEqs7WVgpXVPdB3MBl8T9+ExL09QjydKjNMaYhXH+a4rMyb/if6/cRIQv+NG2y4TG51gevYPyLiYIIJ2K8+TFHFRhujorwqmSfAly7V057ncKssNxN8dsvmb+nXrHa9EhSwGHCBsXuYDB5849F6MhZ1YoKKq1aAQSv3+BWKrCuwOUOpCCjpkeuFSON+phvg== 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: Put this function in the header so that it can be used by other tests, without needing to link to testcases.c. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Andrew Morton Cc: Shuah Khan Cc: Dave Hansen Cc: Aneesh Kumar K.V --- .../arm64/signal/testcases/testcases.c | 23 ------------------- .../arm64/signal/testcases/testcases.h | 23 ++++++++++++++++++- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/tools/testing/selftests/arm64/signal/testcases/testcases.c b/tools/testing/selftests/arm64/signal/testcases/testcases.c index 9f580b55b388..fe950b6bca6b 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.c +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.c @@ -6,29 +6,6 @@ #include "testcases.h" -struct _aarch64_ctx *get_header(struct _aarch64_ctx *head, uint32_t magic, - size_t resv_sz, size_t *offset) -{ - size_t offs = 0; - struct _aarch64_ctx *found = NULL; - - if (!head || resv_sz < HDR_SZ) - return found; - - while (offs <= resv_sz - HDR_SZ && - head->magic != magic && head->magic) { - offs += head->size; - head = GET_RESV_NEXT_HEAD(head); - } - if (head->magic == magic) { - found = head; - if (offset) - *offset = offs; - } - - return found; -} - bool validate_extra_context(struct extra_context *extra, char **err, void **extra_data, size_t *extra_size) { diff --git a/tools/testing/selftests/arm64/signal/testcases/testcases.h b/tools/testing/selftests/arm64/signal/testcases/testcases.h index a08ab0d6207a..c9bd18e7c538 100644 --- a/tools/testing/selftests/arm64/signal/testcases/testcases.h +++ b/tools/testing/selftests/arm64/signal/testcases/testcases.h @@ -88,7 +88,28 @@ struct fake_sigframe { bool validate_reserved(ucontext_t *uc, size_t resv_sz, char **err); struct _aarch64_ctx *get_header(struct _aarch64_ctx *head, uint32_t magic, - size_t resv_sz, size_t *offset); + size_t resv_sz, size_t *offset) +{ + size_t offs = 0; + struct _aarch64_ctx *found = NULL; + + if (!head || resv_sz < HDR_SZ) + return found; + + while (offs <= resv_sz - HDR_SZ && + head->magic != magic && head->magic) { + offs += head->size; + head = GET_RESV_NEXT_HEAD(head); + } + if (head->magic == magic) { + found = head; + if (offset) + *offset = offs; + } + + return found; +} + static inline struct _aarch64_ctx *get_terminator(struct _aarch64_ctx *head, size_t resv_sz,