The current name is not clear about its behavior. Rename it.
Unified · Split
| @@ -37,7 +37,7 @@ static inline int clockid_to_fd(const clockid_t clk) · 36 unmodified lines | |||
| 37 | return ~(clk >> 3); | 37 | return ~(clk >> 3); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static inline bool clockid_aux_valid(clockid_t id) | 40 | static inline bool clockid_is_aux_clock(clockid_t id) |
| 41 | { | 41 | { |
| 42 | return IS_ENABLED(CONFIG_POSIX_AUX_CLOCKS) && id >= CLOCK_AUX && id <= CLOCK_AUX_LAST; | 42 | return IS_ENABLED(CONFIG_POSIX_AUX_CLOCKS) && id >= CLOCK_AUX && id <= CLOCK_AUX_LAST; |
| 43 | } | 43 | } |
| @@ -3101,7 +3101,7 @@ static inline unsigned int clockid_to_tkid(unsigned int id) · 3100 unmodified lines | |||
| 3101 | 3101 | ||
| 3102 | static inline struct tk_data *aux_get_tk_data(clockid_t id) | 3102 | static inline struct tk_data *aux_get_tk_data(clockid_t id) |
| 3103 | { | 3103 | { |
| 3104 | if (!clockid_aux_valid(id)) | 3104 | if (!clockid_is_aux_clock(id)) |
| 3105 | return NULL; | 3105 | return NULL; |
| 3106 | return &timekeeper_data[clockid_to_tkid(id)]; | 3106 | return &timekeeper_data[clockid_to_tkid(id)]; |
| 3107 | } | 3107 | } |
| @@ -3196,7 +3196,7 @@ EXPORT_SYMBOL_GPL(ktime_get_aux_ts64); · 88 unmodified lines | |||
| 3196 | 3196 | ||
| 3197 | static int aux_get_res(clockid_t id, struct timespec64 *tp) | 3197 | static int aux_get_res(clockid_t id, struct timespec64 *tp) |
| 3198 | { | 3198 | { |
| 3199 | if (!clockid_aux_valid(id)) | 3199 | if (!clockid_is_aux_clock(id)) |
| 3200 | return -ENODEV; | 3200 | return -ENODEV; |
| 3201 | 3201 | ||
| 3202 | tp->tv_sec = aux_clock_resolution_ns() / NSEC_PER_SEC; | 3202 | tp->tv_sec = aux_clock_resolution_ns() / NSEC_PER_SEC; |