* [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
@ 2011-06-16 12:06 ` Manuel Zerpies
2011-06-16 14:19 ` Borislav Petkov
2011-06-16 14:32 ` Sergei Shtylyov
2011-06-16 12:07 ` [PATCH 02/11] drivers/tty: " Manuel Zerpies
` (9 subsequent siblings)
10 siblings, 2 replies; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:06 UTC (permalink / raw)
To: David S. Miller, linux-ide, linux-kernel, christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/ide/ide-atapi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 6f218e01..1b04f45 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -8,6 +8,7 @@
#include <linux/ide.h>
#include <linux/scatterlist.h>
#include <linux/gfp.h>
+#include <linux/ratelimit.h>
#include <scsi/scsi.h>
@@ -200,8 +201,7 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
err = blk_rq_map_kern(drive->queue, sense_rq, sense, sense_len,
GFP_NOIO);
if (unlikely(err)) {
- if (printk_ratelimit())
- printk(KERN_WARNING PFX "%s: failed to map sense "
+ printk_ratelimited(KERN_WARNING PFX "%s: failed to map sense "
"buffer\n", drive->name);
return;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 02/11] drivers/tty: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
2011-06-16 12:06 ` [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit() Manuel Zerpies
@ 2011-06-16 12:07 ` Manuel Zerpies
2011-06-16 12:08 ` [PATCH 03/11] net/can: " Manuel Zerpies
` (8 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:07 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, linux-kernel, christian.dietrich
Since the printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/tty/moxa.c | 5 +++--
drivers/tty/mxser.c | 4 ++--
drivers/tty/tty_io.c | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index ba679ce..d15a071 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -44,6 +44,7 @@
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/slab.h>
+#include <linux/ratelimit.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -242,8 +243,8 @@ static void moxa_wait_finish(void __iomem *ofsAddr)
while (readw(ofsAddr + FuncCode) != 0)
if (time_after(jiffies, end))
return;
- if (readw(ofsAddr + FuncCode) != 0 && printk_ratelimit())
- printk(KERN_WARNING "moxa function expired\n");
+ if (readw(ofsAddr + FuncCode) != 0)
+ printk_ratelimited(KERN_WARNING "moxa function expired\n");
}
static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index d188f37..7fc8c02 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -39,6 +39,7 @@
#include <linux/pci.h>
#include <linux/bitops.h>
#include <linux/slab.h>
+#include <linux/ratelimit.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -1490,8 +1491,7 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
switch (cmd) {
case MOXA_GET_MAJOR:
- if (printk_ratelimit())
- printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl "
+ printk_ratelimited(KERN_WARNING "mxser: '%s' uses deprecated ioctl "
"%x (GET_MAJOR), fix your userspace\n",
current->comm, cmd);
return put_user(ttymajor, (int __user *)argp);
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 6556f74..150e4f7 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -94,6 +94,7 @@
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/serial.h>
+#include <linux/ratelimit.h>
#include <linux/uaccess.h>
#include <asm/system.h>
@@ -1420,8 +1421,7 @@ err_module_put:
/* call the tty release_tty routine to clean out this slot */
err_release_tty:
- if (printk_ratelimit())
- printk(KERN_INFO "tty_init_dev: ldisc open failed, "
+ printk_ratelimited(KERN_INFO "tty_init_dev: ldisc open failed, "
"clearing slot %d\n", idx);
release_tty(tty, idx);
return ERR_PTR(retval);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 03/11] net/can: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
2011-06-16 12:06 ` [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit() Manuel Zerpies
2011-06-16 12:07 ` [PATCH 02/11] drivers/tty: " Manuel Zerpies
@ 2011-06-16 12:08 ` Manuel Zerpies
2011-06-17 4:03 ` David Miller
2011-06-16 12:09 ` [PATCH 04/11] net/rds: use prink_ratelimited() " Manuel Zerpies
` (7 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:08 UTC (permalink / raw)
To: Oliver Hartkopp, Urs Thuermann, David S. Miller, socketcan-core,
netdev, linux-kernel, christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
net/can/af_can.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 094fc53..8ce926d 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -58,6 +58,7 @@
#include <linux/skbuff.h>
#include <linux/can.h>
#include <linux/can/core.h>
+#include <linux/ratelimit.h>
#include <net/net_namespace.h>
#include <net/sock.h>
@@ -161,8 +162,8 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
* return the error code immediately. Below we will
* return -EPROTONOSUPPORT
*/
- if (err && printk_ratelimit())
- printk(KERN_ERR "can: request_module "
+ if (err)
+ printk_ratelimited(KERN_ERR "can: request_module "
"(can-proto-%d) failed.\n", protocol);
cp = can_get_proto(protocol);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 04/11] net/rds: use prink_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (2 preceding siblings ...)
2011-06-16 12:08 ` [PATCH 03/11] net/can: " Manuel Zerpies
@ 2011-06-16 12:09 ` Manuel Zerpies
2011-06-17 4:03 ` David Miller
2011-06-16 12:10 ` [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() " Manuel Zerpies
` (6 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:09 UTC (permalink / raw)
To: Andy Grover, David S. Miller, rds-devel, netdev, linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
net/rds/bind.c | 4 ++--
net/rds/ib_cm.c | 6 +++---
net/rds/ib_send.c | 4 ++--
net/rds/iw_cm.c | 9 ++++-----
net/rds/iw_rdma.c | 9 +++++----
net/rds/iw_send.c | 4 ++--
net/rds/send.c | 7 +++----
7 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/net/rds/bind.c b/net/rds/bind.c
index 2f6b3fc..637bde5 100644
--- a/net/rds/bind.c
+++ b/net/rds/bind.c
@@ -35,6 +35,7 @@
#include <linux/in.h>
#include <linux/if_arp.h>
#include <linux/jhash.h>
+#include <linux/ratelimit.h>
#include "rds.h"
#define BIND_HASH_SIZE 1024
@@ -185,8 +186,7 @@ int rds_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
if (!trans) {
ret = -EADDRNOTAVAIL;
rds_remove_bound(rs);
- if (printk_ratelimit())
- printk(KERN_INFO "RDS: rds_bind() could not find a transport, "
+ printk_ratelimited(KERN_INFO "RDS: rds_bind() could not find a transport, "
"load rds_tcp or rds_rdma?\n");
goto out;
}
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index fd453dd..cd67026 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -34,6 +34,7 @@
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
+#include <linux/ratelimit.h>
#include "rds.h"
#include "ib.h"
@@ -435,13 +436,12 @@ static u32 rds_ib_protocol_compatible(struct rdma_cm_event *event)
version = RDS_PROTOCOL_3_0;
while ((common >>= 1) != 0)
version++;
- } else if (printk_ratelimit()) {
- printk(KERN_NOTICE "RDS: Connection from %pI4 using "
+ }
+ printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using "
"incompatible protocol version %u.%u\n",
&dp->dp_saddr,
dp->dp_protocol_major,
dp->dp_protocol_minor);
- }
return version;
}
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
index 7c4dce8..e590949 100644
--- a/net/rds/ib_send.c
+++ b/net/rds/ib_send.c
@@ -34,6 +34,7 @@
#include <linux/in.h>
#include <linux/device.h>
#include <linux/dmapool.h>
+#include <linux/ratelimit.h>
#include "rds.h"
#include "ib.h"
@@ -207,8 +208,7 @@ static struct rds_message *rds_ib_send_unmap_op(struct rds_ib_connection *ic,
}
break;
default:
- if (printk_ratelimit())
- printk(KERN_NOTICE
+ printk_ratelimited(KERN_NOTICE
"RDS/IB: %s: unexpected opcode 0x%x in WR!\n",
__func__, send->s_wr.opcode);
break;
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c
index c12db66..9556d28 100644
--- a/net/rds/iw_cm.c
+++ b/net/rds/iw_cm.c
@@ -34,6 +34,7 @@
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
+#include <linux/ratelimit.h>
#include "rds.h"
#include "iw.h"
@@ -258,8 +259,7 @@ static int rds_iw_setup_qp(struct rds_connection *conn)
*/
rds_iwdev = ib_get_client_data(dev, &rds_iw_client);
if (!rds_iwdev) {
- if (printk_ratelimit())
- printk(KERN_NOTICE "RDS/IW: No client_data for device %s\n",
+ printk_ratelimited(KERN_NOTICE "RDS/IW: No client_data for device %s\n",
dev->name);
return -EOPNOTSUPP;
}
@@ -365,13 +365,12 @@ static u32 rds_iw_protocol_compatible(const struct rds_iw_connect_private *dp)
version = RDS_PROTOCOL_3_0;
while ((common >>= 1) != 0)
version++;
- } else if (printk_ratelimit()) {
- printk(KERN_NOTICE "RDS: Connection from %pI4 using "
+ }
+ printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using "
"incompatible protocol version %u.%u\n",
&dp->dp_saddr,
dp->dp_protocol_major,
dp->dp_protocol_minor);
- }
return version;
}
diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
index 6deaa77..8b77edb 100644
--- a/net/rds/iw_rdma.c
+++ b/net/rds/iw_rdma.c
@@ -32,6 +32,7 @@
*/
#include <linux/kernel.h>
#include <linux/slab.h>
+#include <linux/ratelimit.h>
#include "rds.h"
#include "iw.h"
@@ -729,8 +730,8 @@ static int rds_iw_rdma_build_fastreg(struct rds_iw_mapping *mapping)
failed_wr = &f_wr;
ret = ib_post_send(ibmr->cm_id->qp, &f_wr, &failed_wr);
BUG_ON(failed_wr != &f_wr);
- if (ret && printk_ratelimit())
- printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
+ if (ret)
+ printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
__func__, __LINE__, ret);
return ret;
}
@@ -751,8 +752,8 @@ static int rds_iw_rdma_fastreg_inv(struct rds_iw_mr *ibmr)
failed_wr = &s_wr;
ret = ib_post_send(ibmr->cm_id->qp, &s_wr, &failed_wr);
- if (ret && printk_ratelimit()) {
- printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
+ if (ret) {
+ printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
__func__, __LINE__, ret);
goto out;
}
diff --git a/net/rds/iw_send.c b/net/rds/iw_send.c
index 545d8ee..e40c3c5 100644
--- a/net/rds/iw_send.c
+++ b/net/rds/iw_send.c
@@ -34,6 +34,7 @@
#include <linux/in.h>
#include <linux/device.h>
#include <linux/dmapool.h>
+#include <linux/ratelimit.h>
#include "rds.h"
#include "iw.h"
@@ -258,8 +259,7 @@ void rds_iw_send_cq_comp_handler(struct ib_cq *cq, void *context)
* when the SEND completes. */
break;
default:
- if (printk_ratelimit())
- printk(KERN_NOTICE
+ printk_ratelimited(KERN_NOTICE
"RDS/IW: %s: unexpected opcode 0x%x in WR!\n",
__func__, send->s_wr.opcode);
break;
diff --git a/net/rds/send.c b/net/rds/send.c
index d58ae5f..aa57e22 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -35,6 +35,7 @@
#include <net/sock.h>
#include <linux/in.h>
#include <linux/list.h>
+#include <linux/ratelimit.h>
#include "rds.h"
@@ -1006,16 +1007,14 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
goto out;
if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) {
- if (printk_ratelimit())
- printk(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n",
+ printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n",
&rm->rdma, conn->c_trans->xmit_rdma);
ret = -EOPNOTSUPP;
goto out;
}
if (rm->atomic.op_active && !conn->c_trans->xmit_atomic) {
- if (printk_ratelimit())
- printk(KERN_NOTICE "atomic_op %p conn xmit_atomic %p\n",
+ printk_ratelimited(KERN_NOTICE "atomic_op %p conn xmit_atomic %p\n",
&rm->atomic, conn->c_trans->xmit_atomic);
ret = -EOPNOTSUPP;
goto out;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (3 preceding siblings ...)
2011-06-16 12:09 ` [PATCH 04/11] net/rds: use prink_ratelimited() " Manuel Zerpies
@ 2011-06-16 12:10 ` Manuel Zerpies
2011-07-19 4:19 ` Roland Dreier
2011-06-16 12:12 ` [PATCH 06/11] drivers/net: " Manuel Zerpies
` (5 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:10 UTC (permalink / raw)
To: Steve Wise, Roland Dreier, Sean Hefty, Hal Rosenstock,
linux-rdma, linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/infiniband/hw/cxgb4/resource.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c
index 4fb50d5..407ff39 100644
--- a/drivers/infiniband/hw/cxgb4/resource.c
+++ b/drivers/infiniband/hw/cxgb4/resource.c
@@ -37,6 +37,7 @@
#include <linux/spinlock.h>
#include <linux/errno.h>
#include <linux/genalloc.h>
+#include <linux/ratelimit.h>
#include "iw_cxgb4.h"
#define RANDOM_SIZE 16
@@ -311,8 +312,8 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size)
{
unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size);
PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size);
- if (!addr && printk_ratelimit())
- printk(KERN_WARNING MOD "%s: Out of PBL memory\n",
+ if (!addr)
+ printk_ratelimited(KERN_WARNING MOD "%s: Out of PBL memory\n",
pci_name(rdev->lldi.pdev));
return (u32)addr;
}
@@ -373,8 +374,8 @@ u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size)
{
unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6);
PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6);
- if (!addr && printk_ratelimit())
- printk(KERN_WARNING MOD "%s: Out of RQT memory\n",
+ if (!addr)
+ printk_ratelimited(KERN_WARNING MOD "%s: Out of RQT memory\n",
pci_name(rdev->lldi.pdev));
return (u32)addr;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 06/11] drivers/net: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (4 preceding siblings ...)
2011-06-16 12:10 ` [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() " Manuel Zerpies
@ 2011-06-16 12:12 ` Manuel Zerpies
2011-06-16 16:43 ` Joe Perches
2011-06-16 12:12 ` [PATCH 07/11] drivers/usb/atm: " Manuel Zerpies
` (4 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:12 UTC (permalink / raw)
To: David S. Miller, David Decotigny, Hans J. Koch, Jiri Kosina,
Ben Pfaff, netdev, linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/net/sc92031.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index fa74314..6f6bbb3 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -31,6 +31,7 @@
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/crc32.h>
+#include <linux/ratelimit.h>
#include <asm/irq.h>
@@ -536,8 +537,7 @@ static bool _sc92031_check_media(struct net_device *dev)
netif_carrier_on(dev);
- if (printk_ratelimit())
- printk(KERN_INFO "%s: link up, %sMbps, %s-duplex\n",
+ printk_ratelimited(KERN_INFO "%s: link up, %sMbps, %s-duplex\n",
dev->name,
speed_100 ? "100" : "10",
duplex_full ? "full" : "half");
@@ -549,8 +549,7 @@ static bool _sc92031_check_media(struct net_device *dev)
_sc92031_disable_tx_rx(dev);
- if (printk_ratelimit())
- printk(KERN_INFO "%s: link down\n", dev->name);
+ printk_ratelimited(KERN_INFO "%s: link down\n", dev->name);
return false;
}
}
@@ -755,8 +754,7 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
return;
if (unlikely(rx_len > RX_BUF_LEN)) {
- if (printk_ratelimit())
- printk(KERN_ERR "%s: rx packets length > rx buffer\n",
+ printk_ratelimited(KERN_ERR "%s: rx packets length > rx buffer\n",
dev->name);
return;
}
@@ -786,8 +784,7 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
}
if (unlikely(rx_size_align + 4 > rx_len)) {
- if (printk_ratelimit())
- printk(KERN_ERR "%s: rx_len is too small\n", dev->name);
+ printk_ratelimited(KERN_ERR "%s: rx_len is too small\n", dev->name);
break;
}
@@ -795,8 +792,7 @@ static void _sc92031_rx_tasklet(struct net_device *dev)
skb = netdev_alloc_skb_ip_align(dev, pkt_size);
if (unlikely(!skb)) {
- if (printk_ratelimit())
- printk(KERN_ERR "%s: Couldn't allocate a skb_buff for a packet of size %u\n",
+ printk_ratelimited(KERN_ERR "%s: Couldn't allocate a skb_buff for a packet of size %u\n",
dev->name, pkt_size);
goto next;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 07/11] drivers/usb/atm: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (5 preceding siblings ...)
2011-06-16 12:12 ` [PATCH 06/11] drivers/net: " Manuel Zerpies
@ 2011-06-16 12:12 ` Manuel Zerpies
2011-06-16 14:37 ` Sergei Shtylyov
2011-06-16 12:13 ` [PATCH 08/11] [SCSI] tcm_fc: " Manuel Zerpies
` (3 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:12 UTC (permalink / raw)
To: Duncan Sands, Greg Kroah-Hartman, linux-usb, linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/usb/atm/usbatm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 989e16e..d3448ca 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -81,6 +81,7 @@
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/kthread.h>
+#include <linux/ratelimit.h>
#ifdef VERBOSE_DEBUG
static int usbatm_print_packet(const unsigned char *data, int len);
@@ -668,8 +669,7 @@ static int usbatm_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
/* racy disconnection check - fine */
if (!instance || instance->disconnected) {
#ifdef DEBUG
- if (printk_ratelimit())
- printk(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
+ printk_ratelimited(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
#endif
err = -ENODEV;
goto fail;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 08/11] [SCSI] tcm_fc: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (6 preceding siblings ...)
2011-06-16 12:12 ` [PATCH 07/11] drivers/usb/atm: " Manuel Zerpies
@ 2011-06-16 12:13 ` Manuel Zerpies
2011-06-16 12:14 ` [PATCH 09/11] xen/xenbus: " Manuel Zerpies
` (2 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:13 UTC (permalink / raw)
To: Nicholas A. Bellinger, James Bottomley, Kiran Patil, Yi Zou,
Joe Eykholt, linux-scsi, linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/target/tcm_fc/tfc_io.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
index 4c3c0ef..b1d6911 100644
--- a/drivers/target/tcm_fc/tfc_io.c
+++ b/drivers/target/tcm_fc/tfc_io.c
@@ -39,6 +39,7 @@
#include <linux/configfs.h>
#include <linux/ctype.h>
#include <linux/hash.h>
+#include <linux/ratelimit.h>
#include <asm/unaligned.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
@@ -201,8 +202,7 @@ int ft_queue_data_in(struct se_cmd *se_cmd)
error = lport->tt.seq_send(lport, cmd->seq, fp);
if (error) {
/* XXX For now, initiator will retry */
- if (printk_ratelimit())
- printk(KERN_ERR "%s: Failed to send frame %p, "
+ printk_ratelimited(KERN_ERR "%s: Failed to send frame %p, "
"xid <0x%x>, remaining <0x%x>, "
"lso_max <0x%x>\n",
__func__, fp, ep->xid,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 09/11] xen/xenbus: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (7 preceding siblings ...)
2011-06-16 12:13 ` [PATCH 08/11] [SCSI] tcm_fc: " Manuel Zerpies
@ 2011-06-16 12:14 ` Manuel Zerpies
2011-06-16 21:00 ` Jeremy Fitzhardinge
2011-06-16 12:15 ` [PATCH 10/11] wusb: " Manuel Zerpies
2011-06-16 12:15 ` [PATCH 11/11] usb/class: " Manuel Zerpies
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:14 UTC (permalink / raw)
To: Jeremy Fitzhardinge, Konrad Rzeszutek Wilk, Manuel Zerpies,
xen-devel, virtualization, linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/xen/xenbus/xenbus_xs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 5534690..4055858 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -44,6 +44,7 @@
#include <linux/rwsem.h>
#include <linux/module.h>
#include <linux/mutex.h>
+#include <linux/ratelimit.h>
#include <xen/xenbus.h>
#include "xenbus_comms.h"
@@ -270,8 +271,7 @@ static void *xs_talkv(struct xenbus_transaction t,
}
if (msg.type != type) {
- if (printk_ratelimit())
- printk(KERN_WARNING
+ `printk_ratelimited(KERN_WARNING
"XENBUS unexpected type [%d], expected [%d]\n",
msg.type, type);
kfree(ret);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 10/11] wusb: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (8 preceding siblings ...)
2011-06-16 12:14 ` [PATCH 09/11] xen/xenbus: " Manuel Zerpies
@ 2011-06-16 12:15 ` Manuel Zerpies
2011-06-16 14:34 ` Sergei Shtylyov
2011-06-16 12:15 ` [PATCH 11/11] usb/class: " Manuel Zerpies
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, Lucas De Marchi, Manuel Zerpies, linux-usb,
linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/usb/wusbcore/wa-xfer.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
index 6ccd93a..4193345 100644
--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -83,6 +83,7 @@
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/hash.h>
+#include <linux/ratelimit.h>
#include "wa-hc.h"
#include "wusbhc.h"
@@ -1217,16 +1218,14 @@ static int wa_xfer_status_to_errno(u8 status)
if (status == 0)
return 0;
if (status >= ARRAY_SIZE(xlat)) {
- if (printk_ratelimit())
- printk(KERN_ERR "%s(): BUG? "
+ printk_ratelimited(KERN_ERR "%s(): BUG? "
"Unknown WA transfer status 0x%02x\n",
__func__, real_status);
return -EINVAL;
}
errno = xlat[status];
if (unlikely(errno > 0)) {
- if (printk_ratelimit())
- printk(KERN_ERR "%s(): BUG? "
+ printk_ratelimited(KERN_ERR "%s(): BUG? "
"Inconsistent WA status: 0x%02x\n",
__func__, real_status);
errno = -errno;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 11/11] usb/class: use printk_ratelimited() instead of printk_ratelimit()
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
` (9 preceding siblings ...)
2011-06-16 12:15 ` [PATCH 10/11] wusb: " Manuel Zerpies
@ 2011-06-16 12:15 ` Manuel Zerpies
2011-06-16 15:36 ` Pete Zaitcev
10 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-16 12:15 UTC (permalink / raw)
To: Pete Zaitcev, Greg Kroah-Hartman, linux-usb, linux-kernel
Cc: christian.dietrich
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/usb/class/usblp.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 9eca405..cb3a932 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -58,6 +58,7 @@
#include <linux/mutex.h>
#undef DEBUG
#include <linux/usb.h>
+#include <linux/ratelimit.h>
/*
* Version Information
@@ -348,8 +349,7 @@ static int usblp_check_status(struct usblp *usblp, int err)
mutex_lock(&usblp->mut);
if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) {
mutex_unlock(&usblp->mut);
- if (printk_ratelimit())
- printk(KERN_ERR
+ printk_ratelimited(KERN_ERR
"usblp%d: error %d reading printer status\n",
usblp->minor, error);
return 0;
@@ -653,8 +653,7 @@ static long usblp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case LPGETSTATUS:
if ((retval = usblp_read_status(usblp, usblp->statusbuf))) {
- if (printk_ratelimit())
- printk(KERN_ERR "usblp%d:"
+ printk_ratelimited(KERN_ERR "usblp%d:"
"failed reading printer status (%d)\n",
usblp->minor, retval);
retval = -EIO;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:06 ` [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit() Manuel Zerpies
@ 2011-06-16 14:19 ` Borislav Petkov
2011-06-20 8:17 ` Manuel Zerpies
2011-06-16 14:32 ` Sergei Shtylyov
1 sibling, 1 reply; 24+ messages in thread
From: Borislav Petkov @ 2011-06-16 14:19 UTC (permalink / raw)
To: Manuel Zerpies
Cc: David S. Miller, linux-ide, linux-kernel, christian.dietrich
On Thu, Jun 16, 2011 at 02:06:37PM +0200, Manuel Zerpies wrote:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited().
>
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
> drivers/ide/ide-atapi.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index 6f218e01..1b04f45 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c
> @@ -8,6 +8,7 @@
> #include <linux/ide.h>
> #include <linux/scatterlist.h>
> #include <linux/gfp.h>
> +#include <linux/ratelimit.h>
>
> #include <scsi/scsi.h>
>
> @@ -200,8 +201,7 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
> err = blk_rq_map_kern(drive->queue, sense_rq, sense, sense_len,
> GFP_NOIO);
> if (unlikely(err)) {
> - if (printk_ratelimit())
> - printk(KERN_WARNING PFX "%s: failed to map sense "
> + printk_ratelimited(KERN_WARNING PFX "%s: failed to map sense "
> "buffer\n", drive->name);
Does the printk fit on one line if you do
pr_warn_ratelimited(...)
instead?
Thanks.
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:06 ` [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit() Manuel Zerpies
2011-06-16 14:19 ` Borislav Petkov
@ 2011-06-16 14:32 ` Sergei Shtylyov
1 sibling, 0 replies; 24+ messages in thread
From: Sergei Shtylyov @ 2011-06-16 14:32 UTC (permalink / raw)
To: Manuel Zerpies
Cc: David S. Miller, linux-ide, linux-kernel, christian.dietrich
Hello.
Manuel Zerpies wrote:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited().
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
> drivers/ide/ide-atapi.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index 6f218e01..1b04f45 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c
> @@ -8,6 +8,7 @@
> #include <linux/ide.h>
> #include <linux/scatterlist.h>
> #include <linux/gfp.h>
> +#include <linux/ratelimit.h>
>
> #include <scsi/scsi.h>
>
> @@ -200,8 +201,7 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
> err = blk_rq_map_kern(drive->queue, sense_rq, sense, sense_len,
> GFP_NOIO);
> if (unlikely(err)) {
> - if (printk_ratelimit())
> - printk(KERN_WARNING PFX "%s: failed to map sense "
> + printk_ratelimited(KERN_WARNING PFX "%s: failed to map sense "
Why not pr_warn_ratelimited()?
WBR, Sergei
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 10/11] wusb: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:15 ` [PATCH 10/11] wusb: " Manuel Zerpies
@ 2011-06-16 14:34 ` Sergei Shtylyov
0 siblings, 0 replies; 24+ messages in thread
From: Sergei Shtylyov @ 2011-06-16 14:34 UTC (permalink / raw)
To: Manuel Zerpies
Cc: Greg Kroah-Hartman, Lucas De Marchi, linux-usb, linux-kernel,
christian.dietrich
Hello.
Manuel Zerpies wrote:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
> drivers/usb/wusbcore/wa-xfer.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
> diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
> index 6ccd93a..4193345 100644
> --- a/drivers/usb/wusbcore/wa-xfer.c
> +++ b/drivers/usb/wusbcore/wa-xfer.c
> @@ -83,6 +83,7 @@
> #include <linux/spinlock.h>
> #include <linux/slab.h>
> #include <linux/hash.h>
> +#include <linux/ratelimit.h>
>
> #include "wa-hc.h"
> #include "wusbhc.h"
> @@ -1217,16 +1218,14 @@ static int wa_xfer_status_to_errno(u8 status)
> if (status == 0)
> return 0;
> if (status >= ARRAY_SIZE(xlat)) {
> - if (printk_ratelimit())
> - printk(KERN_ERR "%s(): BUG? "
> + printk_ratelimited(KERN_ERR "%s(): BUG? "
> "Unknown WA transfer status 0x%02x\n",
> __func__, real_status);
> return -EINVAL;
> }
> errno = xlat[status];
> if (unlikely(errno > 0)) {
> - if (printk_ratelimit())
> - printk(KERN_ERR "%s(): BUG? "
> + printk_ratelimited(KERN_ERR "%s(): BUG? "
> "Inconsistent WA status: 0x%02x\n",
> __func__, real_status);
> errno = -errno;
Why not pr_err_ratelimited()?
WBR, Sergei
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 07/11] drivers/usb/atm: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:12 ` [PATCH 07/11] drivers/usb/atm: " Manuel Zerpies
@ 2011-06-16 14:37 ` Sergei Shtylyov
0 siblings, 0 replies; 24+ messages in thread
From: Sergei Shtylyov @ 2011-06-16 14:37 UTC (permalink / raw)
To: Manuel Zerpies
Cc: Duncan Sands, Greg Kroah-Hartman, linux-usb, linux-kernel,
christian.dietrich
Hello.
Manuel Zerpies wrote:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
> drivers/usb/atm/usbatm.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
> index 989e16e..d3448ca 100644
> --- a/drivers/usb/atm/usbatm.c
> +++ b/drivers/usb/atm/usbatm.c
> @@ -81,6 +81,7 @@
> #include <linux/timer.h>
> #include <linux/wait.h>
> #include <linux/kthread.h>
> +#include <linux/ratelimit.h>
>
> #ifdef VERBOSE_DEBUG
> static int usbatm_print_packet(const unsigned char *data, int len);
> @@ -668,8 +669,7 @@ static int usbatm_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
> /* racy disconnection check - fine */
> if (!instance || instance->disconnected) {
> #ifdef DEBUG
> - if (printk_ratelimit())
> - printk(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
> + printk_ratelimited(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
> #endif
You could use pr_debug_ratelimited() and eliminate #ifdef with that.
WBR, Sergei
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 11/11] usb/class: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:15 ` [PATCH 11/11] usb/class: " Manuel Zerpies
@ 2011-06-16 15:36 ` Pete Zaitcev
0 siblings, 0 replies; 24+ messages in thread
From: Pete Zaitcev @ 2011-06-16 15:36 UTC (permalink / raw)
To: Manuel Zerpies
Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, christian.dietrich
On Thu, 16 Jun 2011 14:15:54 +0200
Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de> wrote:
> +++ b/drivers/usb/class/usblp.c
> @@ -348,8 +349,7 @@ static int usblp_check_status(struct usblp *usblp, int err)
> mutex_lock(&usblp->mut);
> if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) {
> mutex_unlock(&usblp->mut);
> - if (printk_ratelimit())
> - printk(KERN_ERR
> + printk_ratelimited(KERN_ERR
> "usblp%d: error %d reading printer status\n",
I wish you went a step further and placed the state into usblp,
but it works for now, ACK. I should've done it myself, really.
-- Pete
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 06/11] drivers/net: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:12 ` [PATCH 06/11] drivers/net: " Manuel Zerpies
@ 2011-06-16 16:43 ` Joe Perches
0 siblings, 0 replies; 24+ messages in thread
From: Joe Perches @ 2011-06-16 16:43 UTC (permalink / raw)
To: Manuel Zerpies
Cc: David S. Miller, David Decotigny, Hans J. Koch, Jiri Kosina,
Ben Pfaff, netdev, linux-kernel, christian.dietrich
On Thu, 2011-06-16 at 14:12 +0200, Manuel Zerpies wrote:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()
[]
> diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
[]
> @@ -536,8 +537,7 @@ static bool _sc92031_check_media(struct net_device *dev)
>
> netif_carrier_on(dev);
>
> - if (printk_ratelimit())
> - printk(KERN_INFO "%s: link up, %sMbps, %s-duplex\n",
> + printk_ratelimited(KERN_INFO "%s: link up, %sMbps, %s-duplex\n",
> dev->name,
> speed_100 ? "100" : "10",
> duplex_full ? "full" : "half");
All these might be better using net_ratelimit and netdev_<level>
if (net_ratelimit())
netdev_info(dev, "link up, %uMbps, %s-duplex\n",
speed_100 ? 100 : 10,
duplex_full ? "full" : "half");
> @@ -549,8 +549,7 @@ static bool _sc92031_check_media(struct net_device *dev)
>
> _sc92031_disable_tx_rx(dev);
>
> - if (printk_ratelimit())
> - printk(KERN_INFO "%s: link down\n", dev->name);
> + printk_ratelimited(KERN_INFO "%s: link down\n", dev->name);
etc...
netdev_<level>_ratelimited (and netdev_<level>_once)
could instead be added and used I suppose.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 09/11] xen/xenbus: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:14 ` [PATCH 09/11] xen/xenbus: " Manuel Zerpies
@ 2011-06-16 21:00 ` Jeremy Fitzhardinge
2011-06-16 23:44 ` Joe Perches
0 siblings, 1 reply; 24+ messages in thread
From: Jeremy Fitzhardinge @ 2011-06-16 21:00 UTC (permalink / raw)
To: Manuel Zerpies
Cc: Jeremy Fitzhardinge, Konrad Rzeszutek Wilk, xen-devel,
virtualization, linux-kernel, christian.dietrich
On 06/16/2011 05:14 AM, Manuel Zerpies wrote:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()
>
Looks OK to me, but please fix the indentation of the rest of the
statement to match.
Thanks,
J
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
> drivers/xen/xenbus/xenbus_xs.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
> index 5534690..4055858 100644
> --- a/drivers/xen/xenbus/xenbus_xs.c
> +++ b/drivers/xen/xenbus/xenbus_xs.c
> @@ -44,6 +44,7 @@
> #include <linux/rwsem.h>
> #include <linux/module.h>
> #include <linux/mutex.h>
> +#include <linux/ratelimit.h>
> #include <xen/xenbus.h>
> #include "xenbus_comms.h"
>
> @@ -270,8 +271,7 @@ static void *xs_talkv(struct xenbus_transaction t,
> }
>
> if (msg.type != type) {
> - if (printk_ratelimit())
> - printk(KERN_WARNING
> + `printk_ratelimited(KERN_WARNING
> "XENBUS unexpected type [%d], expected [%d]\n",
> msg.type, type);
> kfree(ret);
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 09/11] xen/xenbus: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 21:00 ` Jeremy Fitzhardinge
@ 2011-06-16 23:44 ` Joe Perches
0 siblings, 0 replies; 24+ messages in thread
From: Joe Perches @ 2011-06-16 23:44 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: Manuel Zerpies, Jeremy Fitzhardinge, Konrad Rzeszutek Wilk,
xen-devel, virtualization, linux-kernel, christian.dietrich
On Thu, 2011-06-16 at 14:00 -0700, Jeremy Fitzhardinge wrote:
> On 06/16/2011 05:14 AM, Manuel Zerpies wrote:
> > Since printk_ratelimit() shouldn't be used anymore (see comment in
> > include/linux/printk.h), replace it with printk_ratelimited()
> Looks OK to me, but please fix the indentation of the rest of the
> statement to match.
[]
> > diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
[]
> > @@ -270,8 +271,7 @@ static void *xs_talkv(struct xenbus_transaction t,
> > }
> >
> > if (msg.type != type) {
> > - if (printk_ratelimit())
> > - printk(KERN_WARNING
> > + `printk_ratelimited(KERN_WARNING
Appears that it's not compile tested?
A stray "`" got put before printk_ratelimited()
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 03/11] net/can: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:08 ` [PATCH 03/11] net/can: " Manuel Zerpies
@ 2011-06-17 4:03 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2011-06-17 4:03 UTC (permalink / raw)
To: manuel.f.zerpies
Cc: socketcan, urs.thuermann, socketcan-core, netdev, linux-kernel,
christian.dietrich
From: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Date: Thu, 16 Jun 2011 14:08:01 +0200
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited().
>
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 04/11] net/rds: use prink_ratelimited() instead of printk_ratelimit()
2011-06-16 12:09 ` [PATCH 04/11] net/rds: use prink_ratelimited() " Manuel Zerpies
@ 2011-06-17 4:03 ` David Miller
0 siblings, 0 replies; 24+ messages in thread
From: David Miller @ 2011-06-17 4:03 UTC (permalink / raw)
To: manuel.f.zerpies
Cc: andy.grover, rds-devel, netdev, linux-kernel, christian.dietrich
From: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Date: Thu, 16 Jun 2011 14:09:57 +0200
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited()
>
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 14:19 ` Borislav Petkov
@ 2011-06-20 8:17 ` Manuel Zerpies
2011-06-20 8:22 ` Sergei Shtylyov
0 siblings, 1 reply; 24+ messages in thread
From: Manuel Zerpies @ 2011-06-20 8:17 UTC (permalink / raw)
To: Borislav Petkov, Manuel Zerpies, David S. Miller, linux-ide,
linux-kernel, christian.dietrich, sshtylyov
Hello,
2011/6/16 Borislav Petkov <bp@alien8.de>
>
> On Thu, Jun 16, 2011 at 02:06:37PM +0200, Manuel Zerpies wrote:
>
> Does the printk fit on one line if you do
>
> pr_warn_ratelimited(...)
>
> instead?
>
> Thanks.
>
> --
> Regards/Gruss,
> Boris.
No I'm affraid. I tried it, but it didn't fit the 80 chars per line
code-styling.
>Why not pr_warn_ratelimited()?
>WBR, Sergei
I just kind of ignored it. As you see, I built it in.
Here my new patch:
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
---
drivers/ide/ide-atapi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 6f218e01..c9e69d7 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -8,6 +8,7 @@
#include <linux/ide.h>
#include <linux/scatterlist.h>
#include <linux/gfp.h>
+#include <linux/ratelimit.h>
#include <scsi/scsi.h>
@@ -200,9 +201,8 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
err = blk_rq_map_kern(drive->queue, sense_rq, sense, sense_len,
GFP_NOIO);
if (unlikely(err)) {
- if (printk_ratelimit())
- printk(KERN_WARNING PFX "%s: failed to map sense "
- "buffer\n", drive->name);
+ pr_warn_ratelimited(PFX "%s: failed to map sense buffer\n",
+ drive->name);
return;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit()
2011-06-20 8:17 ` Manuel Zerpies
@ 2011-06-20 8:22 ` Sergei Shtylyov
0 siblings, 0 replies; 24+ messages in thread
From: Sergei Shtylyov @ 2011-06-20 8:22 UTC (permalink / raw)
To: Manuel Zerpies
Cc: Borislav Petkov, David S. Miller, linux-ide, linux-kernel,
christian.dietrich, sshtylyov
Hello.
On 20-06-2011 12:17, Manuel Zerpies wrote:
>> Does the printk fit on one line if you do
>> pr_warn_ratelimited(...)
>> instead?
>> Thanks.
>> --
>> Regards/Gruss,
>> Boris.
> No I'm affraid. I tried it, but it didn't fit the 80 chars per line
> code-styling.
It's enough that the string literal fits on one line.
>> Why not pr_warn_ratelimited()?
>> WBR, Sergei
> I just kind of ignored it. As you see, I built it in.
> Here my new patch:
> Since printk_ratelimit() shouldn't be used anymore (see comment in
> include/linux/printk.h), replace it with printk_ratelimited().
This doesn't match the patch anymore...
> Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
> drivers/ide/ide-atapi.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
> diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> index 6f218e01..c9e69d7 100644
> --- a/drivers/ide/ide-atapi.c
> +++ b/drivers/ide/ide-atapi.c
> @@ -8,6 +8,7 @@
> #include<linux/ide.h>
> #include<linux/scatterlist.h>
> #include<linux/gfp.h>
> +#include<linux/ratelimit.h>
>
> #include<scsi/scsi.h>
>
> @@ -200,9 +201,8 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
> err = blk_rq_map_kern(drive->queue, sense_rq, sense, sense_len,
> GFP_NOIO);
> if (unlikely(err)) {
> - if (printk_ratelimit())
> - printk(KERN_WARNING PFX "%s: failed to map sense "
> - "buffer\n", drive->name);
> + pr_warn_ratelimited(PFX "%s: failed to map sense buffer\n",
> + drive->name);
> return;
> }
Unfortunately, the new patch is whitespace-damaged.
WBR, Sergei
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() instead of printk_ratelimit()
2011-06-16 12:10 ` [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() " Manuel Zerpies
@ 2011-07-19 4:19 ` Roland Dreier
0 siblings, 0 replies; 24+ messages in thread
From: Roland Dreier @ 2011-07-19 4:19 UTC (permalink / raw)
To: Manuel Zerpies
Cc: Steve Wise, Sean Hefty, Hal Rosenstock, linux-rdma, linux-kernel,
christian.dietrich
Thanks, applied.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2011-07-19 4:20 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>
2011-06-16 12:06 ` [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit() Manuel Zerpies
2011-06-16 14:19 ` Borislav Petkov
2011-06-20 8:17 ` Manuel Zerpies
2011-06-20 8:22 ` Sergei Shtylyov
2011-06-16 14:32 ` Sergei Shtylyov
2011-06-16 12:07 ` [PATCH 02/11] drivers/tty: " Manuel Zerpies
2011-06-16 12:08 ` [PATCH 03/11] net/can: " Manuel Zerpies
2011-06-17 4:03 ` David Miller
2011-06-16 12:09 ` [PATCH 04/11] net/rds: use prink_ratelimited() " Manuel Zerpies
2011-06-17 4:03 ` David Miller
2011-06-16 12:10 ` [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() " Manuel Zerpies
2011-07-19 4:19 ` Roland Dreier
2011-06-16 12:12 ` [PATCH 06/11] drivers/net: " Manuel Zerpies
2011-06-16 16:43 ` Joe Perches
2011-06-16 12:12 ` [PATCH 07/11] drivers/usb/atm: " Manuel Zerpies
2011-06-16 14:37 ` Sergei Shtylyov
2011-06-16 12:13 ` [PATCH 08/11] [SCSI] tcm_fc: " Manuel Zerpies
2011-06-16 12:14 ` [PATCH 09/11] xen/xenbus: " Manuel Zerpies
2011-06-16 21:00 ` Jeremy Fitzhardinge
2011-06-16 23:44 ` Joe Perches
2011-06-16 12:15 ` [PATCH 10/11] wusb: " Manuel Zerpies
2011-06-16 14:34 ` Sergei Shtylyov
2011-06-16 12:15 ` [PATCH 11/11] usb/class: " Manuel Zerpies
2011-06-16 15:36 ` Pete Zaitcev
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).