Commit 8f904ade authored by Thorsten Blum's avatar Thorsten Blum Committed by Herbert Xu
Browse files

crypto: fips - Use str_enabled_disabled() helper in fips_enable()



Remove hard-coded strings by using the str_enabled_disabled() helper
function.

Use pr_info() instead of printk(KERN_INFO) to silence a checkpatch
warning.

Signed-off-by: default avatarThorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4ebd9a5c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/sysctl.h>
#include <linux/notifier.h>
#include <linux/string_choices.h>
#include <generated/utsrelease.h>

int fips_enabled;
@@ -24,8 +25,7 @@ EXPORT_SYMBOL_GPL(fips_fail_notif_chain);
static int fips_enable(char *str)
{
	fips_enabled = !!simple_strtol(str, NULL, 0);
	printk(KERN_INFO "fips mode: %s\n",
		fips_enabled ? "enabled" : "disabled");
	pr_info("fips mode: %s\n", str_enabled_disabled(fips_enabled));
	return 1;
}