From: Salah Triki <salah.triki@gmail.com>
To: haren@us.ibm.com, mpe@ellerman.id.au, benh@kernel.crashing.org,
paulus@samba.org, herbert@gondor.apana.org.au,
davem@davemloft.net
Cc: linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] replace if with min
Date: Mon, 12 Jul 2021 21:45:46 +0100 [thread overview]
Message-ID: <20210712204546.GA1492390@pc> (raw)
Replace if with min in order to make code more clean.
Signed-off-by: Salah Triki <salah.triki@gmail.com>
---
drivers/crypto/nx/nx-842.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c
index 2ab90ec10e61..0d1d5a463899 100644
--- a/drivers/crypto/nx/nx-842.c
+++ b/drivers/crypto/nx/nx-842.c
@@ -134,8 +134,7 @@ EXPORT_SYMBOL_GPL(nx842_crypto_exit);
static void check_constraints(struct nx842_constraints *c)
{
/* limit maximum, to always have enough bounce buffer to decompress */
- if (c->maximum > BOUNCE_BUFFER_SIZE)
- c->maximum = BOUNCE_BUFFER_SIZE;
+ c->maximum = min(c->maximum, BOUNCE_BUFFER_SIZE);
}
static int nx842_crypto_add_header(struct nx842_crypto_header *hdr, u8 *buf)
--
2.25.1
next reply other threads:[~2021-07-12 23:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 20:45 Salah Triki [this message]
2021-07-19 16:12 ` [PATCH] replace if with min Christophe Leroy
2021-07-19 17:04 ` Segher Boessenkool
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=20210712204546.GA1492390@pc \
--to=salah.triki@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=haren@us.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).