scripts/coccinelle/misc/secs_to_jiffies.cocci
Source file repositories/reference/linux-study-clean/scripts/coccinelle/misc/secs_to_jiffies.cocci
File Facts
- System
- Linux kernel
- Corpus path
scripts/coccinelle/misc/secs_to_jiffies.cocci- Extension
.cocci- Size
- 1284 bytes
- Lines
- 72
- Domain
- Support Tooling And Documentation
- Bucket
- scripts
- Inferred role
- Support Tooling And Documentation: scripts
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
///
/// Find usages of:
/// - msecs_to_jiffies(value*1000)
/// - msecs_to_jiffies(value*MSEC_PER_SEC)
///
// Confidence: High
// Copyright: (C) 2024 Easwar Hariharan, Microsoft
// Keywords: secs, seconds, jiffies
// Options: --include-headers
virtual patch
virtual report
virtual context
@pconst depends on patch@ constant C; @@
- msecs_to_jiffies(C * 1000)
+ secs_to_jiffies(C)
@pconstms depends on patch@ constant C; @@
- msecs_to_jiffies(C * MSEC_PER_SEC)
+ secs_to_jiffies(C)
@pexpr depends on patch@ expression E; @@
- msecs_to_jiffies(E * 1000)
+ secs_to_jiffies(E)
@pexprms depends on patch@ expression E; @@
- msecs_to_jiffies(E * MSEC_PER_SEC)
+ secs_to_jiffies(E)
@r depends on report && !patch@
constant C;
expression E;
position p;
@@
(
msecs_to_jiffies(C@p * 1000)
|
msecs_to_jiffies(C@p * MSEC_PER_SEC)
|
msecs_to_jiffies(E@p * 1000)
|
msecs_to_jiffies(E@p * MSEC_PER_SEC)
)
@c depends on context && !patch@
constant C;
expression E;
@@
(
* msecs_to_jiffies(C * 1000)
|
* msecs_to_jiffies(C * MSEC_PER_SEC)
|
* msecs_to_jiffies(E * 1000)
|
* msecs_to_jiffies(E * MSEC_PER_SEC)
)
@script:python depends on report@
p << r.p;
@@
Annotation
- Atlas domain: Support Tooling And Documentation / scripts.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.