All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org
Subject: [bug report] crypto: aspeed/hash - Add fallback
Date: Wed, 25 Jun 2025 10:21:47 -0500	[thread overview]
Message-ID: <685c140c.050a0220.552db.dab5@mx.google.com> (raw)

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

                 reply	other threads:[~2025-06-25 15:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=685c140c.050a0220.552db.dab5@mx.google.com \
    --to=dan.carpenter@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.