Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4025768rwe; Tue, 30 Aug 2022 03:21:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR7c3VDaDhkPHC+35Fq/nxBIogHZME19xzvS7OAizfFLNHcuOwaUIgL3THFavS85kNRGzad5 X-Received: by 2002:a17:902:b715:b0:174:dba3:8bca with SMTP id d21-20020a170902b71500b00174dba38bcamr7325779pls.51.1661854887688; Tue, 30 Aug 2022 03:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661854887; cv=none; d=google.com; s=arc-20160816; b=1InsPsVxM7hCsRnfQ6LGwLMJC2ab7X+/GSe0vLiHDq/4T4PUHSz6RQSkCHVg10ycjz OSW+0k6KKzNKRB7qNwXryjZvLf0QuB3wx6NLF22EC1RoSfgkf1dxT19iLnlHs3IaEnpF kYn1m07w34KTlirtrklhKxRivjKKEF0Ud1SfUp8MpXpryM9yeM/ve8bdPHIsyYHXSpf3 eMbxE/EIadxn//EzEEpVNOrDLnWoAnqWLMMvn+bmQsfLISdEjLnF/jof+nv4bKpw3n58 kb0EDHXS/Cvogzp/5YS4xtPvuqPYzJxdawxWmPzCQ3ke1wZTCinBHL3VAOq5adKCN2vg BtIQ== 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=fDgkgUGRIm9HRWPKtExxRGPl7biBhttc/5hTtOBXb3k=; b=HlhskgzEeWN3Rj8QiV+q7ziV395GSlWxNXHinYlwDT3d9RV436/QKEj+FNqMVpefI+ XVi4kZi5cSZkgHk7qV4heNKOz/UvY0QjRumaxGbI4/tEBG8RIl4o4W6Bp9lSGyBq13eJ /hw0HVKhHgWp6Yo5pkeC7fJ050I2GP/inHlpQKUxo6Tjc+nfB/n5TLxEHILo76Q+h6de C4wtgUzPgoAZlbq9ihLAqsrSXForwKC4IEWsV3zHz0flgJpTdwcLVBoykEXxp3AH+reC iu4pkK8snAPebHszrSS6W86TiEoiosFMMSwe//0NBoIV65Ko4L/PvASYh4Q8l0s+iaRm A9ng== 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 e20-20020a63f554000000b0042ab026f1b9si1828212pgk.161.2022.08.30.03.21.14; Tue, 30 Aug 2022 03:21:27 -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 S230179AbiH3KMM (ORCPT + 99 others); Tue, 30 Aug 2022 06:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229724AbiH3KLu (ORCPT ); Tue, 30 Aug 2022 06:11:50 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E8ABFAB1AE for ; Tue, 30 Aug 2022 03:07:30 -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 EE5E8152B; Tue, 30 Aug 2022 03:07:35 -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 8B7FA3F766; Tue, 30 Aug 2022 03:07:28 -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 2/9] tee: optee: Use ffa_dev->ops directly Date: Tue, 30 Aug 2022 11:06:53 +0100 Message-Id: <20220830100700.344594-3-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 Now that the ffa_device structure holds the pointer to ffa_dev_ops, there is no need to obtain the same through ffa_dev_ops_get(). Just use the ffa_dev->ops directly. Signed-off-by: Sudeep Holla --- drivers/tee/optee/ffa_abi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index 7ab31740cff8..4c3b5d0008dd 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -793,11 +793,7 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev) u32 sec_caps; int rc; - ffa_ops = ffa_dev_ops_get(ffa_dev); - if (!ffa_ops) { - pr_warn("failed \"method\" init: ffa\n"); - return -ENOENT; - } + ffa_ops = ffa_dev->ops; if (!optee_ffa_api_is_compatbile(ffa_dev, ffa_ops)) return -EINVAL; -- 2.37.2