Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: hci_vhci: convert timeouts to secs_to_jiffies()

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:

@depends on patch@
expression E;
@@

-msecs_to_jiffies(E * 1000)
+secs_to_jiffies(E)

-msecs_to_jiffies(E * MSEC_PER_SEC)
+secs_to_jiffies(E)

Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Easwar Hariharan and committed by
Luiz Augusto von Dentz
a9d5131e 5df5dafc

+2 -2
+2 -2
drivers/bluetooth/hci_vhci.c
··· 316 316 unsigned int timeout) 317 317 { 318 318 #ifdef CONFIG_DEV_COREDUMP 319 - hdev->dump.timeout = msecs_to_jiffies(timeout * 1000); 319 + hdev->dump.timeout = secs_to_jiffies(timeout); 320 320 #endif 321 321 } 322 322 ··· 645 645 file->private_data = data; 646 646 nonseekable_open(inode, file); 647 647 648 - schedule_delayed_work(&data->open_timeout, msecs_to_jiffies(1000)); 648 + schedule_delayed_work(&data->open_timeout, secs_to_jiffies(1)); 649 649 650 650 return 0; 651 651 }