Skip to content

Commit 1fd19fb

Browse files
committed
crypto: drivers - Use str_enable_disable-like helpers [partial]
JIRA: https://issues.redhat.com/browse/RHEL-74336 Upstream Status: merged into the linux.git Conflicts: limited to drivers/crypto/marvell/octeontx2 commit f0f1fd1 Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Date: Tue Jan 14 20:05:01 2025 +0100 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> Signed-off-by: Vladis Dronov <vdronov@redhat.com>
1 parent 2350450 commit 1fd19fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <linux/ctype.h>
55
#include <linux/firmware.h>
6+
#include <linux/string_choices.h>
67
#include "otx2_cptpf_ucode.h"
78
#include "otx2_cpt_common.h"
89
#include "otx2_cptpf.h"
@@ -1835,7 +1836,7 @@ void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf)
18351836
for (i = 0; i < OTX2_CPT_MAX_ENGINE_GROUPS; i++) {
18361837
grp = &eng_grps->grp[i];
18371838
pr_debug("engine_group%d, state %s", i,
1838-
grp->is_enabled ? "enabled" : "disabled");
1839+
str_enabled_disabled(grp->is_enabled));
18391840
if (grp->is_enabled) {
18401841
mirrored_grp = &eng_grps->grp[grp->mirror.idx];
18411842
pr_debug("Ucode0 filename %s, version %s",

0 commit comments

Comments
 (0)