From patchwork Wed Nov 29 12:48:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 10082115 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B480060234 for ; Wed, 29 Nov 2017 13:07:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABAE6281F9 for ; Wed, 29 Nov 2017 13:07:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0533297E2; Wed, 29 Nov 2017 13:07:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 697AD281F9 for ; Wed, 29 Nov 2017 13:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c35t0g6E/CwYQE2Bdk04JfMy18C/k8qofMSePAZL75c=; b=eujhOhQvhSaXyb 1ejqwaCVe3oOPyks3aWx+0Riv0aJxVuHXeUKgyJppta3pbhYsFg03BMHi5pgvJobH3+dpOfiKYEMf 62hE3b47sri2Q0Th4sycv/LmAYxMBTNAr2Oe/1ko7Yu0hM2gLQxo0XduJjBVQhzsisXB6dr4O8Y05 /o/7KHoiA/SLzkET/QhqWJ2OGUiXo8zYhohUFGp1Coq1VrIpqPo+ZEgKo6F4IMmrqk+Oq9Z3BglVS DL+6CnuLPgHbVCZZPJOfrCSDx49ep+bcb25ULAShb1vca6eK5bu6NR6nfv0FdOOaihvDAYs1P1lnF TTSJWi0FQhIDe5rAbWvw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eK25J-0005hj-53; Wed, 29 Nov 2017 13:07:29 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eK25G-0005Yb-Il for linux-arm-kernel@bombadil.infradead.org; Wed, 29 Nov 2017 13:07:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MyjAZH5I43Rm42oM7pB3I8kL/q3YVNB7aWXcE0wjFCc=; b=IRRkWo8sJpl+PpWBRVjZS+//S F5UJBFkVqqHuwIzvqlcq5p1ztuyCL85h/KqUrt5NWbaTRL2WuPsqOGS88+W0/uV+K+pcxgAzCVaTp RFx1dNi6rFBPB/Vg3KsdSRpXDnakcfWeQv69jV5/8YqKgWK/Ha/eeVovTF/Lq4neyoSS7H68NGsWq TDUf4z+MvNiiR+9IiR4VKsD4G8cD45R8Y/FT4GX4IqBVxmlUiee1bN2Vm2k92tYfQbpDQmWi1uhYW FcNL6WKZ/FByS2sp45N6/9PoKI1z2i+36wHSOVjqmRL1wpasb05ZSWwVws0zD22C+HAlWkjSjAy0/ JSak6pOdA==; Received: from mail-eopbgr40070.outbound.protection.outlook.com ([40.107.4.70] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eK1pD-000149-OZ for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2017 12:50:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MyjAZH5I43Rm42oM7pB3I8kL/q3YVNB7aWXcE0wjFCc=; b=NGwjFSSbFSaYRDkfEFNflMLkKSGON8trHBPqpX5Hw+vdDfwTGY/KE2Sx+C5kjSVqc830irARQ3XkjM45paFqxNk42ShSGfF19zATWPa3rcZNkTZTlaPRGdSonnsPawllevsEAKNJazNS9zkgJz+Q8TKN0WWxG6/SahiC7piF+UE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@epam.com; Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.56) by AM4PR03MB1762.eurprd03.prod.outlook.com (2603:10a6:200:f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Wed, 29 Nov 2017 12:50:17 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Wed, 29 Nov 2017 14:50:13 +0200 From: Volodymyr Babchuk To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tee-dev@lists.linaro.org, Jens Wiklander Subject: [RESEND PATCH v2 14/14] tee: shm: inline tee_shm_get_id() Date: Wed, 29 Nov 2017 14:48:38 +0200 Message-Id: <1511959718-5421-15-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511959718-5421-1-git-send-email-volodymyr_babchuk@epam.com> References: <1507923164-12796-1-git-send-email-volodymyr_babchuk@epam.com> <1511959718-5421-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.56] X-ClientProxiedBy: DB6P193CA0016.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::26) To AM4PR03MB1762.eurprd03.prod.outlook.com (2603:10a6:200:f::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 463c613c-df1b-41bf-0157-08d53727be55 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603270); SRVR:AM4PR03MB1762; X-Microsoft-Exchange-Diagnostics: 1; AM4PR03MB1762; 3:5DWWsQ41343codLVxqQTuNW1jP+ibhu9volAJwBlusy7wuTMlL5NEwArrZK8LLjZoXOcB3eFPH+szH7l66ntZeiPR0M7+oni6et0CI/cB4AEynwpFPf2HiMBa42+nW66DyuHu3ZBXPwVu3RFlvuMXIYQb7oOmrm6cgMttBxHQF+J5Dkv8b9/CCdDahmlrbkwhkKDwv/qjIsekUQCHH8pnfSe9t8kwO5EXTIGKqDnKCiFZIN0eUKqRsstjSPW2Xx8; 25:dNhJWy2VImkiN4bjv/6Sni2pMdN2E0qvsjuw90kr+FNA0BxTeLWqij4R8Qkgsk3NL2jFNX1PocYDZFP9deKmZ2LUoekVYu+0nrB6lwT7a/1+/IhVD0UkoUfj/+4W9G7OX2g3jZ58EH1My4jQvuz1As7D3LiM3Gn7g7HoXuG14OuEvlLew2Uxj+0dVglWA4CmdIs7g7Z2b4FmYqutHNSvb8Tlot84U/Q0WUBbO6GFvfw2Mp5GlsLOBOucJ1PX1iT/ch5k3TQJrrIMoqtu9HjIntdUi8cNA6uQTKMEl7WS53azqWYChr5XM0+biV1mRCW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oQBcaw7u7Mt/Bh61wXoCI0yN1AO6XhaiNAMwHn+95E1xgDd9ERhSX0qeTCrSzPCyjsyi3yFtH/O+HQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231022)(10201501046)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM4PR03MB1762; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:AM4PR03MB1762; X-Forefront-PRVS: 05066DEDBB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(366004)(376002)(199003)(189002)(68736007)(189998001)(5660300001)(36756003)(76176999)(6116002)(50986999)(3846002)(305945005)(478600001)(86362001)(33646002)(72206003)(101416001)(7736002)(81166006)(81156014)(105586002)(8676002)(50466002)(2906002)(97736004)(55236003)(80792005)(106356001)(2950100002)(50226002)(107886003)(42186006)(16586007)(48376002)(6916009)(316002)(4326008)(51416003)(6666003)(39060400002)(8936002)(52116002)(66066001)(47776003)(122856001)(53936002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR03MB1762; H:EPUAKYIW2556.kyiv.epam.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR03MB1762; 23:FmckxV3FLDU31kmAoxIVZmv16Fs5T60ybE0rqbjlF?= =?us-ascii?Q?Qx28gi7nHMWGPazkfjA6iuEZkKm8cr0dD1gGeSvrhKg+qgpVMnWvdyUHyaPu?= =?us-ascii?Q?zObii+RBnt18AwcoqctR69FPzCl/gAD0dcshOAEUtuqbq0Z5vtpIPgKwl0Cc?= =?us-ascii?Q?x8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kGQF4Mcnbcl9PTR96VuAJBwitM6+WQSoCS0EX4Ni9oxYnTx SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2017 12:50:17.3037 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 463c613c-df1b-41bf-0157-08d53727be55 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR03MB1762 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171129_125051_880592_4FAE0EAC X-CRM114-Status: UNSURE ( 9.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Volodymyr Babchuk , volodymyr_babchuk@epam.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Volodymyr Babchuk Now, when struct tee_shm is defined in public header, we can inline small getter functions like this one. Signed-off-by: Volodymyr Babchuk --- drivers/tee/tee_shm.c | 11 ----------- include/linux/tee_drv.h | 5 ++++- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c index b48f83d..5f5f771 100644 --- a/drivers/tee/tee_shm.c +++ b/drivers/tee/tee_shm.c @@ -496,17 +496,6 @@ struct tee_shm *tee_shm_get_from_id(struct tee_context *ctx, int id) EXPORT_SYMBOL_GPL(tee_shm_get_from_id); /** - * tee_shm_get_id() - Get id of a shared memory object - * @shm: Shared memory handle - * @returns id - */ -int tee_shm_get_id(struct tee_shm *shm) -{ - return shm->id; -} -EXPORT_SYMBOL_GPL(tee_shm_get_id); - -/** * tee_shm_put() - Decrease reference count on a shared memory handle * @shm: Shared memory handle */ diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h index 9cd4e5f..c36ecea 100644 --- a/include/linux/tee_drv.h +++ b/include/linux/tee_drv.h @@ -428,7 +428,10 @@ static inline size_t tee_shm_get_page_offset(struct tee_shm *shm) * @shm: Shared memory handle * @returns id */ -int tee_shm_get_id(struct tee_shm *shm); +static inline int tee_shm_get_id(struct tee_shm *shm) +{ + return shm->id; +} /** * tee_shm_get_from_id() - Find shared memory object and increase reference