aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/ntp.c
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2018-07-13 08:06:42 -0400
committerJohn Stultz <john.stultz@linaro.org>2018-07-19 20:08:05 -0400
commit985e695074d35768cb04d65f58bca45f7bf1a99d (patch)
tree3d473a4a36fe660fd64cdabde116d57ff8434574 /kernel/time/ntp.c
parent86b2dcd4f02b86f6b5927fc0adcac777825f4030 (diff)
timekeeping/ntp: Constify some function arguments
Add 'const' to some function arguments and variables to make it easier to read the code. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Miroslav Lichvar <mlichvar@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> [jstultz: Also fixup pre-existing checkpatch warnings for prototype arguments with no variable name] Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time/ntp.c')
-rw-r--r--kernel/time/ntp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index a627cae8baab..c5e0cba3b39c 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -642,7 +642,7 @@ void ntp_notify_cmos_timer(void)
642/* 642/*
643 * Propagate a new txc->status value into the NTP state: 643 * Propagate a new txc->status value into the NTP state:
644 */ 644 */
645static inline void process_adj_status(struct timex *txc) 645static inline void process_adj_status(const struct timex *txc)
646{ 646{
647 if ((time_status & STA_PLL) && !(txc->status & STA_PLL)) { 647 if ((time_status & STA_PLL) && !(txc->status & STA_PLL)) {
648 time_state = TIME_OK; 648 time_state = TIME_OK;
@@ -665,7 +665,7 @@ static inline void process_adj_status(struct timex *txc)
665} 665}
666 666
667 667
668static inline void process_adjtimex_modes(struct timex *txc, s32 *time_tai) 668static inline void process_adjtimex_modes(const struct timex *txc, s32 *time_tai)
669{ 669{
670 if (txc->modes & ADJ_STATUS) 670 if (txc->modes & ADJ_STATUS)
671 process_adj_status(txc); 671 process_adj_status(txc);
@@ -716,7 +716,7 @@ static inline void process_adjtimex_modes(struct timex *txc, s32 *time_tai)
716 * adjtimex mainly allows reading (and writing, if superuser) of 716 * adjtimex mainly allows reading (and writing, if superuser) of
717 * kernel time-keeping variables. used by xntpd. 717 * kernel time-keeping variables. used by xntpd.
718 */ 718 */
719int __do_adjtimex(struct timex *txc, struct timespec64 *ts, s32 *time_tai) 719int __do_adjtimex(struct timex *txc, const struct timespec64 *ts, s32 *time_tai)
720{ 720{
721 int result; 721 int result;
722 722