Message ID | 20240812104235.6eefb365@canb.auug.org.au (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | linux-next: build failure after merge of the crypto tree | expand |
On Mon, Aug 12, 2024 at 10:42:35AM +1000, Stephen Rothwell wrote: > > From: Stephen Rothwell <sfr@canb.auug.org.au> > Date: Mon, 12 Aug 2024 10:36:30 +1000 > Subject: [PATCH] fixup for "crypto: spacc - Add SPAcc Skcipher support" > > interacting with commit > > 1a251f52cfdc ("minmax: make generic MIN() and MAX() macros available everywhere") > > from Linus' tree. > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> > --- > drivers/crypto/dwc-spacc/spacc_manager.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Thanks Stephen. I've applied your patch but I kept the macro but added an ifndef MIN around it. This way it should work either with or without Linus's patch. Cheers,
Hi Herbert, On Tue, 13 Aug 2024 12:16:55 +0800 Herbert Xu <herbert@gondor.apana.org.au> wrote: > > Thanks Stephen. I've applied your patch but I kept the macro but > added an ifndef MIN around it. This way it should work either with > or without Linus's patch. Good idea. Thanks, one less thing for me to carry.
diff --git a/drivers/crypto/dwc-spacc/spacc_manager.c b/drivers/crypto/dwc-spacc/spacc_manager.c index 3b26b27a998f..67c4360334e2 100644 --- a/drivers/crypto/dwc-spacc/spacc_manager.c +++ b/drivers/crypto/dwc-spacc/spacc_manager.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 +#include <linux/minmax.h> #include "spacc_core.h" -#define MIN(x, y) (((x) < (y)) ? (x) : (y)) - /* prevent reading past the end of the buffer */ static void read_from_buf(unsigned char *dst, unsigned char *src, int off, int n, int max)