aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYacine Belkadi <yacine.belkadi.1@gmail.com>2013-07-25 02:11:53 -0400
committerJiri Kosina <jkosina@suse.cz>2013-07-25 06:35:39 -0400
commit36019265cf81cdb2d366b28016bb00b936efc751 (patch)
tree4d6de5dece32b4f516021438fd495e6cb6f625cd
parentc9f3f2d8b3247b7e16b3cd66698e690ab4697301 (diff)
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>
-rw-r--r--include/linux/ktime.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index debf208b7611..31c0cd1c941a 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -69,7 +69,7 @@ typedef union ktime ktime_t; /* Kill this */
69 * @secs: seconds to set 69 * @secs: seconds to set
70 * @nsecs: nanoseconds to set 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 */
74static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) 74static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
75{ 75{
@@ -151,7 +151,7 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
151 * @lhs: minuend 151 * @lhs: minuend
152 * @rhs: subtrahend 152 * @rhs: subtrahend
153 * 153 *
154 * Returns the remainder of the subtraction 154 * Return: The remainder of the subtraction.
155 */ 155 */
156static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) 156static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
157{ 157{
@@ -169,7 +169,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
169 * @add1: addend1 169 * @add1: addend1
170 * @add2: addend2 170 * @add2: addend2
171 * 171 *
172 * Returns the sum of @add1 and @add2. 172 * Return: The sum of @add1 and @add2.
173 */ 173 */
174static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) 174static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
175{ 175{
@@ -195,7 +195,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
195 * @kt: addend 195 * @kt: addend
196 * @nsec: the scalar nsec value to add 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 */
200extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); 200extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
201 201
@@ -204,7 +204,7 @@ extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
204 * @kt: minuend 204 * @kt: minuend
205 * @nsec: the scalar nsec value to subtract 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 */
209extern ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec); 209extern ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec);
210 210
@@ -212,7 +212,7 @@ extern ktime_t ktime_sub_ns(const ktime_t kt, u64 nsec);
212 * timespec_to_ktime - convert a timespec to ktime_t format 212 * timespec_to_ktime - convert a timespec to ktime_t format
213 * @ts: the timespec variable to convert 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 */
217static inline ktime_t timespec_to_ktime(const struct timespec ts) 217static inline ktime_t timespec_to_ktime(const struct timespec ts)
218{ 218{
@@ -224,7 +224,7 @@ static inline ktime_t timespec_to_ktime(const struct timespec ts)
224 * timeval_to_ktime - convert a timeval to ktime_t format 224 * timeval_to_ktime - convert a timeval to ktime_t format
225 * @tv: the timeval variable to convert 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 */
229static inline ktime_t timeval_to_ktime(const struct timeval tv) 229static inline ktime_t timeval_to_ktime(const struct timeval tv)
230{ 230{
@@ -237,7 +237,7 @@ static inline ktime_t timeval_to_ktime(const struct timeval tv)
237 * ktime_to_timespec - convert a ktime_t variable to timespec format 237 * ktime_to_timespec - convert a ktime_t variable to timespec format
238 * @kt: the ktime_t variable to convert 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 */
242static inline struct timespec ktime_to_timespec(const ktime_t kt) 242static inline struct timespec ktime_to_timespec(const ktime_t kt)
243{ 243{
@@ -249,7 +249,7 @@ static inline struct timespec ktime_to_timespec(const ktime_t kt)
249 * ktime_to_timeval - convert a ktime_t variable to timeval format 249 * ktime_to_timeval - convert a ktime_t variable to timeval format
250 * @kt: the ktime_t variable to convert 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 */
254static inline struct timeval ktime_to_timeval(const ktime_t kt) 254static inline struct timeval ktime_to_timeval(const ktime_t kt)
255{ 255{
@@ -262,7 +262,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
262 * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds 262 * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
263 * @kt: the ktime_t variable to convert 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 */
267static inline s64 ktime_to_ns(const ktime_t kt) 267static inline s64 ktime_to_ns(const ktime_t kt)
268{ 268{
@@ -276,7 +276,9 @@ static inline s64 ktime_to_ns(const ktime_t kt)
276 * @cmp1: comparable1 276 * @cmp1: comparable1
277 * @cmp2: comparable2 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 */
281static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2) 283static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
282{ 284{
@@ -288,7 +290,7 @@ static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
288 * @cmp1: comparable1 290 * @cmp1: comparable1
289 * @cmp2: comparable2 291 * @cmp2: comparable2
290 * 292 *
291 * Returns ... 293 * Return: ...
292 * cmp1 < cmp2: return <0 294 * cmp1 < cmp2: return <0
293 * cmp1 == cmp2: return 0 295 * cmp1 == cmp2: return 0
294 * cmp1 > cmp2: return >0 296 * cmp1 > cmp2: return >0
@@ -342,7 +344,7 @@ extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs);
342 * @kt: the ktime_t variable to convert 344 * @kt: the ktime_t variable to convert
343 * @ts: the timespec variable to store the result in 345 * @ts: the timespec variable to store the result in
344 * 346 *
345 * Returns true if there was a successful conversion, false if kt was 0. 347 * Return: %true if there was a successful conversion, %false if kt was 0.
346 */ 348 */
347static inline __must_check bool ktime_to_timespec_cond(const ktime_t kt, 349static inline __must_check bool ktime_to_timespec_cond(const ktime_t kt,
348 struct timespec *ts) 350 struct timespec *ts)