mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: drivers - Use str_enable_disable-like helpers
Replace ternary (condition ? "enable" : "disable") syntax with helpers from string_choices.h because: 1. Simple function call with one argument is easier to read. Ternary operator has three arguments and with wrapping might lead to quite long code. 2. Is slightly shorter thus also easier to read. 3. It brings uniformity in the text - same string. 4. Allows deduping by the linker, which results in a smaller binary file. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> # QAT Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
af324dc0e2
commit
f0f1fd11d9
@@ -19,6 +19,7 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/fsl/mc.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string_choices.h>
|
||||
#include <soc/fsl/dpaa2-io.h>
|
||||
#include <soc/fsl/dpaa2-fd.h>
|
||||
#include <crypto/xts.h>
|
||||
@@ -5175,7 +5176,7 @@ static int __cold dpaa2_dpseci_disable(struct dpaa2_caam_priv *priv)
|
||||
return err;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "disable: %s\n", enabled ? "false" : "true");
|
||||
dev_dbg(dev, "disable: %s\n", str_false_true(enabled));
|
||||
|
||||
for (i = 0; i < priv->num_pairs; i++) {
|
||||
ppriv = per_cpu_ptr(priv->ppriv, i);
|
||||
|
||||
Reference in New Issue
Block a user