Signed-off-by: Kuninori Morimoto <[email protected]>
---
 drivers/crypto/nx/nx-common-pseries.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/nx/nx-common-pseries.c 
b/drivers/crypto/nx/nx-common-pseries.c
index 1660c5cf3641..1f8a73fb6bdd 100644
--- a/drivers/crypto/nx/nx-common-pseries.c
+++ b/drivers/crypto/nx/nx-common-pseries.c
@@ -7,6 +7,7 @@
  * Authors: Robert Jennings <[email protected]>
  *          Seth Jennings <[email protected]>
  */
+#include <linux/string_choices.h>
 
 #include <asm/vio.h>
 #include <asm/hvcall.h>
@@ -55,13 +56,13 @@ static int check_constraints(unsigned long buf, unsigned 
int *len, bool in)
 {
        if (!IS_ALIGNED(buf, nx842_pseries_constraints.alignment)) {
                pr_debug("%s buffer 0x%lx not aligned to 0x%x\n",
-                        in ? "input" : "output", buf,
+                        str_input_output(in), buf,
                         nx842_pseries_constraints.alignment);
                return -EINVAL;
        }
        if (*len % nx842_pseries_constraints.multiple) {
                pr_debug("%s buffer len 0x%x not multiple of 0x%x\n",
-                        in ? "input" : "output", *len,
+                        str_input_output(in), *len,
                         nx842_pseries_constraints.multiple);
                if (in)
                        return -EINVAL;
@@ -69,13 +70,13 @@ static int check_constraints(unsigned long buf, unsigned 
int *len, bool in)
        }
        if (*len < nx842_pseries_constraints.minimum) {
                pr_debug("%s buffer len 0x%x under minimum 0x%x\n",
-                        in ? "input" : "output", *len,
+                        str_input_output(in), *len,
                         nx842_pseries_constraints.minimum);
                return -EINVAL;
        }
        if (*len > nx842_pseries_constraints.maximum) {
                pr_debug("%s buffer len 0x%x over maximum 0x%x\n",
-                        in ? "input" : "output", *len,
+                        str_input_output(in), *len,
                         nx842_pseries_constraints.maximum);
                if (in)
                        return -EINVAL;
-- 
2.43.0


Reply via email to