Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4025827rwe; Tue, 30 Aug 2022 03:21:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR6IoMo23LBUNh62NkynUedEVaZMTQ6pIrrju/IgRN7PR37N1UAQtICCAZrqFyEK/bfPyuqH X-Received: by 2002:a05:6402:14e:b0:443:f58:17e9 with SMTP id s14-20020a056402014e00b004430f5817e9mr20282108edu.106.1661854891335; Tue, 30 Aug 2022 03:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661854891; cv=none; d=google.com; s=arc-20160816; b=K4/muNMoMFa9BCRpS3fcMvfiFMx4ys0SQGhXKq1T71eNlTfCuFnTzcDBwKvZpSYGI/ Lh/N3J1NYyRNC3kUsgLJDgeftRXoLyUi2PnJMtESKifopSlqnYlwsOVEl/27fxUOLFQs K2BNr8U3M074jQgiciXVBr/aKdPdlo4coqQwnDFgDYe0ab7jpUPYd/rHca2Ek3PkmX4J +iZH8ZJ1540lxIGfCr+Ue80seprqbUK6bgTuCrL+0unjuacJ88l5lyDNRUDsxdhBy3gd xBO4bW/uHIS7qFL3TxLW5v1P3g+vq0vK7YME4rYcLkyNZj4yau1Fchrx+jHdyQzAgYZn ST2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xpXPLfTvp8NZw7o1FwuJXL8aXqm0nPQ1d3LSmzbcKyc=; b=Z0e/wUEieh3rBfKQn/NOKJUh80knT6y6MLjJx7cCAL4QLPEYTqtsfBISx2YhDye1uC wCFSTqSJ+53Zt6q59WRxclz2nZSiiaJ7FAifDTUR8Zo7EKE886YLNL4qxIYqPcp7uMcy 6cNem80w92spOFMeidMAt7BhI6YzW42FDnILMwFU+PbtJj7Ru3EdFG0u+ogUHLZHxIk6 b1ukUtTGECelFOqU6DgEApjwBOL4CFgKlOAuFcL6qU8L9UO3pQCkm8s66z8NfKHgRi4+ m6VjysdUcM+Uaj1rQ4rfE4cQpAcTqX7V4h9NZRBphXCh2e88udqCsCpuEVSfOr8LyrWW uEnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wv13-20020a170907080d00b0073c14b6560bsi8683503ejb.177.2022.08.30.03.21.01; Tue, 30 Aug 2022 03:21:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbiH3KMn (ORCPT + 99 others); Tue, 30 Aug 2022 06:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbiH3KLz (ORCPT ); Tue, 30 Aug 2022 06:11:55 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DED95FB0E2 for ; Tue, 30 Aug 2022 03:07:38 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C082723A; Tue, 30 Aug 2022 03:07:44 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 666F33F766; Tue, 30 Aug 2022 03:07:37 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org Cc: Sudeep Holla , Marc Bonnici , Achin Gupta , Jens Wiklander , Valentin Laurent , Lukas Hanel , Coboy Chen Subject: [PATCH 8/9] tee: optee: Drop ffa_ops in optee_ffa structure Date: Tue, 30 Aug 2022 11:06:59 +0100 Message-Id: <20220830100700.344594-9-sudeep.holla@arm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220830100700.344594-1-sudeep.holla@arm.com> References: <20220830100700.344594-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the ffa_device itself carries ffa_dev_ops now, there is no need to keep a copy in optee_ffa structure. Drop ffa_ops in the optee_ffa structure as it is not needed anymore. Signed-off-by: Sudeep Holla --- drivers/tee/optee/ffa_abi.c | 9 ++++----- drivers/tee/optee/optee_private.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index 7ec0a2f9a63b..7257b42d0545 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -271,8 +271,8 @@ static int optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm, unsigned long start) { struct optee *optee = tee_get_drvdata(ctx->teedev); - const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops; struct ffa_device *ffa_dev = optee->ffa.ffa_dev; + const struct ffa_dev_ops *ffa_ops = ffa_dev->ops; struct ffa_mem_region_attributes mem_attr = { .receiver = ffa_dev->vm_id, .attrs = FFA_MEM_RW, @@ -314,8 +314,8 @@ static int optee_ffa_shm_unregister(struct tee_context *ctx, struct tee_shm *shm) { struct optee *optee = tee_get_drvdata(ctx->teedev); - const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops; struct ffa_device *ffa_dev = optee->ffa.ffa_dev; + const struct ffa_dev_ops *ffa_ops = ffa_dev->ops; u64 global_handle = shm->sec_world_id; struct ffa_send_direct_data data = { .data0 = OPTEE_FFA_UNREGISTER_SHM, @@ -342,7 +342,7 @@ static int optee_ffa_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm) { struct optee *optee = tee_get_drvdata(ctx->teedev); - const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops; + const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_dev->ops; u64 global_handle = shm->sec_world_id; int rc; @@ -529,8 +529,8 @@ static int optee_ffa_yielding_call(struct tee_context *ctx, struct optee_msg_arg *rpc_arg) { struct optee *optee = tee_get_drvdata(ctx->teedev); - const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_ops; struct ffa_device *ffa_dev = optee->ffa.ffa_dev; + const struct ffa_dev_ops *ffa_ops = ffa_dev->ops; struct optee_call_waiter w; u32 cmd = data->data0; u32 w4 = data->data1; @@ -817,7 +817,6 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev) optee->ops = &optee_ffa_ops; optee->ffa.ffa_dev = ffa_dev; - optee->ffa.ffa_ops = ffa_ops; optee->rpc_param_count = rpc_param_count; teedev = tee_device_alloc(&optee_ffa_clnt_desc, NULL, optee->pool, diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h index a33d98d17cfd..04ae58892608 100644 --- a/drivers/tee/optee/optee_private.h +++ b/drivers/tee/optee/optee_private.h @@ -111,7 +111,6 @@ struct optee_smc { */ struct optee_ffa { struct ffa_device *ffa_dev; - const struct ffa_dev_ops *ffa_ops; /* Serializes access to @global_ids */ struct mutex mutex; struct rhashtable global_ids; -- 2.37.2