Skip to content

Commit 7d35a00

Browse files
committed
firewire: ohci: obsolete direct usage of printk_ratelimit()
A commit 77006a0 ("ratelimit: add comment warning people off printk_ratelimit()") has already deprecated printk_ratelimit(). This commit uses alternative functions to obsolete its usage. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent cd70237 commit 7d35a00

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/firewire/ohci.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,13 +2268,11 @@ static irqreturn_t irq_handler(int irq, void *data)
22682268
reg_read(ohci, OHCI1394_PostedWriteAddressLo);
22692269
reg_write(ohci, OHCI1394_IntEventClear,
22702270
OHCI1394_postedWriteErr);
2271-
if (printk_ratelimit())
2272-
ohci_err(ohci, "PCI posted write error\n");
2271+
dev_err_ratelimited(ohci->card.device, "PCI posted write error\n");
22732272
}
22742273

22752274
if (unlikely(event & OHCI1394_cycleTooLong)) {
2276-
if (printk_ratelimit())
2277-
ohci_notice(ohci, "isochronous cycle too long\n");
2275+
dev_notice_ratelimited(ohci->card.device, "isochronous cycle too long\n");
22782276
reg_write(ohci, OHCI1394_LinkControlSet,
22792277
OHCI1394_LinkControl_cycleMaster);
22802278
}
@@ -2286,8 +2284,7 @@ static irqreturn_t irq_handler(int irq, void *data)
22862284
* stop active cycleMatch iso contexts now and restart
22872285
* them at least two cycles later. (FIXME?)
22882286
*/
2289-
if (printk_ratelimit())
2290-
ohci_notice(ohci, "isochronous cycle inconsistent\n");
2287+
dev_notice_ratelimited(ohci->card.device, "isochronous cycle inconsistent\n");
22912288
}
22922289

22932290
if (unlikely(event & OHCI1394_unrecoverableError))

0 commit comments

Comments
 (0)