* [PATCH net-next 1/5] atm: Convert pr_warning to pr_warn
2014-09-10 4:17 [PATCH net-next 0/5] net: Convert pr_warning to pr_warn Joe Perches
@ 2014-09-10 4:17 ` Joe Perches
2014-09-10 4:17 ` [PATCH net-next 2/5] ceph: " Joe Perches
` (4 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Joe Perches @ 2014-09-10 4:17 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, linux-kernel
Use the more common pr_warn.
Signed-off-by: Joe Perches <joe@perches.com>
---
net/atm/clip.c | 4 ++--
net/atm/common.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 4633904..1d9eaa4 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -384,7 +384,7 @@ static netdev_tx_t clip_start_xmit(struct sk_buff *skb,
pr_debug("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, vcc, vcc->dev);
old = xchg(&entry->vccs->xoff, 1); /* assume XOFF ... */
if (old) {
- pr_warning("XOFF->XOFF transition\n");
+ pr_warn("XOFF->XOFF transition\n");
goto out_release_neigh;
}
dev->stats.tx_packets++;
@@ -447,7 +447,7 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip)
struct rtable *rt;
if (vcc->push != clip_push) {
- pr_warning("non-CLIP VCC\n");
+ pr_warn("non-CLIP VCC\n");
return -EBADF;
}
clip_vcc = CLIP_VCC(vcc);
diff --git a/net/atm/common.c b/net/atm/common.c
index 7b49100..6a76515 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -300,7 +300,7 @@ static int adjust_tp(struct atm_trafprm *tp, unsigned char aal)
max_sdu = ATM_MAX_AAL34_PDU;
break;
default:
- pr_warning("AAL problems ... (%d)\n", aal);
+ pr_warn("AAL problems ... (%d)\n", aal);
/* fall through */
case ATM_AAL5:
max_sdu = ATM_MAX_AAL5_PDU;
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH net-next 2/5] ceph: Convert pr_warning to pr_warn
2014-09-10 4:17 [PATCH net-next 0/5] net: Convert pr_warning to pr_warn Joe Perches
2014-09-10 4:17 ` [PATCH net-next 1/5] atm: " Joe Perches
@ 2014-09-10 4:17 ` Joe Perches
2014-09-10 12:30 ` Ilya Dryomov
2014-09-10 12:38 ` Ilya Dryomov
2014-09-10 4:17 ` [PATCH net-next 3/5] pktgen: " Joe Perches
` (3 subsequent siblings)
5 siblings, 2 replies; 12+ messages in thread
From: Joe Perches @ 2014-09-10 4:17 UTC (permalink / raw)
To: netdev; +Cc: Sage Weil, David S. Miller, ceph-devel, linux-kernel
Use the more common pr_warn.
Other miscellanea:
o Coalesce formats
o Realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
---
net/ceph/ceph_common.c | 15 +++++++++------
net/ceph/messenger.c | 19 ++++++++++---------
net/ceph/osd_client.c | 15 +++++++--------
net/ceph/osdmap.c | 20 ++++++++++----------
4 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index 1675021..58fbfe1 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -293,17 +293,20 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) {
key_err = PTR_ERR(ukey);
switch (key_err) {
case -ENOKEY:
- pr_warning("ceph: Mount failed due to key not found: %s\n", name);
+ pr_warn("ceph: Mount failed due to key not found: %s\n",
+ name);
break;
case -EKEYEXPIRED:
- pr_warning("ceph: Mount failed due to expired key: %s\n", name);
+ pr_warn("ceph: Mount failed due to expired key: %s\n",
+ name);
break;
case -EKEYREVOKED:
- pr_warning("ceph: Mount failed due to revoked key: %s\n", name);
+ pr_warn("ceph: Mount failed due to revoked key: %s\n",
+ name);
break;
default:
- pr_warning("ceph: Mount failed due to unknown key error"
- " %d: %s\n", key_err, name);
+ pr_warn("ceph: Mount failed due to unknown key error %d: %s\n",
+ key_err, name);
}
err = -EPERM;
goto out;
@@ -433,7 +436,7 @@ ceph_parse_options(char *options, const char *dev_name,
/* misc */
case Opt_osdtimeout:
- pr_warning("ignoring deprecated osdtimeout option\n");
+ pr_warn("ignoring deprecated osdtimeout option\n");
break;
case Opt_osdkeepalivetimeout:
opt->osd_keepalive_timeout = intval;
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index b2f571d..a7203be 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1937,11 +1937,11 @@ static int process_banner(struct ceph_connection *con)
sizeof(con->peer_addr)) != 0 &&
!(addr_is_blank(&con->actual_peer_addr.in_addr) &&
con->actual_peer_addr.nonce == con->peer_addr.nonce)) {
- pr_warning("wrong peer, want %s/%d, got %s/%d\n",
- ceph_pr_addr(&con->peer_addr.in_addr),
- (int)le32_to_cpu(con->peer_addr.nonce),
- ceph_pr_addr(&con->actual_peer_addr.in_addr),
- (int)le32_to_cpu(con->actual_peer_addr.nonce));
+ pr_warn("wrong peer, want %s/%d, got %s/%d\n",
+ ceph_pr_addr(&con->peer_addr.in_addr),
+ (int)le32_to_cpu(con->peer_addr.nonce),
+ ceph_pr_addr(&con->actual_peer_addr.in_addr),
+ (int)le32_to_cpu(con->actual_peer_addr.nonce));
con->error_msg = "wrong peer at address";
return -1;
}
@@ -2302,7 +2302,7 @@ static int read_partial_message(struct ceph_connection *con)
BUG_ON(!con->in_msg ^ skip);
if (con->in_msg && data_len > con->in_msg->data_length) {
- pr_warning("%s skipping long message (%u > %zd)\n",
+ pr_warn("%s skipping long message (%u > %zd)\n",
__func__, data_len, con->in_msg->data_length);
ceph_msg_put(con->in_msg);
con->in_msg = NULL;
@@ -2712,7 +2712,7 @@ static bool con_sock_closed(struct ceph_connection *con)
CASE(OPEN);
CASE(STANDBY);
default:
- pr_warning("%s con %p unrecognized state %lu\n",
+ pr_warn("%s con %p unrecognized state %lu\n",
__func__, con, con->state);
con->error_msg = "unrecognized con state";
BUG();
@@ -2828,8 +2828,9 @@ static void con_work(struct work_struct *work)
*/
static void con_fault(struct ceph_connection *con)
{
- pr_warning("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
- ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
+ pr_warn("%s%lld %s %s\n",
+ ENTITY_NAME(con->peer_name),
+ ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
dout("fault %p state %lu to peer %s\n",
con, con->state, ceph_pr_addr(&con->peer_addr.in_addr));
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 30f6faf..8ebb748 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1774,8 +1774,8 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
}
bytes = le32_to_cpu(msg->hdr.data_len);
if (payload_len != bytes) {
- pr_warning("sum of op payload lens %d != data_len %d",
- payload_len, bytes);
+ pr_warn("sum of op payload lens %d != data_len %d\n",
+ payload_len, bytes);
goto bad_put;
}
@@ -2797,10 +2797,10 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
ceph_msg_revoke_incoming(req->r_reply);
if (front_len > req->r_reply->front_alloc_len) {
- pr_warning("get_reply front %d > preallocated %d (%u#%llu)\n",
- front_len, req->r_reply->front_alloc_len,
- (unsigned int)con->peer_name.type,
- le64_to_cpu(con->peer_name.num));
+ pr_warn("get_reply front %d > preallocated %d (%u#%llu)\n",
+ front_len, req->r_reply->front_alloc_len,
+ (unsigned int)con->peer_name.type,
+ le64_to_cpu(con->peer_name.num));
m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front_len, GFP_NOFS,
false);
if (!m)
@@ -2823,8 +2823,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
if (osd_data->pages &&
unlikely(osd_data->length < data_len)) {
- pr_warning("tid %lld reply has %d bytes "
- "we had only %llu bytes ready\n",
+ pr_warn("tid %lld reply has %d bytes we had only %llu bytes ready\n",
tid, data_len, osd_data->length);
*skip = 1;
ceph_msg_put(m);
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index c547e46..ae5a507 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -521,11 +521,11 @@ static int decode_pool(void **p, void *end, struct ceph_pg_pool_info *pi)
ev = ceph_decode_8(p); /* encoding version */
cv = ceph_decode_8(p); /* compat version */
if (ev < 5) {
- pr_warning("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
+ pr_warn("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
return -EINVAL;
}
if (cv > 9) {
- pr_warning("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
+ pr_warn("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
return -EINVAL;
}
len = ceph_decode_32(p);
@@ -729,9 +729,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
ceph_decode_8_safe(p, end, struct_compat, e_inval);
if (struct_compat > OSDMAP_WRAPPER_COMPAT_VER) {
- pr_warning("got v %d cv %d > %d of %s ceph_osdmap\n",
- struct_v, struct_compat,
- OSDMAP_WRAPPER_COMPAT_VER, prefix);
+ pr_warn("got v %d cv %d > %d of %s ceph_osdmap\n",
+ struct_v, struct_compat,
+ OSDMAP_WRAPPER_COMPAT_VER, prefix);
return -EINVAL;
}
*p += 4; /* ignore wrapper struct_len */
@@ -739,9 +739,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
ceph_decode_8_safe(p, end, struct_v, e_inval);
ceph_decode_8_safe(p, end, struct_compat, e_inval);
if (struct_compat > OSDMAP_CLIENT_DATA_COMPAT_VER) {
- pr_warning("got v %d cv %d > %d of %s ceph_osdmap client data\n",
- struct_v, struct_compat,
- OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
+ pr_warn("got v %d cv %d > %d of %s ceph_osdmap client data\n",
+ struct_v, struct_compat,
+ OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
return -EINVAL;
}
*p += 4; /* ignore client data struct_len */
@@ -751,8 +751,8 @@ static int get_osdmap_client_data_v(void **p, void *end,
*p -= 1;
ceph_decode_16_safe(p, end, version, e_inval);
if (version < 6) {
- pr_warning("got v %d < 6 of %s ceph_osdmap\n", version,
- prefix);
+ pr_warn("got v %d < 6 of %s ceph_osdmap\n",
+ version, prefix);
return -EINVAL;
}
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH net-next 2/5] ceph: Convert pr_warning to pr_warn
2014-09-10 4:17 ` [PATCH net-next 2/5] ceph: " Joe Perches
@ 2014-09-10 12:30 ` Ilya Dryomov
2014-09-10 14:41 ` Ilya Dryomov
2014-09-10 12:38 ` Ilya Dryomov
1 sibling, 1 reply; 12+ messages in thread
From: Ilya Dryomov @ 2014-09-10 12:30 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, Sage Weil, David S. Miller, Ceph Development,
Linux Kernel Mailing List
On Wed, Sep 10, 2014 at 8:17 AM, Joe Perches <joe@perches.com> wrote:
> Use the more common pr_warn.
>
> Other miscellanea:
>
> o Coalesce formats
> o Realign arguments
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> net/ceph/ceph_common.c | 15 +++++++++------
> net/ceph/messenger.c | 19 ++++++++++---------
> net/ceph/osd_client.c | 15 +++++++--------
> net/ceph/osdmap.c | 20 ++++++++++----------
> 4 files changed, 36 insertions(+), 33 deletions(-)
>
> diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
> index 1675021..58fbfe1 100644
> --- a/net/ceph/ceph_common.c
> +++ b/net/ceph/ceph_common.c
> @@ -293,17 +293,20 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) {
> key_err = PTR_ERR(ukey);
> switch (key_err) {
> case -ENOKEY:
> - pr_warning("ceph: Mount failed due to key not found: %s\n", name);
> + pr_warn("ceph: Mount failed due to key not found: %s\n",
> + name);
> break;
> case -EKEYEXPIRED:
> - pr_warning("ceph: Mount failed due to expired key: %s\n", name);
> + pr_warn("ceph: Mount failed due to expired key: %s\n",
> + name);
> break;
> case -EKEYREVOKED:
> - pr_warning("ceph: Mount failed due to revoked key: %s\n", name);
> + pr_warn("ceph: Mount failed due to revoked key: %s\n",
> + name);
> break;
> default:
> - pr_warning("ceph: Mount failed due to unknown key error"
> - " %d: %s\n", key_err, name);
> + pr_warn("ceph: Mount failed due to unknown key error %d: %s\n",
> + key_err, name);
> }
> err = -EPERM;
> goto out;
> @@ -433,7 +436,7 @@ ceph_parse_options(char *options, const char *dev_name,
>
> /* misc */
> case Opt_osdtimeout:
> - pr_warning("ignoring deprecated osdtimeout option\n");
> + pr_warn("ignoring deprecated osdtimeout option\n");
> break;
> case Opt_osdkeepalivetimeout:
> opt->osd_keepalive_timeout = intval;
> diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
> index b2f571d..a7203be 100644
> --- a/net/ceph/messenger.c
> +++ b/net/ceph/messenger.c
> @@ -1937,11 +1937,11 @@ static int process_banner(struct ceph_connection *con)
> sizeof(con->peer_addr)) != 0 &&
> !(addr_is_blank(&con->actual_peer_addr.in_addr) &&
> con->actual_peer_addr.nonce == con->peer_addr.nonce)) {
> - pr_warning("wrong peer, want %s/%d, got %s/%d\n",
> - ceph_pr_addr(&con->peer_addr.in_addr),
> - (int)le32_to_cpu(con->peer_addr.nonce),
> - ceph_pr_addr(&con->actual_peer_addr.in_addr),
> - (int)le32_to_cpu(con->actual_peer_addr.nonce));
> + pr_warn("wrong peer, want %s/%d, got %s/%d\n",
> + ceph_pr_addr(&con->peer_addr.in_addr),
> + (int)le32_to_cpu(con->peer_addr.nonce),
> + ceph_pr_addr(&con->actual_peer_addr.in_addr),
> + (int)le32_to_cpu(con->actual_peer_addr.nonce));
> con->error_msg = "wrong peer at address";
> return -1;
> }
> @@ -2302,7 +2302,7 @@ static int read_partial_message(struct ceph_connection *con)
>
> BUG_ON(!con->in_msg ^ skip);
> if (con->in_msg && data_len > con->in_msg->data_length) {
> - pr_warning("%s skipping long message (%u > %zd)\n",
> + pr_warn("%s skipping long message (%u > %zd)\n",
> __func__, data_len, con->in_msg->data_length);
> ceph_msg_put(con->in_msg);
> con->in_msg = NULL;
> @@ -2712,7 +2712,7 @@ static bool con_sock_closed(struct ceph_connection *con)
> CASE(OPEN);
> CASE(STANDBY);
> default:
> - pr_warning("%s con %p unrecognized state %lu\n",
> + pr_warn("%s con %p unrecognized state %lu\n",
> __func__, con, con->state);
> con->error_msg = "unrecognized con state";
> BUG();
> @@ -2828,8 +2828,9 @@ static void con_work(struct work_struct *work)
> */
> static void con_fault(struct ceph_connection *con)
> {
> - pr_warning("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
> - ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
> + pr_warn("%s%lld %s %s\n",
> + ENTITY_NAME(con->peer_name),
> + ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
> dout("fault %p state %lu to peer %s\n",
> con, con->state, ceph_pr_addr(&con->peer_addr.in_addr));
>
> diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
> index 30f6faf..8ebb748 100644
> --- a/net/ceph/osd_client.c
> +++ b/net/ceph/osd_client.c
> @@ -1774,8 +1774,8 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
> }
> bytes = le32_to_cpu(msg->hdr.data_len);
> if (payload_len != bytes) {
> - pr_warning("sum of op payload lens %d != data_len %d",
> - payload_len, bytes);
> + pr_warn("sum of op payload lens %d != data_len %d\n",
> + payload_len, bytes);
> goto bad_put;
> }
>
> @@ -2797,10 +2797,10 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
> ceph_msg_revoke_incoming(req->r_reply);
>
> if (front_len > req->r_reply->front_alloc_len) {
> - pr_warning("get_reply front %d > preallocated %d (%u#%llu)\n",
> - front_len, req->r_reply->front_alloc_len,
> - (unsigned int)con->peer_name.type,
> - le64_to_cpu(con->peer_name.num));
> + pr_warn("get_reply front %d > preallocated %d (%u#%llu)\n",
> + front_len, req->r_reply->front_alloc_len,
> + (unsigned int)con->peer_name.type,
> + le64_to_cpu(con->peer_name.num));
> m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front_len, GFP_NOFS,
> false);
> if (!m)
> @@ -2823,8 +2823,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
> if (osd_data->pages &&
> unlikely(osd_data->length < data_len)) {
>
> - pr_warning("tid %lld reply has %d bytes "
> - "we had only %llu bytes ready\n",
> + pr_warn("tid %lld reply has %d bytes we had only %llu bytes ready\n",
> tid, data_len, osd_data->length);
> *skip = 1;
> ceph_msg_put(m);
> diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
> index c547e46..ae5a507 100644
> --- a/net/ceph/osdmap.c
> +++ b/net/ceph/osdmap.c
> @@ -521,11 +521,11 @@ static int decode_pool(void **p, void *end, struct ceph_pg_pool_info *pi)
> ev = ceph_decode_8(p); /* encoding version */
> cv = ceph_decode_8(p); /* compat version */
> if (ev < 5) {
> - pr_warning("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
> + pr_warn("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
> return -EINVAL;
> }
> if (cv > 9) {
> - pr_warning("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
> + pr_warn("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
> return -EINVAL;
> }
> len = ceph_decode_32(p);
> @@ -729,9 +729,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
>
> ceph_decode_8_safe(p, end, struct_compat, e_inval);
> if (struct_compat > OSDMAP_WRAPPER_COMPAT_VER) {
> - pr_warning("got v %d cv %d > %d of %s ceph_osdmap\n",
> - struct_v, struct_compat,
> - OSDMAP_WRAPPER_COMPAT_VER, prefix);
> + pr_warn("got v %d cv %d > %d of %s ceph_osdmap\n",
> + struct_v, struct_compat,
> + OSDMAP_WRAPPER_COMPAT_VER, prefix);
> return -EINVAL;
> }
> *p += 4; /* ignore wrapper struct_len */
> @@ -739,9 +739,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
> ceph_decode_8_safe(p, end, struct_v, e_inval);
> ceph_decode_8_safe(p, end, struct_compat, e_inval);
> if (struct_compat > OSDMAP_CLIENT_DATA_COMPAT_VER) {
> - pr_warning("got v %d cv %d > %d of %s ceph_osdmap client data\n",
> - struct_v, struct_compat,
> - OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
> + pr_warn("got v %d cv %d > %d of %s ceph_osdmap client data\n",
> + struct_v, struct_compat,
> + OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
> return -EINVAL;
> }
> *p += 4; /* ignore client data struct_len */
> @@ -751,8 +751,8 @@ static int get_osdmap_client_data_v(void **p, void *end,
> *p -= 1;
> ceph_decode_16_safe(p, end, version, e_inval);
> if (version < 6) {
> - pr_warning("got v %d < 6 of %s ceph_osdmap\n", version,
> - prefix);
> + pr_warn("got v %d < 6 of %s ceph_osdmap\n",
> + version, prefix);
> return -EINVAL;
> }
>
> --
> 1.8.1.2.459.gbcd45b4.dirty
Looks good. I'll take it though ceph tree to avoid possible conflicts?
Thanks,
Ilya
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH net-next 2/5] ceph: Convert pr_warning to pr_warn
2014-09-10 12:30 ` Ilya Dryomov
@ 2014-09-10 14:41 ` Ilya Dryomov
0 siblings, 0 replies; 12+ messages in thread
From: Ilya Dryomov @ 2014-09-10 14:41 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, Sage Weil, David S. Miller, Ceph Development,
Linux Kernel Mailing List
On Wed, Sep 10, 2014 at 4:30 PM, Ilya Dryomov <ilya.dryomov@inktank.com> wrote:
> On Wed, Sep 10, 2014 at 8:17 AM, Joe Perches <joe@perches.com> wrote:
>> Use the more common pr_warn.
>>
>> Other miscellanea:
>>
>> o Coalesce formats
>> o Realign arguments
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>> ---
>> net/ceph/ceph_common.c | 15 +++++++++------
>> net/ceph/messenger.c | 19 ++++++++++---------
>> net/ceph/osd_client.c | 15 +++++++--------
>> net/ceph/osdmap.c | 20 ++++++++++----------
>> 4 files changed, 36 insertions(+), 33 deletions(-)
>>
>> diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
>> index 1675021..58fbfe1 100644
>> --- a/net/ceph/ceph_common.c
>> +++ b/net/ceph/ceph_common.c
>> @@ -293,17 +293,20 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) {
>> key_err = PTR_ERR(ukey);
>> switch (key_err) {
>> case -ENOKEY:
>> - pr_warning("ceph: Mount failed due to key not found: %s\n", name);
>> + pr_warn("ceph: Mount failed due to key not found: %s\n",
>> + name);
>> break;
>> case -EKEYEXPIRED:
>> - pr_warning("ceph: Mount failed due to expired key: %s\n", name);
>> + pr_warn("ceph: Mount failed due to expired key: %s\n",
>> + name);
>> break;
>> case -EKEYREVOKED:
>> - pr_warning("ceph: Mount failed due to revoked key: %s\n", name);
>> + pr_warn("ceph: Mount failed due to revoked key: %s\n",
>> + name);
>> break;
>> default:
>> - pr_warning("ceph: Mount failed due to unknown key error"
>> - " %d: %s\n", key_err, name);
>> + pr_warn("ceph: Mount failed due to unknown key error %d: %s\n",
>> + key_err, name);
>> }
>> err = -EPERM;
>> goto out;
>> @@ -433,7 +436,7 @@ ceph_parse_options(char *options, const char *dev_name,
>>
>> /* misc */
>> case Opt_osdtimeout:
>> - pr_warning("ignoring deprecated osdtimeout option\n");
>> + pr_warn("ignoring deprecated osdtimeout option\n");
>> break;
>> case Opt_osdkeepalivetimeout:
>> opt->osd_keepalive_timeout = intval;
>> diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
>> index b2f571d..a7203be 100644
>> --- a/net/ceph/messenger.c
>> +++ b/net/ceph/messenger.c
>> @@ -1937,11 +1937,11 @@ static int process_banner(struct ceph_connection *con)
>> sizeof(con->peer_addr)) != 0 &&
>> !(addr_is_blank(&con->actual_peer_addr.in_addr) &&
>> con->actual_peer_addr.nonce == con->peer_addr.nonce)) {
>> - pr_warning("wrong peer, want %s/%d, got %s/%d\n",
>> - ceph_pr_addr(&con->peer_addr.in_addr),
>> - (int)le32_to_cpu(con->peer_addr.nonce),
>> - ceph_pr_addr(&con->actual_peer_addr.in_addr),
>> - (int)le32_to_cpu(con->actual_peer_addr.nonce));
>> + pr_warn("wrong peer, want %s/%d, got %s/%d\n",
>> + ceph_pr_addr(&con->peer_addr.in_addr),
>> + (int)le32_to_cpu(con->peer_addr.nonce),
>> + ceph_pr_addr(&con->actual_peer_addr.in_addr),
>> + (int)le32_to_cpu(con->actual_peer_addr.nonce));
>> con->error_msg = "wrong peer at address";
>> return -1;
>> }
>> @@ -2302,7 +2302,7 @@ static int read_partial_message(struct ceph_connection *con)
>>
>> BUG_ON(!con->in_msg ^ skip);
>> if (con->in_msg && data_len > con->in_msg->data_length) {
>> - pr_warning("%s skipping long message (%u > %zd)\n",
>> + pr_warn("%s skipping long message (%u > %zd)\n",
>> __func__, data_len, con->in_msg->data_length);
>> ceph_msg_put(con->in_msg);
>> con->in_msg = NULL;
>> @@ -2712,7 +2712,7 @@ static bool con_sock_closed(struct ceph_connection *con)
>> CASE(OPEN);
>> CASE(STANDBY);
>> default:
>> - pr_warning("%s con %p unrecognized state %lu\n",
>> + pr_warn("%s con %p unrecognized state %lu\n",
>> __func__, con, con->state);
>> con->error_msg = "unrecognized con state";
>> BUG();
>> @@ -2828,8 +2828,9 @@ static void con_work(struct work_struct *work)
>> */
>> static void con_fault(struct ceph_connection *con)
>> {
>> - pr_warning("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
>> - ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
>> + pr_warn("%s%lld %s %s\n",
>> + ENTITY_NAME(con->peer_name),
>> + ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
>> dout("fault %p state %lu to peer %s\n",
>> con, con->state, ceph_pr_addr(&con->peer_addr.in_addr));
>>
>> diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
>> index 30f6faf..8ebb748 100644
>> --- a/net/ceph/osd_client.c
>> +++ b/net/ceph/osd_client.c
>> @@ -1774,8 +1774,8 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
>> }
>> bytes = le32_to_cpu(msg->hdr.data_len);
>> if (payload_len != bytes) {
>> - pr_warning("sum of op payload lens %d != data_len %d",
>> - payload_len, bytes);
>> + pr_warn("sum of op payload lens %d != data_len %d\n",
>> + payload_len, bytes);
>> goto bad_put;
>> }
>>
>> @@ -2797,10 +2797,10 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
>> ceph_msg_revoke_incoming(req->r_reply);
>>
>> if (front_len > req->r_reply->front_alloc_len) {
>> - pr_warning("get_reply front %d > preallocated %d (%u#%llu)\n",
>> - front_len, req->r_reply->front_alloc_len,
>> - (unsigned int)con->peer_name.type,
>> - le64_to_cpu(con->peer_name.num));
>> + pr_warn("get_reply front %d > preallocated %d (%u#%llu)\n",
>> + front_len, req->r_reply->front_alloc_len,
>> + (unsigned int)con->peer_name.type,
>> + le64_to_cpu(con->peer_name.num));
>> m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front_len, GFP_NOFS,
>> false);
>> if (!m)
>> @@ -2823,8 +2823,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
>> if (osd_data->pages &&
>> unlikely(osd_data->length < data_len)) {
>>
>> - pr_warning("tid %lld reply has %d bytes "
>> - "we had only %llu bytes ready\n",
>> + pr_warn("tid %lld reply has %d bytes we had only %llu bytes ready\n",
>> tid, data_len, osd_data->length);
>> *skip = 1;
>> ceph_msg_put(m);
>> diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
>> index c547e46..ae5a507 100644
>> --- a/net/ceph/osdmap.c
>> +++ b/net/ceph/osdmap.c
>> @@ -521,11 +521,11 @@ static int decode_pool(void **p, void *end, struct ceph_pg_pool_info *pi)
>> ev = ceph_decode_8(p); /* encoding version */
>> cv = ceph_decode_8(p); /* compat version */
>> if (ev < 5) {
>> - pr_warning("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
>> + pr_warn("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
>> return -EINVAL;
>> }
>> if (cv > 9) {
>> - pr_warning("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
>> + pr_warn("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
>> return -EINVAL;
>> }
>> len = ceph_decode_32(p);
>> @@ -729,9 +729,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
>>
>> ceph_decode_8_safe(p, end, struct_compat, e_inval);
>> if (struct_compat > OSDMAP_WRAPPER_COMPAT_VER) {
>> - pr_warning("got v %d cv %d > %d of %s ceph_osdmap\n",
>> - struct_v, struct_compat,
>> - OSDMAP_WRAPPER_COMPAT_VER, prefix);
>> + pr_warn("got v %d cv %d > %d of %s ceph_osdmap\n",
>> + struct_v, struct_compat,
>> + OSDMAP_WRAPPER_COMPAT_VER, prefix);
>> return -EINVAL;
>> }
>> *p += 4; /* ignore wrapper struct_len */
>> @@ -739,9 +739,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
>> ceph_decode_8_safe(p, end, struct_v, e_inval);
>> ceph_decode_8_safe(p, end, struct_compat, e_inval);
>> if (struct_compat > OSDMAP_CLIENT_DATA_COMPAT_VER) {
>> - pr_warning("got v %d cv %d > %d of %s ceph_osdmap client data\n",
>> - struct_v, struct_compat,
>> - OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
>> + pr_warn("got v %d cv %d > %d of %s ceph_osdmap client data\n",
>> + struct_v, struct_compat,
>> + OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
>> return -EINVAL;
>> }
>> *p += 4; /* ignore client data struct_len */
>> @@ -751,8 +751,8 @@ static int get_osdmap_client_data_v(void **p, void *end,
>> *p -= 1;
>> ceph_decode_16_safe(p, end, version, e_inval);
>> if (version < 6) {
>> - pr_warning("got v %d < 6 of %s ceph_osdmap\n", version,
>> - prefix);
>> + pr_warn("got v %d < 6 of %s ceph_osdmap\n",
>> + version, prefix);
>> return -EINVAL;
>> }
>>
>> --
>> 1.8.1.2.459.gbcd45b4.dirty
>
> Looks good. I'll take it though ceph tree to avoid possible conflicts?
Applied.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 2/5] ceph: Convert pr_warning to pr_warn
2014-09-10 4:17 ` [PATCH net-next 2/5] ceph: " Joe Perches
2014-09-10 12:30 ` Ilya Dryomov
@ 2014-09-10 12:38 ` Ilya Dryomov
2014-09-10 14:20 ` Joe Perches
1 sibling, 1 reply; 12+ messages in thread
From: Ilya Dryomov @ 2014-09-10 12:38 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, Sage Weil, David S. Miller, Ceph Development,
Linux Kernel Mailing List
On Wed, Sep 10, 2014 at 8:17 AM, Joe Perches <joe@perches.com> wrote:
> Use the more common pr_warn.
>
> Other miscellanea:
>
> o Coalesce formats
> o Realign arguments
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> net/ceph/ceph_common.c | 15 +++++++++------
> net/ceph/messenger.c | 19 ++++++++++---------
> net/ceph/osd_client.c | 15 +++++++--------
> net/ceph/osdmap.c | 20 ++++++++++----------
> 4 files changed, 36 insertions(+), 33 deletions(-)
>
> diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
> index 1675021..58fbfe1 100644
> --- a/net/ceph/ceph_common.c
> +++ b/net/ceph/ceph_common.c
> @@ -293,17 +293,20 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) {
> key_err = PTR_ERR(ukey);
> switch (key_err) {
> case -ENOKEY:
> - pr_warning("ceph: Mount failed due to key not found: %s\n", name);
> + pr_warn("ceph: Mount failed due to key not found: %s\n",
> + name);
> break;
> case -EKEYEXPIRED:
> - pr_warning("ceph: Mount failed due to expired key: %s\n", name);
> + pr_warn("ceph: Mount failed due to expired key: %s\n",
> + name);
> break;
> case -EKEYREVOKED:
> - pr_warning("ceph: Mount failed due to revoked key: %s\n", name);
> + pr_warn("ceph: Mount failed due to revoked key: %s\n",
> + name);
> break;
> default:
> - pr_warning("ceph: Mount failed due to unknown key error"
> - " %d: %s\n", key_err, name);
> + pr_warn("ceph: Mount failed due to unknown key error %d: %s\n",
> + key_err, name);
> }
> err = -EPERM;
> goto out;
> @@ -433,7 +436,7 @@ ceph_parse_options(char *options, const char *dev_name,
>
> /* misc */
> case Opt_osdtimeout:
> - pr_warning("ignoring deprecated osdtimeout option\n");
> + pr_warn("ignoring deprecated osdtimeout option\n");
> break;
> case Opt_osdkeepalivetimeout:
> opt->osd_keepalive_timeout = intval;
> diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
> index b2f571d..a7203be 100644
> --- a/net/ceph/messenger.c
> +++ b/net/ceph/messenger.c
> @@ -1937,11 +1937,11 @@ static int process_banner(struct ceph_connection *con)
> sizeof(con->peer_addr)) != 0 &&
> !(addr_is_blank(&con->actual_peer_addr.in_addr) &&
> con->actual_peer_addr.nonce == con->peer_addr.nonce)) {
> - pr_warning("wrong peer, want %s/%d, got %s/%d\n",
> - ceph_pr_addr(&con->peer_addr.in_addr),
> - (int)le32_to_cpu(con->peer_addr.nonce),
> - ceph_pr_addr(&con->actual_peer_addr.in_addr),
> - (int)le32_to_cpu(con->actual_peer_addr.nonce));
> + pr_warn("wrong peer, want %s/%d, got %s/%d\n",
> + ceph_pr_addr(&con->peer_addr.in_addr),
> + (int)le32_to_cpu(con->peer_addr.nonce),
> + ceph_pr_addr(&con->actual_peer_addr.in_addr),
> + (int)le32_to_cpu(con->actual_peer_addr.nonce));
> con->error_msg = "wrong peer at address";
> return -1;
> }
> @@ -2302,7 +2302,7 @@ static int read_partial_message(struct ceph_connection *con)
>
> BUG_ON(!con->in_msg ^ skip);
> if (con->in_msg && data_len > con->in_msg->data_length) {
> - pr_warning("%s skipping long message (%u > %zd)\n",
> + pr_warn("%s skipping long message (%u > %zd)\n",
> __func__, data_len, con->in_msg->data_length);
> ceph_msg_put(con->in_msg);
> con->in_msg = NULL;
> @@ -2712,7 +2712,7 @@ static bool con_sock_closed(struct ceph_connection *con)
> CASE(OPEN);
> CASE(STANDBY);
> default:
> - pr_warning("%s con %p unrecognized state %lu\n",
> + pr_warn("%s con %p unrecognized state %lu\n",
> __func__, con, con->state);
> con->error_msg = "unrecognized con state";
> BUG();
> @@ -2828,8 +2828,9 @@ static void con_work(struct work_struct *work)
> */
> static void con_fault(struct ceph_connection *con)
> {
> - pr_warning("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
> - ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
> + pr_warn("%s%lld %s %s\n",
> + ENTITY_NAME(con->peer_name),
> + ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
Just wondering, why did you move ENITITY_NAME argument to the next
line? I see you are doing this pretty consistently. Is this a style
guideline or something?
Thanks,
Ilya
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH net-next 2/5] ceph: Convert pr_warning to pr_warn
2014-09-10 12:38 ` Ilya Dryomov
@ 2014-09-10 14:20 ` Joe Perches
0 siblings, 0 replies; 12+ messages in thread
From: Joe Perches @ 2014-09-10 14:20 UTC (permalink / raw)
To: Ilya Dryomov
Cc: netdev, Sage Weil, David S. Miller, Ceph Development,
Linux Kernel Mailing List
On Wed, 2014-09-10 at 16:38 +0400, Ilya Dryomov wrote:
> On Wed, Sep 10, 2014 at 8:17 AM, Joe Perches <joe@perches.com> wrote:
> > Use the more common pr_warn.
> >
> > Other miscellanea:
> >
> > o Coalesce formats
> > o Realign arguments
[]
> > diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
[]
> > @@ -2828,8 +2828,9 @@ static void con_work(struct work_struct *work)
> > */
> > static void con_fault(struct ceph_connection *con)
> > {
> > - pr_warning("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
> > - ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
> > + pr_warn("%s%lld %s %s\n",
> > + ENTITY_NAME(con->peer_name),
> > + ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
>
> Just wondering, why did you move ENITITY_NAME argument to the next
> line? I see you are doing this pretty consistently. Is this a style
> guideline or something?
Hello Ilya.
It's just a personal preference to have the
formats on one line and its arguments on
another when the format and its arguments
don't fit 80 columns.
Maximal 80 column fill isn't always easy for me
to read.
I find it easier to match formats and arguments
when scanning because my eye doesn't have to
scan to the end of the format line.
If you don't like it, it's your code. Change it.
cheers, Joe
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH net-next 3/5] pktgen: Convert pr_warning to pr_warn
2014-09-10 4:17 [PATCH net-next 0/5] net: Convert pr_warning to pr_warn Joe Perches
2014-09-10 4:17 ` [PATCH net-next 1/5] atm: " Joe Perches
2014-09-10 4:17 ` [PATCH net-next 2/5] ceph: " Joe Perches
@ 2014-09-10 4:17 ` Joe Perches
2014-09-10 4:17 ` [PATCH net-next 4/5] iucv: " Joe Perches
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Joe Perches @ 2014-09-10 4:17 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, linux-kernel
Use the more common pr_warn.
Realign arguments.
Signed-off-by: Joe Perches <joe@perches.com>
---
net/core/pktgen.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 21cb483..5c728aa 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -506,7 +506,7 @@ static ssize_t pgctrl_write(struct file *file, const char __user *buf,
pktgen_reset_all_threads(pn);
else
- pr_warning("Unknown command: %s\n", data);
+ pr_warn("Unknown command: %s\n", data);
return count;
}
@@ -861,14 +861,14 @@ static ssize_t pktgen_if_write(struct file *file,
pg_result = &(pkt_dev->result[0]);
if (count < 1) {
- pr_warning("wrong command format\n");
+ pr_warn("wrong command format\n");
return -EINVAL;
}
max = count;
tmp = count_trail_chars(user_buffer, max);
if (tmp < 0) {
- pr_warning("illegal format\n");
+ pr_warn("illegal format\n");
return tmp;
}
i = tmp;
@@ -2056,15 +2056,15 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
ntxq = pkt_dev->odev->real_num_tx_queues;
if (ntxq <= pkt_dev->queue_map_min) {
- pr_warning("WARNING: Requested queue_map_min (zero-based) (%d) exceeds valid range [0 - %d] for (%d) queues on %s, resetting\n",
- pkt_dev->queue_map_min, (ntxq ?: 1) - 1, ntxq,
- pkt_dev->odevname);
+ pr_warn("WARNING: Requested queue_map_min (zero-based) (%d) exceeds valid range [0 - %d] for (%d) queues on %s, resetting\n",
+ pkt_dev->queue_map_min, (ntxq ?: 1) - 1, ntxq,
+ pkt_dev->odevname);
pkt_dev->queue_map_min = (ntxq ?: 1) - 1;
}
if (pkt_dev->queue_map_max >= ntxq) {
- pr_warning("WARNING: Requested queue_map_max (zero-based) (%d) exceeds valid range [0 - %d] for (%d) queues on %s, resetting\n",
- pkt_dev->queue_map_max, (ntxq ?: 1) - 1, ntxq,
- pkt_dev->odevname);
+ pr_warn("WARNING: Requested queue_map_max (zero-based) (%d) exceeds valid range [0 - %d] for (%d) queues on %s, resetting\n",
+ pkt_dev->queue_map_max, (ntxq ?: 1) - 1, ntxq,
+ pkt_dev->odevname);
pkt_dev->queue_map_max = (ntxq ?: 1) - 1;
}
@@ -3173,8 +3173,8 @@ static int pktgen_stop_device(struct pktgen_dev *pkt_dev)
int nr_frags = pkt_dev->skb ? skb_shinfo(pkt_dev->skb)->nr_frags : -1;
if (!pkt_dev->running) {
- pr_warning("interface: %s is already stopped\n",
- pkt_dev->odevname);
+ pr_warn("interface: %s is already stopped\n",
+ pkt_dev->odevname);
return -EINVAL;
}
@@ -3692,7 +3692,7 @@ static int pktgen_remove_device(struct pktgen_thread *t,
pr_debug("remove_device pkt_dev=%p\n", pkt_dev);
if (pkt_dev->running) {
- pr_warning("WARNING: trying to remove a running interface, stopping it now\n");
+ pr_warn("WARNING: trying to remove a running interface, stopping it now\n");
pktgen_stop_device(pkt_dev);
}
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH net-next 4/5] iucv: Convert pr_warning to pr_warn
2014-09-10 4:17 [PATCH net-next 0/5] net: Convert pr_warning to pr_warn Joe Perches
` (2 preceding siblings ...)
2014-09-10 4:17 ` [PATCH net-next 3/5] pktgen: " Joe Perches
@ 2014-09-10 4:17 ` Joe Perches
2014-09-10 4:17 ` [PATCH net-next 5/5] netfilter: " Joe Perches
2014-09-10 19:43 ` [PATCH net-next 0/5] net: " David Miller
5 siblings, 0 replies; 12+ messages in thread
From: Joe Perches @ 2014-09-10 4:17 UTC (permalink / raw)
To: netdev; +Cc: Ursula Braun, linux390, David S. Miller, linux-s390, linux-kernel
Use the more common pr_warn.
Coalesce formats.
Realign arguments.
Signed-off-by: Joe Perches <joe@perches.com>
---
net/iucv/iucv.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index da78793..2a6a1fd 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -493,8 +493,8 @@ static void iucv_declare_cpu(void *data)
err = "Paging or storage error";
break;
}
- pr_warning("Defining an interrupt buffer on CPU %i"
- " failed with 0x%02x (%s)\n", cpu, rc, err);
+ pr_warn("Defining an interrupt buffer on CPU %i failed with 0x%02x (%s)\n",
+ cpu, rc, err);
return;
}
@@ -1831,7 +1831,7 @@ static void iucv_external_interrupt(struct ext_code ext_code,
BUG_ON(p->iptype < 0x01 || p->iptype > 0x09);
work = kmalloc(sizeof(struct iucv_irq_list), GFP_ATOMIC);
if (!work) {
- pr_warning("iucv_external_interrupt: out of memory\n");
+ pr_warn("iucv_external_interrupt: out of memory\n");
return;
}
memcpy(&work->data, p, sizeof(work->data));
@@ -1974,8 +1974,7 @@ static int iucv_pm_restore(struct device *dev)
printk(KERN_WARNING "iucv_pm_restore %p\n", iucv_path_table);
#endif
if ((iucv_pm_state != IUCV_PM_RESTORING) && iucv_path_table)
- pr_warning("Suspending Linux did not completely close all IUCV "
- "connections\n");
+ pr_warn("Suspending Linux did not completely close all IUCV connections\n");
iucv_pm_state = IUCV_PM_RESTORING;
if (cpumask_empty(&iucv_irq_cpumask)) {
rc = iucv_query_maxconn();
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH net-next 5/5] netfilter: Convert pr_warning to pr_warn
2014-09-10 4:17 [PATCH net-next 0/5] net: Convert pr_warning to pr_warn Joe Perches
` (3 preceding siblings ...)
2014-09-10 4:17 ` [PATCH net-next 4/5] iucv: " Joe Perches
@ 2014-09-10 4:17 ` Joe Perches
2014-09-14 19:13 ` Jozsef Kadlecsik
2014-09-10 19:43 ` [PATCH net-next 0/5] net: " David Miller
5 siblings, 1 reply; 12+ messages in thread
From: Joe Perches @ 2014-09-10 4:17 UTC (permalink / raw)
To: netdev
Cc: Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik,
David S. Miller, netfilter-devel, coreteam, linux-kernel
Use the more common pr_warn.
Other miscellanea:
o Coalesce formats
o Realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
---
net/netfilter/ipset/ip_set_core.c | 23 +++++++++++-----------
net/netfilter/ipset/ip_set_hash_gen.h | 12 ++++++------
net/netfilter/xt_connbytes.c | 2 +-
net/netfilter/xt_hashlimit.c | 2 +-
net/netfilter/xt_set.c | 36 ++++++++++++++++-------------------
5 files changed, 35 insertions(+), 40 deletions(-)
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index 5edbbe8..ac31bf8 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -101,7 +101,7 @@ load_settype(const char *name)
nfnl_unlock(NFNL_SUBSYS_IPSET);
pr_debug("try to load ip_set_%s\n", name);
if (request_module("ip_set_%s", name) < 0) {
- pr_warning("Can't find ip_set type %s\n", name);
+ pr_warn("Can't find ip_set type %s\n", name);
nfnl_lock(NFNL_SUBSYS_IPSET);
return false;
}
@@ -195,20 +195,19 @@ ip_set_type_register(struct ip_set_type *type)
int ret = 0;
if (type->protocol != IPSET_PROTOCOL) {
- pr_warning("ip_set type %s, family %s, revision %u:%u uses "
- "wrong protocol version %u (want %u)\n",
- type->name, family_name(type->family),
- type->revision_min, type->revision_max,
- type->protocol, IPSET_PROTOCOL);
+ pr_warn("ip_set type %s, family %s, revision %u:%u uses wrong protocol version %u (want %u)\n",
+ type->name, family_name(type->family),
+ type->revision_min, type->revision_max,
+ type->protocol, IPSET_PROTOCOL);
return -EINVAL;
}
ip_set_type_lock();
if (find_set_type(type->name, type->family, type->revision_min)) {
/* Duplicate! */
- pr_warning("ip_set type %s, family %s with revision min %u "
- "already registered!\n", type->name,
- family_name(type->family), type->revision_min);
+ pr_warn("ip_set type %s, family %s with revision min %u already registered!\n",
+ type->name, family_name(type->family),
+ type->revision_min);
ret = -EINVAL;
goto unlock;
}
@@ -228,9 +227,9 @@ ip_set_type_unregister(struct ip_set_type *type)
{
ip_set_type_lock();
if (!find_set_type(type->name, type->family, type->revision_min)) {
- pr_warning("ip_set type %s, family %s with revision min %u "
- "not registered\n", type->name,
- family_name(type->family), type->revision_min);
+ pr_warn("ip_set type %s, family %s with revision min %u not registered\n",
+ type->name, family_name(type->family),
+ type->revision_min);
goto unlock;
}
list_del_rcu(&type->list);
diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index 61c7fb0..80f49df 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -565,8 +565,8 @@ retry:
set->name, orig->htable_bits, htable_bits, orig);
if (!htable_bits) {
/* In case we have plenty of memory :-) */
- pr_warning("Cannot increase the hashsize of set %s further\n",
- set->name);
+ pr_warn("Cannot increase the hashsize of set %s further\n",
+ set->name);
return -IPSET_ERR_HASH_FULL;
}
t = ip_set_alloc(sizeof(*t)
@@ -651,8 +651,8 @@ mtype_add(struct ip_set *set, void *value, const struct ip_set_ext *ext,
if (h->elements >= h->maxelem) {
if (net_ratelimit())
- pr_warning("Set %s is full, maxelem %u reached\n",
- set->name, h->maxelem);
+ pr_warn("Set %s is full, maxelem %u reached\n",
+ set->name, h->maxelem);
return -IPSET_ERR_HASH_FULL;
}
@@ -998,8 +998,8 @@ mtype_list(const struct ip_set *set,
nla_put_failure:
nlmsg_trim(skb, incomplete);
if (unlikely(first == cb->args[IPSET_CB_ARG0])) {
- pr_warning("Can't list set %s: one bucket does not fit into "
- "a message. Please report it!\n", set->name);
+ pr_warn("Can't list set %s: one bucket does not fit into a message. Please report it!\n",
+ set->name);
cb->args[IPSET_CB_ARG0] = 0;
return -EMSGSIZE;
}
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c
index 1e63461..d4bec26 100644
--- a/net/netfilter/xt_connbytes.c
+++ b/net/netfilter/xt_connbytes.c
@@ -120,7 +120,7 @@ static int connbytes_mt_check(const struct xt_mtchk_param *par)
* accounting is enabled, so complain in the hope that someone notices.
*/
if (!nf_ct_acct_enabled(par->net)) {
- pr_warning("Forcing CT accounting to be enabled\n");
+ pr_warn("Forcing CT accounting to be enabled\n");
nf_ct_set_acct(par->net, true);
}
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 52eb3e03..05fbc2a 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -943,7 +943,7 @@ static int __init hashlimit_mt_init(void)
sizeof(struct dsthash_ent), 0, 0,
NULL);
if (!hashlimit_cachep) {
- pr_warning("unable to create slab cache\n");
+ pr_warn("unable to create slab cache\n");
goto err2;
}
return 0;
diff --git a/net/netfilter/xt_set.c b/net/netfilter/xt_set.c
index 80c2e2d..cb70f6e 100644
--- a/net/netfilter/xt_set.c
+++ b/net/netfilter/xt_set.c
@@ -84,13 +84,12 @@ set_match_v0_checkentry(const struct xt_mtchk_param *par)
index = ip_set_nfnl_get_byindex(par->net, info->match_set.index);
if (index == IPSET_INVALID_ID) {
- pr_warning("Cannot find set identified by id %u to match\n",
- info->match_set.index);
+ pr_warn("Cannot find set identified by id %u to match\n",
+ info->match_set.index);
return -ENOENT;
}
if (info->match_set.u.flags[IPSET_DIM_MAX-1] != 0) {
- pr_warning("Protocol error: set match dimension "
- "is over the limit!\n");
+ pr_warn("Protocol error: set match dimension is over the limit!\n");
ip_set_nfnl_put(par->net, info->match_set.index);
return -ERANGE;
}
@@ -134,13 +133,12 @@ set_match_v1_checkentry(const struct xt_mtchk_param *par)
index = ip_set_nfnl_get_byindex(par->net, info->match_set.index);
if (index == IPSET_INVALID_ID) {
- pr_warning("Cannot find set identified by id %u to match\n",
- info->match_set.index);
+ pr_warn("Cannot find set identified by id %u to match\n",
+ info->match_set.index);
return -ENOENT;
}
if (info->match_set.dim > IPSET_DIM_MAX) {
- pr_warning("Protocol error: set match dimension "
- "is over the limit!\n");
+ pr_warn("Protocol error: set match dimension is over the limit!\n");
ip_set_nfnl_put(par->net, info->match_set.index);
return -ERANGE;
}
@@ -230,8 +228,8 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
if (info->add_set.index != IPSET_INVALID_ID) {
index = ip_set_nfnl_get_byindex(par->net, info->add_set.index);
if (index == IPSET_INVALID_ID) {
- pr_warning("Cannot find add_set index %u as target\n",
- info->add_set.index);
+ pr_warn("Cannot find add_set index %u as target\n",
+ info->add_set.index);
return -ENOENT;
}
}
@@ -239,8 +237,8 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
if (info->del_set.index != IPSET_INVALID_ID) {
index = ip_set_nfnl_get_byindex(par->net, info->del_set.index);
if (index == IPSET_INVALID_ID) {
- pr_warning("Cannot find del_set index %u as target\n",
- info->del_set.index);
+ pr_warn("Cannot find del_set index %u as target\n",
+ info->del_set.index);
if (info->add_set.index != IPSET_INVALID_ID)
ip_set_nfnl_put(par->net, info->add_set.index);
return -ENOENT;
@@ -248,8 +246,7 @@ set_target_v0_checkentry(const struct xt_tgchk_param *par)
}
if (info->add_set.u.flags[IPSET_DIM_MAX-1] != 0 ||
info->del_set.u.flags[IPSET_DIM_MAX-1] != 0) {
- pr_warning("Protocol error: SET target dimension "
- "is over the limit!\n");
+ pr_warn("Protocol error: SET target dimension is over the limit!\n");
if (info->add_set.index != IPSET_INVALID_ID)
ip_set_nfnl_put(par->net, info->add_set.index);
if (info->del_set.index != IPSET_INVALID_ID)
@@ -303,8 +300,8 @@ set_target_v1_checkentry(const struct xt_tgchk_param *par)
if (info->add_set.index != IPSET_INVALID_ID) {
index = ip_set_nfnl_get_byindex(par->net, info->add_set.index);
if (index == IPSET_INVALID_ID) {
- pr_warning("Cannot find add_set index %u as target\n",
- info->add_set.index);
+ pr_warn("Cannot find add_set index %u as target\n",
+ info->add_set.index);
return -ENOENT;
}
}
@@ -312,8 +309,8 @@ set_target_v1_checkentry(const struct xt_tgchk_param *par)
if (info->del_set.index != IPSET_INVALID_ID) {
index = ip_set_nfnl_get_byindex(par->net, info->del_set.index);
if (index == IPSET_INVALID_ID) {
- pr_warning("Cannot find del_set index %u as target\n",
- info->del_set.index);
+ pr_warn("Cannot find del_set index %u as target\n",
+ info->del_set.index);
if (info->add_set.index != IPSET_INVALID_ID)
ip_set_nfnl_put(par->net, info->add_set.index);
return -ENOENT;
@@ -321,8 +318,7 @@ set_target_v1_checkentry(const struct xt_tgchk_param *par)
}
if (info->add_set.dim > IPSET_DIM_MAX ||
info->del_set.dim > IPSET_DIM_MAX) {
- pr_warning("Protocol error: SET target dimension "
- "is over the limit!\n");
+ pr_warn("Protocol error: SET target dimension is over the limit!\n");
if (info->add_set.index != IPSET_INVALID_ID)
ip_set_nfnl_put(par->net, info->add_set.index);
if (info->del_set.index != IPSET_INVALID_ID)
--
1.8.1.2.459.gbcd45b4.dirty
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH net-next 5/5] netfilter: Convert pr_warning to pr_warn
2014-09-10 4:17 ` [PATCH net-next 5/5] netfilter: " Joe Perches
@ 2014-09-14 19:13 ` Jozsef Kadlecsik
0 siblings, 0 replies; 12+ messages in thread
From: Jozsef Kadlecsik @ 2014-09-14 19:13 UTC (permalink / raw)
To: Joe Perches
Cc: netdev, Pablo Neira Ayuso, Patrick McHardy, David S. Miller,
netfilter-devel, coreteam, linux-kernel
On Tue, 9 Sep 2014, Joe Perches wrote:
> Use the more common pr_warn.
>
> Other miscellanea:
>
> o Coalesce formats
> o Realign arguments
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> net/netfilter/ipset/ip_set_core.c | 23 +++++++++++-----------
> net/netfilter/ipset/ip_set_hash_gen.h | 12 ++++++------
> net/netfilter/xt_connbytes.c | 2 +-
> net/netfilter/xt_hashlimit.c | 2 +-
> net/netfilter/xt_set.c | 36 ++++++++++++++++-------------------
> 5 files changed, 35 insertions(+), 40 deletions(-)
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next 0/5] net: Convert pr_warning to pr_warn
2014-09-10 4:17 [PATCH net-next 0/5] net: Convert pr_warning to pr_warn Joe Perches
` (4 preceding siblings ...)
2014-09-10 4:17 ` [PATCH net-next 5/5] netfilter: " Joe Perches
@ 2014-09-10 19:43 ` David Miller
5 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2014-09-10 19:43 UTC (permalink / raw)
To: joe
Cc: netdev, sage, ursula.braun, linux390, pablo, kaber, kadlec,
linux-kernel, ceph-devel, linux-s390, netfilter-devel, coreteam
From: Joe Perches <joe@perches.com>
Date: Tue, 9 Sep 2014 21:17:27 -0700
> Remove remaining uses of pr_warning in net/
>
> Joe Perches (5):
> atm: Convert pr_warning to pr_warn
> ceph: Convert pr_warning to pr_warn
> pktgen: Convert pr_warning to pr_warn
> iucv: Convert pr_warning to pr_warn
> netfilter: Convert pr_warning to pr_warn
All except the ceph patch which is going via another tree.
^ permalink raw reply [flat|nested] 12+ messages in thread