Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp210507rwe; Wed, 31 Aug 2022 01:06:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR7qu4wRXa68FUM2EltnB7PVukaOF8g5dDK5EqfKlNdW1ICgxxpuq7UszTi/cs+D3zD3qa6J X-Received: by 2002:a63:a4f:0:b0:42c:3692:c9bf with SMTP id z15-20020a630a4f000000b0042c3692c9bfmr8751724pgk.35.1661933168463; Wed, 31 Aug 2022 01:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661933168; cv=none; d=google.com; s=arc-20160816; b=aWOIl6MIagqLFviXwLyg/Yqjq2PH9YtHhLtyjGhCkOyn6193yk3sUZYZXm75Ygjsn8 sMJcWsMgXdHpRHygfknJiijkeQerej6Vy6IvzKO4FFz9M5oSrhIxOqB5FHuqtqT16Sgc zX7rPAsNlsEvbIkavH3z+84B+PjTKmLQ8TsLKtZEn9z9k1up+bxUV4GOf6EpN819rtli cg2tF4KBTzGXnbCJRAmTgZXx+mFOpy8X+fj/plTAkp8+nI+Fpk8324u6gU9hhXqS3vqS w9gIoTQB62a0ehLQGMK9M7eYBFtBkWs33kZJPAFOhZw/Qc4Oza2xVXfHYT9vlIGpvSfd j2+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3Kt+FeOng/UOMbYpP0xjbg2+rCfL3Wu4EjlGGsEGffg=; b=Ey3Alu0xSD1JAd1r4QLjVWRWevTg0VrgNr3lAlJtT4y3YYPLJ7xloIwFp23XTxa2zU hVmXD/vi7j/BKjl11BFoeDTQjrhr23FnavfQCbIC7eETC82iR9OL//0F3I+0nAwroc7t i9UAJpNE8dIs0Zp9/pnIkmyCn5o+3wq7P0ZdNp8I4BygsteJt9x+u6HjIXnCjRZG27AW u2HmApG1rTYwzbH7KkLIH7rFe1e8tvx5/hNUhX0SngxS/1NBtcrFcxNLKevYx8A1BJ5R 78An8bz1A2WSycSMa9+aiDLc3qPXybNulYtXBLVmrl09UYMuqhzarRRak5OmVdPBuTog NWFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hyay9cCy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a17090aba9600b001f5073da33fsi1253059pjr.131.2022.08.31.01.05.57; Wed, 31 Aug 2022 01:06:08 -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; dkim=pass header.i=@linaro.org header.s=google header.b=hyay9cCy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbiHaHix (ORCPT + 99 others); Wed, 31 Aug 2022 03:38:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230038AbiHaHiv (ORCPT ); Wed, 31 Aug 2022 03:38:51 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36716BE4EF for ; Wed, 31 Aug 2022 00:38:50 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id s15so8583804ljp.5 for ; Wed, 31 Aug 2022 00:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=3Kt+FeOng/UOMbYpP0xjbg2+rCfL3Wu4EjlGGsEGffg=; b=hyay9cCyGM9c0iIRK/EzkRgHuPy7nROx0Uu1jQkmt2Kvdx5JJxeYJMqFXYKNvoPk5y fcBHaUfivVbFi1AwuZ/tbw6BlsgwxRni8zZbvhITniaEo4zOyIIIBSkEvtOm8gsaXR0u 2ITa9AhB2Y71Axj6ViukdhLrNWWrK2o5RZ2VuibRpcTAHVznEggH9vyz82YXNJ4tA53I vI8+/asi9BMmH42cLBhNqL5DJaX3jlbWTP6nbvjer+67wG8TmA/HvOqoVR6pdyqrD9Ah OQhERKLkOGS17Gs/uSxqq6hq+ySokoLjICt9XpXJC/TurZ99FXaNFiNIBPjArNOlaAZD ZlgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=3Kt+FeOng/UOMbYpP0xjbg2+rCfL3Wu4EjlGGsEGffg=; b=OKpVEGGZdcJNv8SPNZzGHsI8qJ1pnP9eHVGCh14y6jHhf7PB3/jmTOhCKkecXYWSm5 +BQERadbO0YQw0JCRXoH3dqyPiZf9iMgAShRaPj7mCONhUtFYZSXDwV28wTp0NxFs07Z n9y6wQKLcSVJ9hOwloyYWis4lwOO6bCWZ2jqn/cic8Fnzkr72TydpEOgZmgyyDUs3d3N 3CcTpoxbAccRQ+1F63cv8ci4dULywpxtPL427ZE/n6ixKEca9C4DakL3tMEDbW+L4q4o OdFvWjWJIWEO0svtrNuAtdInmbm98H5Z3A42aQxGbIMpCf5noEILj8+OK2Hvb+SFB/Ly 37xg== X-Gm-Message-State: ACgBeo11lljhkL3N5B2bgLuk7YCXxqhJb4fzC/gPHNPndiOII8DH/vDe YDeiz/GZ6vcVqxhZF0sDdbLrWnIL7QhbCAPwHO+cMg== X-Received: by 2002:a2e:844a:0:b0:258:e7a6:353a with SMTP id u10-20020a2e844a000000b00258e7a6353amr8059564ljh.153.1661931528214; Wed, 31 Aug 2022 00:38:48 -0700 (PDT) MIME-Version: 1.0 References: <20220830100700.344594-1-sudeep.holla@arm.com> <20220830100700.344594-3-sudeep.holla@arm.com> In-Reply-To: <20220830100700.344594-3-sudeep.holla@arm.com> From: Sumit Garg Date: Wed, 31 Aug 2022 13:08:36 +0530 Message-ID: Subject: Re: [PATCH 2/9] tee: optee: Use ffa_dev->ops directly To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, Marc Bonnici , Valentin Laurent , Lukas Hanel , Coboy Chen Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 On Tue, 30 Aug 2022 at 15:38, Sudeep Holla wrote: > > 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(-) > Reviewed-by: Sumit Garg -Sumit > 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 >