Skip to content

Commit aa7cbef

Browse files
rddunlapIngo Molnar
authored andcommitted
time/timecounter: Fix inline documentation
Fix kernel-doc warnings, text punctuation, and a kernel-doc marker (change '%' to '&' to indicate a struct): timecounter.h:72: warning: No description found for return value of 'cyclecounter_cyc2ns' timecounter.h:85: warning: Function parameter or member 'tc' not described in 'timecounter_adjtime' timecounter.h:111: warning: No description found for return value of 'timecounter_read' timecounter.h:128: warning: No description found for return value of 'timecounter_cyc2time' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20240331172652.14086-2-rdunlap@infradead.org
1 parent 39cd87c commit aa7cbef

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

include/linux/timecounter.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
* @read: returns the current cycle value
2424
* @mask: bitmask for two's complement
25-
* subtraction of non 64 bit counters,
25+
* subtraction of non-64-bit counters,
2626
* see CYCLECOUNTER_MASK() helper macro
2727
* @mult: cycle to nanosecond multiplier
2828
* @shift: cycle to nanosecond divisor (power of two)
@@ -35,7 +35,7 @@ struct cyclecounter {
3535
};
3636

3737
/**
38-
* struct timecounter - layer above a %struct cyclecounter which counts nanoseconds
38+
* struct timecounter - layer above a &struct cyclecounter which counts nanoseconds
3939
* Contains the state needed by timecounter_read() to detect
4040
* cycle counter wrap around. Initialize with
4141
* timecounter_init(). Also used to convert cycle counts into the
@@ -66,6 +66,8 @@ struct timecounter {
6666
* @cycles: Cycles
6767
* @mask: bit mask for maintaining the 'frac' field
6868
* @frac: pointer to storage for the fractional nanoseconds.
69+
*
70+
* Returns: cycle counter cycles converted to nanoseconds
6971
*/
7072
static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc,
7173
u64 cycles, u64 mask, u64 *frac)
@@ -79,6 +81,7 @@ static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc,
7981

8082
/**
8183
* timecounter_adjtime - Shifts the time of the clock.
84+
* @tc: The &struct timecounter to adjust
8285
* @delta: Desired change in nanoseconds.
8386
*/
8487
static inline void timecounter_adjtime(struct timecounter *tc, s64 delta)
@@ -107,6 +110,8 @@ extern void timecounter_init(struct timecounter *tc,
107110
*
108111
* In other words, keeps track of time since the same epoch as
109112
* the function which generated the initial time stamp.
113+
*
114+
* Returns: nanoseconds since the initial time stamp
110115
*/
111116
extern u64 timecounter_read(struct timecounter *tc);
112117

@@ -123,6 +128,8 @@ extern u64 timecounter_read(struct timecounter *tc);
123128
*
124129
* This allows conversion of cycle counter values which were generated
125130
* in the past.
131+
*
132+
* Returns: cycle counter converted to nanoseconds since the initial time stamp
126133
*/
127134
extern u64 timecounter_cyc2time(const struct timecounter *tc,
128135
u64 cycle_tstamp);

0 commit comments

Comments
 (0)