Replace some instances of `printk(KERN_ERR PKNOCK ...)`. We define `pr_fmt`, so `pr_err` is equivalent. Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx> --- extensions/pknock/xt_pknock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c index ae3ab2445c3b..f2c79529e21b 100644 --- a/extensions/pknock/xt_pknock.c +++ b/extensions/pknock/xt_pknock.c @@ -1016,7 +1016,7 @@ out: return ret; } -#define RETURN_ERR(err) do { printk(KERN_ERR PKNOCK err); return -EINVAL; } while (false) +#define RETURN_ERR(err) do { pr_err(err); return -EINVAL; } while (false) static int pknock_mt_check(const struct xt_mtchk_param *par) { @@ -1103,14 +1103,14 @@ static int __init xt_pknock_mt_init(void) if (gc_expir_time < DEFAULT_GC_EXPIRATION_TIME) gc_expir_time = DEFAULT_GC_EXPIRATION_TIME; if (request_module(crypto.algo) < 0) { - printk(KERN_ERR PKNOCK "request_module('%s') error.\n", + pr_err("request_module('%s') error.\n", crypto.algo); return -ENXIO; } crypto.tfm = crypto_alloc_shash(crypto.algo, 0, 0); if (IS_ERR(crypto.tfm)) { - printk(KERN_ERR PKNOCK "failed to load transform for %s\n", + pr_err("failed to load transform for %s\n", crypto.algo); return PTR_ERR(crypto.tfm); } @@ -1120,7 +1120,7 @@ static int __init xt_pknock_mt_init(void) pde = proc_mkdir("xt_pknock", init_net.proc_net); if (pde == NULL) { - printk(KERN_ERR PKNOCK "proc_mkdir() error in _init().\n"); + pr_err("proc_mkdir() error in _init().\n"); return -ENXIO; } return xt_register_match(&xt_pknock_mt_reg); -- 2.28.0