On 2/25/2025 1:09 PM, Christophe JAILLET wrote:
> Le 25/02/2025 à 21:17, Easwar Hariharan a écrit :
>> Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced
>> secs_to_jiffies(). As the value here is a multiple of 1000, use
>> secs_to_jiffies() i
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Acked-by: Mark Brown
Signed-off-by: Easwar Hariharan
---
drivers/spi/spi-fsl-lpspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
On 2/25/2025 12:17 PM, Easwar Hariharan wrote:
> 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
>
>
multiplication involved.
Acked-by: Ilya Dryomov
Signed-off-by: Easwar Hariharan
---
include/linux/ceph/libceph.h | 12 ++--
net/ceph/ceph_common.c | 18 ++
net/ceph/osd_client.c| 3 +--
3 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/include/linux
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/accel/habanalabs/common/command_submission.c | 2 +-
drivers/accel/habanalabs/common/debugfs.c| 2 +
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/ata/libata-zpodd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ata/libata
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/platform/x86/amd/pmf/acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x
Teach the script to suggest conversions for timeout patterns where the
arguments to msecs_to_jiffies() are expressions as well.
Signed-off-by: Easwar Hariharan
---
scripts/coccinelle/misc/secs_to_jiffies.cocci | 10 ++
1 file changed, 10 insertions(+)
diff --git a/scripts/coccinelle
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/power/supply/da9030_battery.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/po
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Acked-by: David Sterba
Signed-off-by: Easwar Hariharan
---
fs/btrfs/disk-io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/
cation involved.
Acked-by: Ilya Dryomov
Signed-off-by: Easwar Hariharan
---
drivers/block/rbd.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index
faafd7ff43d6ef53110ab3663cc7ac322214cc8c..41207133e21e9203192adf3b92390818e
i 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)
While here, convert some timeouts that are denominated in seconds
manually.
Signed-off-by: Easwar Hariharan
---
drivers
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/platform/x86/thinkpad_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pl
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/inf
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Acked-by: Keith Busch
Signed-off-by: Easwar Hariharan
---
drivers/nvme/host/core.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Acked-by: Darrick J. Wong
Reviewed-by: Carlos Maiolino
Signed-off-by: Easwar Hariharan
---
fs/xfs/xfs_icache.c | 2 +-
fs/xfs/xfs_sysfs.c | 8 ---
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Acked-by: Takashi Iwai
Signed-off-by: Easwar Hariharan
---
sound/pci/ac97/ac97_codec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a
.
This series is based on next-20250225
Signed-off-by: Easwar Hariharan
*
https://lore.kernel.org/all/20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9...@linux.microsoft.com/
---
Changes in v3:
- Change commit message prefix from libata: zpodd to ata: libata-zpodd: in
patch 8 (Damien)
- Split up
i with
the following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Acked-by: Mark Brown
Signed-off-by: Easwar Hariharan
---
drivers/spi/spi-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drive
On 1/28/2025 4:16 PM, Andrew Morton wrote:
> On Tue, 28 Jan 2025 18:21:45 +0000 Easwar Hariharan
> wrote:
>
>> This is the second series (part 1*) that converts users of
>> msecs_to_jiffies() that
>> either use the multiply pattern of either of:
>&
On 1/30/2025 3:01 AM, Markus Elfring wrote:
>> Teach the script to suggest conversions for timeout patterns where the
>> arguments to msecs_to_jiffies() are expressions as well.
>
> Does anything hinder to benefit any more from a source code analysis approach
> (like the following by the extended
On 1/28/2025 10:21 AM, Easwar Hariharan wrote:
> 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 i
On 1/29/2025 9:12 AM, Easwar Hariharan wrote:
> On 1/28/2025 9:21 PM, Christoph Hellwig wrote:
>> On Tue, Jan 28, 2025 at 06:21:54PM +0000, Easwar Hariharan wrote:
>>> else
>>> - cfg->retry_timeout = msecs_to_jiffies(
>>> -
On 1/28/2025 4:21 PM, Damien Le Moal wrote:
> On 1/29/25 3:21 AM, Easwar Hariharan wrote:
>> 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 o
On 1/28/2025 9:21 PM, Christoph Hellwig wrote:
> On Tue, Jan 28, 2025 at 06:21:54PM +0000, Easwar Hariharan wrote:
>> else
>> -cfg->retry_timeout = msecs_to_jiffies(
>> -init[i].retr
On 1/29/2025 5:12 AM, Ilpo Järvinen wrote:
> On Tue, 28 Jan 2025, Easwar Hariharan wrote:
>
>> Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced
>> secs_to_jiffies(). As the value here is a multiple of 1000, use
>> secs_to_jiffies() instea
On 1/28/2025 1:02 PM, Markus Elfring wrote:
>> Teach the script to suggest conversions for timeout patterns where the
>> arguments to msecs_to_jiffies() are expressions as well.
>
> I propose to take another look at implementation details for such a script
> variant
> according to the semantic pa
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
fs/btrfs/disk-io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/nvme/host/core.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/host/core.c
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/power/supply/da9030_battery.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/po
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/block/rbd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/rbd.c b/dri
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/accel/habanalabs/common/command_submission.c | 2 +-
drivers/accel/habanalabs/common/debugfs.c| 2 +
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/inf
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/scsi/lpfc/lpfc_init.c | 4 ++--
drivers/scsi/lpfc/lpfc_scsi.c | 12 +---
drivers/scsi/lpfc/lpfc_sl
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/platform/x86/thinkpad_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pl
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/spi/spi-fsl-lpspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/platform/x86/amd/pmf/acpi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/platfo
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
net/ceph/ceph_common.c | 10 --
net/ceph/osd_client.c | 3 +--
2 files changed, 5 insertions(+), 8 deletions(-)
.
This series is based on next-20250128
Signed-off-by: Easwar Hariharan
*
https://lore.kernel.org/all/20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9...@linux.microsoft.com/
---
Easwar Hariharan (16):
coccinelle: misc: secs_to_jiffies: Patch expressions too
scsi: lpfc: convert
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/spi/spi-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-imx.c b/drive
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
drivers/ata/libata-zpodd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/ata/libata-zpodd.c
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
sound/pci/ac97/ac97_codec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/pci/ac97/ac97_codec
following Coccinelle rules:
@depends on patch@
expression E;
@@
-msecs_to_jiffies
+secs_to_jiffies
(E
- * \( 1000 \| MSEC_PER_SEC \)
)
Signed-off-by: Easwar Hariharan
---
fs/xfs/xfs_icache.c | 2 +-
fs/xfs/xfs_sysfs.c | 7 +++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --gi
Teach the script to suggest conversions for timeout patterns where the
arguments to msecs_to_jiffies() are expressions as well.
Signed-off-by: Easwar Hariharan
---
scripts/coccinelle/misc/secs_to_jiffies.cocci | 22 --
1 file changed, 16 insertions(+), 6 deletions(-)
diff
On 12/10/2024 5:00 PM, Easwar Hariharan wrote:
> On 12/10/2024 4:35 PM, Andrew Morton wrote:
>> On Tue, 10 Dec 2024 22:02:31 +0000 Easwar Hariharan
>> wrote:
>>
>>> This is a series that follows up on my previous series to introduce
>>> secs_to_ji
On 12/17/2024 9:33 AM, Julia Lawall wrote:
>
>
> On Tue, 17 Dec 2024, Alexander Gordeev wrote:
>
>> On Tue, Dec 10, 2024 at 10:02:33PM +, Easwar Hariharan wrote:
>>
>> Hi Easwar,
>>
>>> This script finds and suggests conversions of timeout pa
On 12/10/2024 6:41 PM, Jakub Kicinski wrote:
> On Tue, 10 Dec 2024 18:31:30 -0800 Andrew Morton wrote:
I'll just grab everything and see if anyone complains ;)
>>>
>>> I may, if this leads to a conflict :(
>>
>> Very unlikely, and any such conflict will be trivial.
>
> Agreed, mainly I do
On 12/10/2024 4:35 PM, Andrew Morton wrote:
> On Tue, 10 Dec 2024 22:02:31 +0000 Easwar Hariharan
> wrote:
>
>> This is a series that follows up on my previous series to introduce
>> secs_to_jiffies() and convert a few initial users.
>
> Thanks, I added this to mm.g
i 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
---
arch/s390/kernel/lgr.c | 2 +-
arch/s390/kernel/time.c | 4 ++--
arch/s
None of the higher order definitions are used anymore, so remove
definitions for minutes, hours, and days timeouts. Convert the seconds
denominated timeouts to secs_to_jiffies()
Signed-off-by: Easwar Hariharan
---
net/netfilter/nf_conntrack_proto_sctp.c | 21 -
1 file
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
---
drivers/block/xen-blkback/blkback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
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
---
samples/livepatch/livepatch-callbacks-busymod.c | 3 +--
samples/livepatch/livepa
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
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +-
1 file changed, 1
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
---
arch/powerpc/platforms/pseries/papr_scm.c | 2 +-
1 file changed, 1 insertion(+),
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)
Reviewed-by: Thomas Hellström
Signed-off-by: Easwar Hariharan
---
drivers/gpu/drm/xe/xe_device.c | 2 +-
1 file
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
---
drivers/scsi/arcmsr/arcmsr_hba.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
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
---
sound/usb/line6/toneport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
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)
Acked-by: Jeff Johnson
Signed-off-by: Easwar Hariharan
---
drivers/net/wireless/ath/ath11k/debugfs.c | 2 +-
1 file
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
---
mm/kmemleak.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
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
---
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 6 ++
1 file changed, 2 insert
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
---
fs/ceph/quota.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
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
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
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
---
drivers/scsi/pm8001/pm8001_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
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
---
drivers/scsi/lpfc/lpfc_init.c | 18 +-
drivers/scsi/lpfc/lpfc_n
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
---
drivers/accel/habanalabs/common/device.c | 2 +-
drivers/accel/habanal
This script finds and suggests conversions of timeout patterns that
result in seconds-denominated timeouts to use the new secs_to_jiffies()
API in include/linux/jiffies.h for better readability.
Suggested-by: Anna-Maria Behnsen
Signed-off-by: Easwar Hariharan
---
scripts/coccinelle/misc
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
---
arch/arm/mach-pxa/sharpsl_pm.c | 8
1 file changed, 4 insertions(+), 4
address other possible variant patterns.
CC: Anna-Maria Behnsen
Signed-off-by: Easwar Hariharan
[1]
https://lore.kernel.org/all/20241030-open-coded-timeouts-v3-0-9ba123fac...@linux.microsoft.com/
[2] https://lore.kernel.org/all/8734kngfni.fsf@somnus/
---
Changes in v3:
- Rebase on next
On 11/29/2024 4:57 AM, Przemek Kitszel wrote:
>
> [removed most non-list recipients, it's just too much]
>
> On 11/15/24 10:26 PM, Easwar Hariharan wrote:
>>
>> ---
>> Changes in v2:
>> - EDITME: describe what is new in this series revision.
>> -
On 11/16/2024 1:52 AM, Christophe Leroy wrote:
>
>
> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit :
>> [Vous ne recevez pas souvent de courriers de
>> eahar...@linux.microsoft.com. Découvrez pourquoi ceci est important à
>> https://aka.ms/LearnAboutSenderIdentifica
On 11/18/2024 3:06 AM, Petr Mladek wrote:
> On Sat 2024-11-16 11:10:52, Christophe Leroy wrote:
>>
>>
>> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit :
>>> [Vous ne recevez pas souvent de courriers de eahar...@linux.microsoft.com.
>>> Découvrez pourquoi c
On 11/16/2024 1:40 AM, Christophe Leroy wrote:
>
>
> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit :
>> [Vous ne recevez pas souvent de courriers de
>> eahar...@linux.microsoft.com. Découvrez pourquoi ceci est important à
>> https://aka.ms/LearnAboutSenderIdentif
On 11/15/2024 10:05 PM, Christophe JAILLET wrote:
> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit :
>> Suggested-by: Anna-Maria Behnsen
>> Signed-off-by: Easwar Hariharan
>> ---
>> scripts/coccinelle/misc/secs_to_jiffies.cocci | 21 +
>>
On 11/16/2024 2:23 AM, LEROY Christophe wrote:
>
>
> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit :
>> [Vous ne recevez pas souvent de courriers de eahar...@linux.microsoft.com.
>> Découvrez pourquoi ceci est important à
>> https://aka.ms/LearnAboutSenderIdent
Changes made 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
---
arch/s390/kernel/lgr.c | 3 ++-
arch/s390/kernel/time.c
On 11/15/2024 1:26 PM, Easwar Hariharan wrote:
> This is a series that follows up on my previous series to introduce
> secs_to_jiffies() and convert a few initial users.[1] In the review for
> that series, Anna-Maria requested converting other users with
> Coccinelle. This is part 1 t
On 11/15/2024 2:34 PM, Stephen Rothwell wrote:
> Hi Easwar,
>
> On Fri, 15 Nov 2024 21:26:18 +0000 Easwar Hariharan
> wrote:
>>
>> static const unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] = {
>> -[SCTP_CONNTRACK_CLOSED] = 10 SECS,
>&
On 11/15/2024 2:38 PM, Stephen Rothwell wrote:
> Hi Easwar,
>
> On Fri, 15 Nov 2024 21:22:33 +0000 Easwar Hariharan
> wrote:
>>
>> -#define SHARPSL_CHARGE_ON_TIME_INTERVAL
>> (msecs_to_jiffies(1*60*1000)) /* 1 min */
>>
On 11/15/2024 1:41 PM, Jeff Johnson wrote:
> On 11/15/2024 1:29 PM, Easwar Hariharan wrote:
>> On 11/15/2024 1:26 PM, Easwar Hariharan wrote:
>>> This is a series that follows up on my previous series to introduce
>>> secs_to_jiffies() and convert a few initial users.[1]
Changes made 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
---
drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +-
1
Changes made 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
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
On 11/15/2024 1:30 PM, Jeff Johnson wrote:
> On 11/15/2024 1:22 PM, Easwar Hariharan wrote:
>> secs_to_jiffies() is defined in hci_event.c and cannot be reused by
>> other call sites. Hoist it into the core code to allow conversion of the
>> ~1150 usages of msecs_to_
Behnsen
Signed-off-by: Easwar Hariharan
[1]
https://lore.kernel.org/all/20241030-open-coded-timeouts-v3-0-9ba123fac...@linux.microsoft.com/
[2] https://lore.kernel.org/all/8734kngfni.fsf@somnus/
---
Changes in v2:
- EDITME: describe what is new in this series revision.
- EDITME: use
Changes made 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
---
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 6 ++
1
Changes made 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
---
samples/livepatch/livepatch-callbacks-busymod.c | 2
Changes made 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
---
drivers/gpu/drm/xe/xe_device.c | 2 +-
1 file changed, 1
Suggested-by: Anna-Maria Behnsen
Signed-off-by: Easwar Hariharan
---
scripts/coccinelle/misc/secs_to_jiffies.cocci | 21 +
1 file changed, 21 insertions(+)
diff --git a/scripts/coccinelle/misc/secs_to_jiffies.cocci
b/scripts/coccinelle/misc/secs_to_jiffies.cocci
new file
Changes made 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
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion
Changes made 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
---
drivers/accel/habanalabs/common/device.c | 2
Changes made 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
---
drivers/block/xen-blkback/blkback.c | 2 +-
1 file changed, 1
Changes made 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
---
drivers/scsi/pm8001/pm8001_init.c | 2 +-
1 file changed, 1
Changes made 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
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
Changes made 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
---
drivers/scsi/arcmsr/arcmsr_hba.c | 2 +-
1 file changed, 1
Changes made 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
---
drivers/scsi/lpfc/lpfc_init.c | 18
Changes made 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
---
drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +-
1
Changes made 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
---
drivers/scsi/pm8001/pm8001_init.c | 2 +-
1 file changed, 1
None of the higher order definitions are used anymore, so remove
definitions for minutes, hours, and days timeouts. Convert the seconds
denominated timeouts to secs_to_jiffies()
Signed-off-by: Easwar Hariharan
---
net/netfilter/nf_conntrack_proto_sctp.c | 21 -
1 file
Changes made 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
---
fs/ceph/quota.c | 2 +-
1 file changed, 1 insertion(+), 1
Changes made 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
---
drivers/net/wireless/ath/ath11k/debugfs.c | 2 +-
1 file
Changes made 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
---
sound/usb/line6/toneport.c | 2 +-
1 file changed, 1
1 - 100 of 204 matches
Mail list logo