diff options
author | George Spelvin <linux@horizon.com> | 2014-05-12 09:35:48 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2014-05-12 14:01:08 -0400 |
commit | ea54bca3aab3468daf1c37d15047ee66bca8760d (patch) | |
tree | feeba3d591aa46a375219cc16dd588884eb04cd5 | |
parent | cdafb93feb3d0ae3131f631a10f70954c96cbef8 (diff) |
ntp: Make is_error_status() use its argument
is_error_status() is an inline function always called with the
global time_status as an argument, so there's zero functional
difference with this change, but the non-CONFIG_NTP_PPS version
uses the passed-in argument, while the CONFIG_NTP_PPS one ignores
its argument and uses the global.
Looks like is_error_status was refactored out, but someone forgot
to change the logic to check the local argument value.
Thus this patch makes it use the argument always; shorter variable
names are good.
Signed-off-by: George Spelvin <linux@horizon.com>
[jstultz: Tweaked commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | kernel/time/ntp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 82b7c9edba7e..c8780cdaf852 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -165,21 +165,21 @@ static inline void pps_set_freq(s64 freq) | |||
165 | 165 | ||
166 | static inline int is_error_status(int status) | 166 | static inline int is_error_status(int status) |
167 | { | 167 | { |
168 | return (time_status & (STA_UNSYNC|STA_CLOCKERR)) | 168 | return (status & (STA_UNSYNC|STA_CLOCKERR)) |
169 | /* PPS signal lost when either PPS time or | 169 | /* PPS signal lost when either PPS time or |
170 | * PPS frequency synchronization requested | 170 | * PPS frequency synchronization requested |
171 | */ | 171 | */ |
172 | || ((time_status & (STA_PPSFREQ|STA_PPSTIME)) | 172 | || ((status & (STA_PPSFREQ|STA_PPSTIME)) |
173 | && !(time_status & STA_PPSSIGNAL)) | 173 | && !(status & STA_PPSSIGNAL)) |
174 | /* PPS jitter exceeded when | 174 | /* PPS jitter exceeded when |
175 | * PPS time synchronization requested */ | 175 | * PPS time synchronization requested */ |
176 | || ((time_status & (STA_PPSTIME|STA_PPSJITTER)) | 176 | || ((status & (STA_PPSTIME|STA_PPSJITTER)) |
177 | == (STA_PPSTIME|STA_PPSJITTER)) | 177 | == (STA_PPSTIME|STA_PPSJITTER)) |
178 | /* PPS wander exceeded or calibration error when | 178 | /* PPS wander exceeded or calibration error when |
179 | * PPS frequency synchronization requested | 179 | * PPS frequency synchronization requested |
180 | */ | 180 | */ |
181 | || ((time_status & STA_PPSFREQ) | 181 | || ((status & STA_PPSFREQ) |
182 | && (time_status & (STA_PPSWANDER|STA_PPSERROR))); | 182 | && (status & (STA_PPSWANDER|STA_PPSERROR))); |
183 | } | 183 | } |
184 | 184 | ||
185 | static inline void pps_fill_timex(struct timex *txc) | 185 | static inline void pps_fill_timex(struct timex *txc) |