* [bug report] crypto: aspeed/hash - Add fallback
@ 2025-06-25 15:21 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2025-06-25 15:21 UTC (permalink / raw)
To: herbert; +Cc: linux-crypto
Hello Herbert Xu,
The patch 508712228696: "crypto: aspeed/hash - Add fallback" from May
13, 2025, leads to the following static checker warning:
drivers/crypto/aspeed/aspeed-hace-hash.c:453 aspeed_ahash_fallback()
warn: inconsistent indenting
drivers/crypto/aspeed/aspeed-hace-hash.c
433 static noinline int aspeed_ahash_fallback(struct ahash_request *req)
434 {
435 struct aspeed_sham_reqctx *rctx = ahash_request_ctx(req);
436 HASH_FBREQ_ON_STACK(fbreq, req);
437 u8 *state = rctx->buffer;
438 struct scatterlist sg[2];
439 struct scatterlist *ssg;
440 int ret;
441
442 ssg = scatterwalk_ffwd(sg, req->src, rctx->offset);
443 ahash_request_set_crypt(fbreq, ssg, req->result,
444 rctx->total - rctx->offset);
445
446 ret = aspeed_sham_export(req, state) ?:
447 crypto_ahash_import_core(fbreq, state);
448
449 if (rctx->flags & SHA_FLAGS_FINUP)
450 ret = ret ?: crypto_ahash_finup(fbreq);
451 else
452 ret = ret ?: crypto_ahash_update(fbreq);
--> 453 crypto_ahash_export_core(fbreq, state) ?:
454 aspeed_sham_import(req, state);
I guess this should be something like?
ret = ret ?: crypto_ahash_export_core(fbreq, state);
ret = ret ?: aspeed_sham_import(req, state);
455 HASH_REQUEST_ZERO(fbreq);
456 return ret;
457 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-25 15:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25 15:21 [bug report] crypto: aspeed/hash - Add fallback Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.