From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE226C48BCD for ; Wed, 9 Jun 2021 14:52:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D1BC6128A for ; Wed, 9 Jun 2021 14:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238344AbhFIOx4 (ORCPT ); Wed, 9 Jun 2021 10:53:56 -0400 Received: from linux.microsoft.com ([13.77.154.182]:54086 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238328AbhFIOxu (ORCPT ); Wed, 9 Jun 2021 10:53:50 -0400 Received: from sequoia (162-237-133-238.lightspeed.rcsntx.sbcglobal.net [162.237.133.238]) by linux.microsoft.com (Postfix) with ESMTPSA id 36F1720B7188; Wed, 9 Jun 2021 07:51:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 36F1720B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1623250315; bh=/HOmnjissLx+lpthetr985W/qYtb76YNAtpL9Q+TgUo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c80DgLo+RZ7PeCM+jUdVjeYBRw/W44I+zJd6qzZdHN9r7ORuQQ6AGzFitDP+/AVLR JLqhPwpsBqvYed6u1ExXDP2dxSO+TkFg+aHZOAMCQwO11kq6EKDMweBAINbQYrfvAS Ymdij+JezbRgdwPbVaGZvQYQQ2nDt5LNqgJSnrw8= Date: Wed, 9 Jun 2021 09:51:53 -0500 From: Tyler Hicks To: Jens Wiklander Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org, Sumit Garg , Herbert Xu , Sakkinen , Sasha Levin , Thirupathaiah Annapureddy , Vikas Gupta , "David S . Miller" Subject: Re: [PATCH 4/7] hwrng: optee-rng: use tee_shm_alloc_kernel_buf() Message-ID: <20210609145153.GH4910@sequoia> References: <20210609102324.2222332-1-jens.wiklander@linaro.org> <20210609102324.2222332-5-jens.wiklander@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609102324.2222332-5-jens.wiklander@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-09 12:23:21, Jens Wiklander wrote: > Uses the new simplified tee_shm_alloc_kernel_buf() function instead of > the old deprecated tee_shm_alloc() function which required specific > TEE_SHM-flags. > > Signed-off-by: Jens Wiklander Reviewed-by: Tyler Hicks Tyler > --- > drivers/char/hw_random/optee-rng.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/char/hw_random/optee-rng.c b/drivers/char/hw_random/optee-rng.c > index 135a82590923..a948c0727b2b 100644 > --- a/drivers/char/hw_random/optee-rng.c > +++ b/drivers/char/hw_random/optee-rng.c > @@ -145,10 +145,10 @@ static int optee_rng_init(struct hwrng *rng) > struct optee_rng_private *pvt_data = to_optee_rng_private(rng); > struct tee_shm *entropy_shm_pool = NULL; > > - entropy_shm_pool = tee_shm_alloc(pvt_data->ctx, MAX_ENTROPY_REQ_SZ, > - TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); > + entropy_shm_pool = tee_shm_alloc_kernel_buf(pvt_data->ctx, > + MAX_ENTROPY_REQ_SZ); > if (IS_ERR(entropy_shm_pool)) { > - dev_err(pvt_data->dev, "tee_shm_alloc failed\n"); > + dev_err(pvt_data->dev, "tee_shm_alloc_kernel_buf failed\n"); > return PTR_ERR(entropy_shm_pool); > } > > -- > 2.31.1 >