Received: by 10.223.164.202 with SMTP id h10csp4692109wrb; Wed, 29 Nov 2017 10:15:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMbycPXylUyTHUZFsDXlU5WtqdlY8BiU3wPm808qEnzG9OmDqOJPQVmIrkOp9jk77pAyjFZb X-Received: by 10.84.129.106 with SMTP id 97mr3739925plb.385.1511979313012; Wed, 29 Nov 2017 10:15:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511979312; cv=none; d=google.com; s=arc-20160816; b=mKlLYbX65nPe3pxY/Wa8YDew64SEsxvR9Vvrv29c2Djo1HBArZDesZsLq9nLw/JE08 Kh1T3R4hDw0br9IGg2ZaGcYGlfHQ4kWJ0d6J5NKpijZF2dQh4hl0arNFkBPmZ23gvaxT tlmziC3UR9symSlKLT3LY9jdjp729Xfdgx23zUz1Lhz8uODCNwJvzH6XlzOs3FfBLyEp QWXDCr7II1qB2BOG6P549AAP2X93pv7oiYooqS4Uwo2Fa2R8bHJNMu4sejzPgXX+rUGs vZT7NAye5MX3refKEvhmpASJuHyGku6XFHtZhxZvD+4SLDTxwnyPjAF5r3Xu71UlYev+ BQuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=MyjAZH5I43Rm42oM7pB3I8kL/q3YVNB7aWXcE0wjFCc=; b=0MFVk330CCaaQQPfpaYvx3h5FzmXcZGsOvNRf/gXmPDRe9nARHW7GXt+j946aoOMKN QjZE1tKlsRClwlAnPHWWnKPETKyUHgoUr4vSieMnmN51cgW703dYRitWnQkemLknAJQ0 QucmM+UnqVASLQLZ3uX6RDNfFZ1g7NYQRT/U6XDsAZnrjS55WYDlzQx3jgKDmU2hHTzr pFqGZepxxm+idXcUgydYieRls5KhUV4OESdH6WOoo60/BeqrMVE1WkS2Ag9FYp8EBzBZ EZnK7+nBMquZA+wHf5Q7r8rfgvZIVLPaYsQaoFMQA6TSAOErHwJKBh3GpenDWJgu/iyq N6YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@epam.com header.s=selector1 header.b=NGwjFSSb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si1608732pgq.161.2017.11.29.10.15.02; Wed, 29 Nov 2017 10:15:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@epam.com header.s=selector1 header.b=NGwjFSSb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754917AbdK2MuY (ORCPT + 70 others); Wed, 29 Nov 2017 07:50:24 -0500 Received: from mail-he1eur01on0081.outbound.protection.outlook.com ([104.47.0.81]:46688 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932621AbdK2MuV (ORCPT ); Wed, 29 Nov 2017 07:50:21 -0500 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 Cc: Volodymyr Babchuk , volodymyr_babchuk@epam.com 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 Content-Type: text/plain 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+ibhu9volAJwBlusy7wuTMlL5NEwArrZK8LLjZoXOc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/G1XrPJwFMBR5XeUAX5ZJzAWHMvt47b0hxkvx6dPXwf9AsbH8/vzH5rZA6LKRny8nZzCRRSCC1/QW9pUKxOyzckPKH0PkR7ewvysi/3DKu5Rm4R2qV5m0Xj2RYu3EkxFFyezXD16R7lmmbKnalYWAtot23Cv8pSC0A5iFZ371j1pve4pM+jcmDmly8QNiS+Xa193MlMY5mgxpCO3xkvylQlqg+a0/7qcrTa5AGmw0r8yGj6+CPaMHWNd6JPF/xxAECug3CrnAl65nqmRBUgxuiCJ8jX3GJ2+HAmT/OFdtTF;4:4iPBGiTzxqCgG67+lf98YXoH2N3RaO0xB/XUhwRlSXg1yUu+AUS6UF5LMIPrp3ND05A8xuOM+oAjOGuaVPWHXyYnlKmh7KhVWIjm1ofD7i6JqrIUxk2GLS0geS3WucJ0kKe6dbMb2o4BHXeJXC/Zn1r1VzK3+8rgUxCoZBkk6DF3ZM2YNDmVOa9GIeh6hXD7fpMN3LstoQBcaw7u7Mt/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?x8IWU4e9aXQkOW+nFAWTHjzQ/H3uW7J0ql8Im8uGkzSDMn1DeWdIoSUTy1xQ?= =?us-ascii?Q?HtvUobEgmj7pAIDdrQI9HtFsd62TerQjCV+p4t48W2Yy0RTtRj318etSJXZ2?= =?us-ascii?Q?ZDWFSDFV4cmP/B2VrykfQXARLG9C3c2juOPReoJWnDhVTmw6zkXLYemiBCyr?= =?us-ascii?Q?1omaeJgBVAC7ZUOqbEMcVPYuG2o/3H80YEllr6WoLpqyfVHKh9uexMLA69MT?= =?us-ascii?Q?9uy9GSWdN81KhUVB2dUQ3Ml+nQJ8ynJH/DGZISGQ1cLt0IiD5+5NFTOT9X2o?= =?us-ascii?Q?6NSy+HtSxSwtlIysP21xkuc90cw2HfCh79FT8HOoZgjxLckfZUR8yNDEFrP5?= =?us-ascii?Q?nvfmAxCKknZbO0crdasvk/NcfTz7a4YSCNppTL/brNt0Zd6sP786XtvulSms?= =?us-ascii?Q?8S0wgvv/VVN37CDzZ0ha48wx3CyFyxjvILx7usbIpxgCgWvbzBCIQ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/BN/Ce3CvRp6x2EBW3Hx1nvqF0GAiBNj3gAeDdYi7yBQnxNnBiTl83oOmOMBvGY3ulQ0L79mvX7nGIgb+RWwN3WEc3JaVGpbMj1LpX3tTcwIByaJBRqXuxbBDGDiJjw5UFGnf5jYRvVle0aNyhozJzHnK0xrQPJ69+ul4SHZS0=;24:fYuAYGDIGFsRNmPOjDA06oFhii24LML5+gmj5FKk59Si0YyEeVsOv0YXVk1y4bijpPiC5Tt8rws6GrRnEfPClxnLPDB0Vh2Exe4F6iukPqw=;7:/w6I7bVl6AirX2MvWmTgbX7a/0FqQAjkOBCbp4GHZKTeL3+gpMua8zHAo+T41wohnu/+7QWWpL3nRgUMj8PkHpLg+vC/jVt7FdvwdQDvgaTVVw6dhh6h+7qsrwU+RZKfsbQ1oPm1N1rZ51sBU1M+p7wIhBuSo3mKH9ieYPXbBUtFcS/IstyQ5BSf+YmpPzzR6xgFjO6KsE+Vt1g4pkGQF4Mcnbcl9PTR96VuAJBwitM6+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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.7.4 From 1581172260662159040@xxx Fri Oct 13 19:36:14 +0000 2017 X-GM-THRID: 1581172260662159040 X-Gmail-Labels: Inbox,Category Forums