Thread (39 messages) 39 messages, 8 authors, 2024-12-17

Re: [PATCH v3 16/19] staging: vc04_services: Convert timeouts to secs_to_jiffies()

From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: 2024-12-11 17:46:51
Also in: ath11k, ceph-devel, dri-devel, intel-xe, linux-block, linux-bluetooth, linux-mm, linux-s390, linux-scsi, linux-sound, linux-staging, linux-wireless, linuxppc-dev, live-patching, lkml, netfilter-devel, xen-devel

On Tue, 10 Dec 2024 at 22:02, Easwar Hariharan
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced
secs_to_jiffies(). As the value here is a multiple of 1000, use
secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication.

This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with
the following Coccinelle rules:
@@ constant C; @@

- msecs_to_jiffies(C * 1000)
+ secs_to_jiffies(C)
@@ constant C; @@

- msecs_to_jiffies(C * MSEC_PER_SEC)
+ secs_to_jiffies(C)
Signed-off-by: Easwar Hariharan <redacted>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
quoted hunk ↗ jump to hunk
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
index dc0d715ed97078ad0f0a41db78428db4f4135a76..0dbe76ee557032d7861acfc002cc203ff2e6971d 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
@@ -59,7 +59,7 @@ static int bcm2835_audio_send_msg_locked(struct bcm2835_audio_instance *instance

        if (wait) {
                if (!wait_for_completion_timeout(&instance->msg_avail_comp,
-                                                msecs_to_jiffies(10 * 1000))) {
+                                                secs_to_jiffies(10))) {
                        dev_err(instance->dev,
                                "vchi message timeout, msg=%d\n", m->type);
                        return -ETIMEDOUT;

--
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help