From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753084AbcFJOnR (ORCPT ); Fri, 10 Jun 2016 10:43:17 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:36964 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbcFJOnP (ORCPT ); Fri, 10 Jun 2016 10:43:15 -0400 Date: Fri, 10 Jun 2016 16:43:09 +0200 From: LABBE Corentin To: Herbert Xu Cc: davem@davemloft.net, baolin.wang@linaro.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] crypto: engine: permit to enqueue ashash_request Message-ID: <20160610144309.GA25816@Red> References: <1464873212-15426-1-git-send-email-clabbe.montjoie@gmail.com> <1464873212-15426-2-git-send-email-clabbe.montjoie@gmail.com> <20160607103139.GA325@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160607103139.GA325@gondor.apana.org.au> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 07, 2016 at 06:31:39PM +0800, Herbert Xu wrote: > On Thu, Jun 02, 2016 at 03:13:32PM +0200, LABBE Corentin wrote: > > > > static int omap_aes_prepare_req(struct crypto_engine *engine, > > - struct ablkcipher_request *req) > > + struct crypto_async_request *areq) > > { > > + struct ablkcipher_request *req = ablkcipher_request_cast(areq); > > You're still doing casting in the driver. > > I want this to be moved into the crypto engine API. There should > be separate function pointers for each request type. > > Thanks, > -- So I need to split do_one_request to cipher_one_request/hash_one_request. Same with prepare_request to prepare_hash_request/prepare_cipher_request. With the choice of each function done in crypto_engine.c. Since this modification need to add to algapi.h, I think it is necessary to move all crypto engine stuff to crypto/engine.h Do you agree ? Regards