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

ktime: fix some scripts/kernel-doc warnings

When building the htmldocs (in verbose mode), scripts/kernel-doc reports the
following type of warnings:
Warning(include/linux/ktime.h:75): No description found for return value of
'ktime_set'

Fix them by using a "Return:" section to describe the return values.
(Also apply some minor reformatting along the way.)

Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Yacine Belkadi and committed by
Jiri Kosina
36019265 c9f3f2d8

+15 -13
+15 -13
include/linux/ktime.h
··· 69 69 * @secs: seconds to set 70 70 * @nsecs: nanoseconds to set 71 71 * 72 - * Return the ktime_t representation of the value 72 + * Return: The ktime_t representation of the value. 73 73 */ 74 74 static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) 75 75 { ··· 151 151 * @lhs: minuend 152 152 * @rhs: subtrahend 153 153 * 154 - * Returns the remainder of the subtraction 154 + * Return: The remainder of the subtraction. 155 155 */ 156 156 static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) 157 157 { ··· 169 169 * @add1: addend1 170 170 * @add2: addend2 171 171 * 172 - * Returns the sum of @add1 and @add2. 172 + * Return: The sum of @add1 and @add2. 173 173 */ 174 174 static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) 175 175 { ··· 195 195 * @kt: addend 196 196 * @nsec: the scalar nsec value to add 197 197 * 198 - * Returns the sum of @kt and @nsec in ktime_t format 198 + * Return: The sum of @kt and @nsec in ktime_t format. 199 199 */ 200 200 extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); 201 201 ··· 204 204 * @kt: minuend 205 205 * @nsec: the scalar nsec value to subtract 206 206 * 207 - * Returns the subtraction of @nsec from @kt in ktime_t format 207 + * Return: The subtraction of @nsec from @kt in ktime_t format. 208 208 */ 209 209 extern ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec); 210 210 ··· 212 212 * timespec_to_ktime - convert a timespec to ktime_t format 213 213 * @ts: the timespec variable to convert 214 214 * 215 - * Returns a ktime_t variable with the converted timespec value 215 + * Return: A ktime_t variable with the converted timespec value. 216 216 */ 217 217 static inline ktime_t timespec_to_ktime(const struct timespec ts) 218 218 { ··· 224 224 * timeval_to_ktime - convert a timeval to ktime_t format 225 225 * @tv: the timeval variable to convert 226 226 * 227 - * Returns a ktime_t variable with the converted timeval value 227 + * Return: A ktime_t variable with the converted timeval value. 228 228 */ 229 229 static inline ktime_t timeval_to_ktime(const struct timeval tv) 230 230 { ··· 237 237 * ktime_to_timespec - convert a ktime_t variable to timespec format 238 238 * @kt: the ktime_t variable to convert 239 239 * 240 - * Returns the timespec representation of the ktime value 240 + * Return: The timespec representation of the ktime value. 241 241 */ 242 242 static inline struct timespec ktime_to_timespec(const ktime_t kt) 243 243 { ··· 249 249 * ktime_to_timeval - convert a ktime_t variable to timeval format 250 250 * @kt: the ktime_t variable to convert 251 251 * 252 - * Returns the timeval representation of the ktime value 252 + * Return: The timeval representation of the ktime value. 253 253 */ 254 254 static inline struct timeval ktime_to_timeval(const ktime_t kt) 255 255 { ··· 262 262 * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds 263 263 * @kt: the ktime_t variable to convert 264 264 * 265 - * Returns the scalar nanoseconds representation of @kt 265 + * Return: The scalar nanoseconds representation of @kt. 266 266 */ 267 267 static inline s64 ktime_to_ns(const ktime_t kt) 268 268 { ··· 276 276 * @cmp1: comparable1 277 277 * @cmp2: comparable2 278 278 * 279 - * Compare two ktime_t variables, returns 1 if equal 279 + * Compare two ktime_t variables. 280 + * 281 + * Return: 1 if equal. 280 282 */ 281 283 static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2) 282 284 { ··· 290 288 * @cmp1: comparable1 291 289 * @cmp2: comparable2 292 290 * 293 - * Returns ... 291 + * Return: ... 294 292 * cmp1 < cmp2: return <0 295 293 * cmp1 == cmp2: return 0 296 294 * cmp1 > cmp2: return >0 ··· 344 342 * @kt: the ktime_t variable to convert 345 343 * @ts: the timespec variable to store the result in 346 344 * 347 - * Returns true if there was a successful conversion, false if kt was 0. 345 + * Return: %true if there was a successful conversion, %false if kt was 0. 348 346 */ 349 347 static inline __must_check bool ktime_to_timespec_cond(const ktime_t kt, 350 348 struct timespec *ts)