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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9003C433EF for ; Tue, 16 Nov 2021 12:04:03 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 395856140D for ; Tue, 16 Nov 2021 12:04:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 395856140D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BABC182A78; Tue, 16 Nov 2021 13:03:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="tsFvfjmW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C23C83723; Tue, 16 Nov 2021 13:03:56 +0100 (CET) Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1616E83820 for ; Tue, 16 Nov 2021 13:03:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 82A432223E; Tue, 16 Nov 2021 13:03:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1637064232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XD5ID4wrkBMpjq+U8C4DnC8lgLt3GwZtfce8SKl9bAA=; b=tsFvfjmWX7o8xGcodzi41SdBIpNn+ZaNOVHf0w9tVrWp330Ot461oFMsD6ac4Wzv3+bq8z mBILqIAwgXxpRFVe5Ag/3Y8kLucvM1V7P/zCljA/Tbaajz8ycwryxx/hW9rVxMyy32UQd0 V/SzYIBP+i214yAvz39ZwZO+Z6ZJYPs= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 16 Nov 2021 13:03:52 +0100 From: Michael Walle To: Gaurav Jain Cc: Shengzhou Liu , Varun Sethi , Adrian Alonso , Alison Wang , Andy Tang , festevam@gmail.com, Franck Lenormand , Horia Geanta , Ji Luo , Meenakshi Aggarwal , Mingkai Hu , olteanv@gmail.com, Pankaj Gupta , Peng Fan , Pramod Kumar , Priyanka Jain , Rajesh Bhagat , Sahil Malhotra , sbabic@denx.de, Silvano Di Ninno , sjg@chromium.org, u-boot@lists.denx.de, dl-uboot-imx , Wasim Khan , Ye Li Subject: Re: [EXT] Re: [PATCH v5 02/16] crypto/fsl: Add CAAM support for bkek, random number generation In-Reply-To: References: <20211115070014.17586-3-gaurav.jain@nxp.com> <20211116104531.3580657-1-michael@walle.cc> <29891f7b0c6b990e3af1a2a7f28b28ad@walle.cc> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <1716a77426f4516c6884ff3f50550843@walle.cc> X-Sender: michael@walle.cc X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Am 2021-11-16 12:57, schrieb Gaurav Jain: >> >> > +int hwrng_generate(u8 *dst, u32 len) >> >> >> >> likewise. >> >> But more important what is the difference to drivers/crypto/fsl/rng.c? >> >> Why >> >> do you need a new function here? >> >> This one. Why can't you reuse the code which is already there? > > I might have missed to update this. > dm_rng_read() can be used. Will remove hwrng_generate(). Nice, thanks. Slightly lesser code :) -michael