From: Joe Perches <joe@perches.com>
To: jorge@dti2.net
Cc: netdev@vger.kernel.org, linux-ppp@vger.kernel.org
Subject: Re: [RFC PATCH v2 3/4] ppp_mppe: cleanup kernel log messages
Date: Tue, 21 May 2013 11:40:26 -0700 [thread overview]
Message-ID: <1369161626.2143.45.camel@joe-AO722> (raw)
In-Reply-To: <1369160304-31967-3-git-send-email-jorge@dti2.net>
On Tue, 2013-05-21 at 20:18 +0200, Jorge Boncompte [DTI2] wrote:
> From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
>
> - Consolidate log messages, print PPP unit number where available.
> - Changes error or warning messages to correct log level.
> - Use _ratelimited() functions for messages triggered by network packets.
[]
> diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp/ppp_mppe.c
[]
> @@ -178,7 +178,8 @@ static void mppe_rekey(struct ppp_mppe_state * state, int initial_key)
> setup_sg(sg_out, state->session_key, state->keylen);
> if (crypto_blkcipher_encrypt(&desc, sg_out, sg_in,
> state->keylen) != 0) {
> - printk(KERN_WARNING "mppe_rekey: cipher_encrypt failed\n");
> + net_warn_ratelimited("%s[%d]: crypto_blkcipher_encrypt "
> + "failed\n", __func__, state->unit);
Please don't split formats across multiple lines.
net_warn_ratelimited("%s[%d]: crypto_blkcipher_encrypt failed\n",
__func__, state->unit);
is just fine.
> @@ -314,8 +314,7 @@ mppe_init(void *arg, unsigned char *options, int optlen, int unit, int debug,
> sprintf(mkey + i * 2, "%02x", state->master_key[i]);
> for (i = 0; i < sizeof(state->session_key); i++)
> sprintf(skey + i * 2, "%02x", state->session_key[i]);
> - printk(KERN_DEBUG
> - "%s[%d]: keys: master: %s initial session: %s\n",
> + printk(KERN_DEBUG "%s[%d]: keys: master: %s initial session: %s\n",
> debugstr, unit, mkey, skey);
this could probably use:
%*ph, (int)sizeof(state->session_key), state->session_key
> }
>
> @@ -387,9 +386,9 @@ mppe_compress(void *arg, unsigned char *ibuf, unsigned char *obuf,
[]
> + net_err_ratelimited("%s[%d]: osize too small! "
> + "(have: %d need: %d)\n", __func__,
> + state->unit, osize, isize + MPPE_OVHD + 2);
another split format, please coalesce.
etc...
next prev parent reply other threads:[~2013-05-21 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 18:18 [RFC PATCH v2 1/4] ppp: adds new error for decompressors to signal that packet must be dropped Jorge Boncompte [DTI2]
2013-05-21 18:18 ` [RFC PATCH v2 2/4] ppp_mppe: check coherency counter for out-of-order sequencing Jorge Boncompte [DTI2]
2013-05-21 18:36 ` Eric Dumazet
2013-05-21 18:40 ` Sergei Shtylyov
2013-05-21 18:18 ` [RFC PATCH v2 3/4] ppp_mppe: cleanup kernel log messages Jorge Boncompte [DTI2]
2013-05-21 18:40 ` Joe Perches [this message]
2013-05-21 18:18 ` [RFC PATCH v2 4/4] ppp_mppe: style cleanup Jorge Boncompte [DTI2]
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=1369161626.2143.45.camel@joe-AO722 \
--to=joe@perches.com \
--cc=jorge@dti2.net \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@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).