Skip to content

Commit c8b2639

Browse files
deborahbrouwermchehab
authored andcommitted
media: cec-pin: rename timer overrun variables
The cec pin timer overruns are measured in microseconds, but the variable names include the millisecond symbol "ms". To avoid confusion, replace "ms" with "us" in the variable names and printed status message. Signed-off-by: Deborah Brouwer <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 5cdd19b commit c8b2639

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

drivers/media/cec/core/cec-pin-priv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ struct cec_pin {
209209
u32 work_pin_events_dropped_cnt;
210210
ktime_t timer_ts;
211211
u32 timer_cnt;
212-
u32 timer_100ms_overruns;
213-
u32 timer_300ms_overruns;
212+
u32 timer_100us_overruns;
213+
u32 timer_300us_overruns;
214214
u32 timer_max_overrun;
215215
u32 timer_sum_overrun;
216216

drivers/media/cec/core/cec-pin.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,9 @@ static enum hrtimer_restart cec_pin_timer(struct hrtimer *timer)
854854
if (delta > 100 && pin->state != CEC_ST_IDLE) {
855855
/* Keep track of timer overruns */
856856
pin->timer_sum_overrun += delta;
857-
pin->timer_100ms_overruns++;
857+
pin->timer_100us_overruns++;
858858
if (delta > 300)
859-
pin->timer_300ms_overruns++;
859+
pin->timer_300us_overruns++;
860860
if (delta > pin->timer_max_overrun)
861861
pin->timer_max_overrun = delta;
862862
}
@@ -1207,15 +1207,15 @@ static void cec_pin_adap_status(struct cec_adapter *adap,
12071207
seq_printf(file, "cec pin events dropped: %u\n",
12081208
pin->work_pin_events_dropped_cnt);
12091209
seq_printf(file, "irq failed: %d\n", pin->enable_irq_failed);
1210-
if (pin->timer_100ms_overruns) {
1211-
seq_printf(file, "timer overruns > 100ms: %u of %u\n",
1212-
pin->timer_100ms_overruns, pin->timer_cnt);
1213-
seq_printf(file, "timer overruns > 300ms: %u of %u\n",
1214-
pin->timer_300ms_overruns, pin->timer_cnt);
1210+
if (pin->timer_100us_overruns) {
1211+
seq_printf(file, "timer overruns > 100us: %u of %u\n",
1212+
pin->timer_100us_overruns, pin->timer_cnt);
1213+
seq_printf(file, "timer overruns > 300us: %u of %u\n",
1214+
pin->timer_300us_overruns, pin->timer_cnt);
12151215
seq_printf(file, "max timer overrun: %u usecs\n",
12161216
pin->timer_max_overrun);
12171217
seq_printf(file, "avg timer overrun: %u usecs\n",
1218-
pin->timer_sum_overrun / pin->timer_100ms_overruns);
1218+
pin->timer_sum_overrun / pin->timer_100us_overruns);
12191219
}
12201220
if (pin->rx_start_bit_low_too_short_cnt)
12211221
seq_printf(file,
@@ -1245,8 +1245,8 @@ static void cec_pin_adap_status(struct cec_adapter *adap,
12451245
seq_printf(file, "tx detected low drive: %u\n", pin->tx_low_drive_cnt);
12461246
pin->work_pin_events_dropped_cnt = 0;
12471247
pin->timer_cnt = 0;
1248-
pin->timer_100ms_overruns = 0;
1249-
pin->timer_300ms_overruns = 0;
1248+
pin->timer_100us_overruns = 0;
1249+
pin->timer_300us_overruns = 0;
12501250
pin->timer_max_overrun = 0;
12511251
pin->timer_sum_overrun = 0;
12521252
pin->rx_start_bit_low_too_short_cnt = 0;

0 commit comments

Comments
 (0)