Hi, On Wed, Jan 15, 2014 at 05:22:18PM +0200, Horia Geanta wrote: > From: Cosmin Paraschiv <cosmin.parasc...@freescale.com> > > In the 3.12 Linux kernel, the INIT_COMPLETION macro has been replaced > with an inline function, reinit_completion [1][2]. We are currently > using the 3.13-rc3 Linux kernel, which leads to the following error: > > cryptlib.c:220:2: error: implicit declaration of function 'INIT_COMPLETION' > [-Werror=implicit-function-declaration] > INIT_COMPLETION(cdata->async.result->completion); > > [1] > https://github.com/torvalds/linux/commit/c32f74ab2872994bc8336ed367313da3139350ca > [2] > https://github.com/torvalds/linux/commit/62026aedaacedbe1ffe94a3599ad4acd8ecdf587 > > Signed-off-by: Cosmin Paraschiv <cosmin.parasc...@freescale.com> > Reviewed-by: Cristian Stoica <cristian.sto...@freescale.com> > Tested-by: Cristian Stoica <cristian.sto...@freescale.com> > Signed-off-by: Horia Geanta <horia.gea...@freescale.com> > --- > cryptlib.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/cryptlib.c b/cryptlib.c > index 54d5d41..a923c14 100644 > --- a/cryptlib.c > +++ b/cryptlib.c > @@ -217,7 +217,7 @@ ssize_t cryptodev_cipher_encrypt(struct cipher_data > *cdata, > { > int ret; > > - INIT_COMPLETION(cdata->async.result->completion); > + reinit_completion(&cdata->async.result->completion);
Wouldn't it be better to conditionally define INIT_COMPLETION to reinit_completion for newer kernels? Doesn't this break downwards compatibility? I could think of something like: #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)) # define INIT_COMPLETION(x) reinit_completion(%(x)) #endif Greetings, Phil _______________________________________________ Cryptodev-linux-devel mailing list Cryptodev-linux-devel@gna.org https://mail.gna.org/listinfo/cryptodev-linux-devel