History

timekeeping: Rename clockid_aux_valid() to clockid_is_aux_clock()

The current name is not clear about its behavior. Rename it.

Thomas Weißschuh (Schneider Electric) committed 3 months ago

Commit 4f39d3c1 parent 32a05ba2 files · +3 −3Browse files

Unified · Split

2 files
  1. include/linux/posix-timers.h +1 −1
  2. kernel/time/timekeeping.c +2 −2
include/linux/posix-timers.h+1−1
@@ -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
40static inline bool clockid_aux_valid(clockid_t id)40static 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}
kernel/time/timekeeping.c+2−2
@@ -3101,7 +3101,7 @@ static inline unsigned int clockid_to_tkid(unsigned int id) · 3100 unmodified lines
3101 3101
3102static inline struct tk_data *aux_get_tk_data(clockid_t id)3102static 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
3197static int aux_get_res(clockid_t id, struct timespec64 *tp)3197static 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;