netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Sowden <jeremy@azazel.net>
To: Jan Engelhardt <jengelh@inai.de>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [PATCH xtables-addons v2 12/13] pknock: xt_pknock: use `pr_err`.
Date: Sun, 25 Oct 2020 13:15:58 +0000	[thread overview]
Message-ID: <20201025131559.920038-14-jeremy@azazel.net> (raw)
In-Reply-To: <20201025131559.920038-1-jeremy@azazel.net>

Replace some instances of `printk(KERN_ERR PKNOCK ...)`.  We define
`pr_fmt`, so `pr_err` is equivalent.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
 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


  parent reply	other threads:[~2020-10-25 13:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-25 13:15 [PATCH xtables-addons v2 00/13] pknlusr improvements Jeremy Sowden
2020-10-25 13:15 ` Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 01/13] pknock: pknlusr: ensure man-page is included by `make dist` Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 02/13] pknock: pknlusr: remove dest_addr and rename src_addr Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 03/13] pknock: pknlusr: tighten up variable scopes Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 04/13] pknock: pknlusr: tidy up initialization of local address Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 05/13] pknock: pknlusr: use NLMSG macros and proper types, rather than arithmetic on char pointers Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 06/13] pknock: pknlusr: use macro to define inet_ntop buffer size Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 07/13] pknock: pknlusr: don't treat recv return value of zero as an error Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 08/13] pknock: pknlusr: always close socket Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 09/13] pknock: pknlusr: fix hard-coded netlink multicast group ID Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 10/13] pknock: xt_pknock: use IS_ENABLED Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 11/13] pknock: xt_pknock: use kzalloc Jeremy Sowden
2020-10-25 13:15 ` Jeremy Sowden [this message]
2020-10-25 13:15 ` [PATCH xtables-addons v2 13/13] pknock: xt_pknock: remove DEBUG definition and disable debug output Jeremy Sowden
2020-10-25 14:18 ` [PATCH xtables-addons v2 00/13] pknlusr improvements Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201025131559.920038-14-jeremy@azazel.net \
    --to=jeremy@azazel.net \
    --cc=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).