From a9e2195e655f46dd7a886e076724d6273401d241 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 7 Apr 2021 16:27:00 -0600 Subject: [PATCH] Remove unused 'running' field from freerun lower half drivers. That field is never used and, in most cases, is never initialized correctly. This should have no impact to anything with the possible exception of free-running drivers. Verified using CI builds only. --- arch/arm/src/sam34/sam4cm_freerun.c | 1 - arch/arm/src/sam34/sam4cm_freerun.h | 1 - arch/arm/src/sama5/sam_freerun.c | 1 - arch/arm/src/sama5/sam_freerun.h | 1 - arch/arm/src/samd5e5/sam_freerun.c | 1 - arch/arm/src/samd5e5/sam_freerun.h | 1 - arch/arm/src/samv7/sam_freerun.c | 1 - arch/arm/src/samv7/sam_freerun.h | 1 - arch/arm/src/stm32/stm32_freerun.c | 1 - arch/arm/src/stm32/stm32_freerun.h | 1 - arch/arm/src/stm32l4/stm32l4_freerun.c | 1 - arch/arm/src/stm32l4/stm32l4_freerun.h | 1 - arch/mips/src/pic32mz/pic32mz_freerun.c | 3 --- arch/mips/src/pic32mz/pic32mz_freerun.h | 1 - 14 files changed, 16 deletions(-) diff --git a/arch/arm/src/sam34/sam4cm_freerun.c b/arch/arm/src/sam34/sam4cm_freerun.c index 5e0c73891e..5f46155220 100644 --- a/arch/arm/src/sam34/sam4cm_freerun.c +++ b/arch/arm/src/sam34/sam4cm_freerun.c @@ -183,7 +183,6 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, */ freerun->chan = chan; - freerun->running = false; freerun->overflow = 0; /* Set up to receive the callback when the counter overflow occurs */ diff --git a/arch/arm/src/sam34/sam4cm_freerun.h b/arch/arm/src/sam34/sam4cm_freerun.h index 91e8b79785..3c8b7fc8d3 100644 --- a/arch/arm/src/sam34/sam4cm_freerun.h +++ b/arch/arm/src/sam34/sam4cm_freerun.h @@ -53,7 +53,6 @@ struct sam_freerun_s { uint8_t chan; /* The timer/counter in use */ - bool running; /* True: the timer is running */ uint32_t overflow; /* Timer counter overflow */ TC_HANDLE tch; /* Handle returned by sam_tc_initialize() */ }; diff --git a/arch/arm/src/sama5/sam_freerun.c b/arch/arm/src/sama5/sam_freerun.c index f5b26f6ec7..901477b861 100644 --- a/arch/arm/src/sama5/sam_freerun.c +++ b/arch/arm/src/sama5/sam_freerun.c @@ -184,7 +184,6 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, */ freerun->chan = chan; - freerun->running = false; freerun->overflow = 0; /* Set up to receive the callback when the counter overflow occurs */ diff --git a/arch/arm/src/sama5/sam_freerun.h b/arch/arm/src/sama5/sam_freerun.h index 4f96bfb6df..f27df52c06 100644 --- a/arch/arm/src/sama5/sam_freerun.h +++ b/arch/arm/src/sama5/sam_freerun.h @@ -53,7 +53,6 @@ struct sam_freerun_s { uint8_t chan; /* The timer/counter in use */ - bool running; /* True: the timer is running */ uint16_t overflow; /* Timer counter overflow */ TC_HANDLE tch; /* Handle returned by sam_tc_initialize() */ }; diff --git a/arch/arm/src/samd5e5/sam_freerun.c b/arch/arm/src/samd5e5/sam_freerun.c index 91d68e96ce..71504abd16 100644 --- a/arch/arm/src/samd5e5/sam_freerun.c +++ b/arch/arm/src/samd5e5/sam_freerun.c @@ -121,7 +121,6 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, */ freerun->chan = chan; - freerun->running = false; freerun->overflow = 0; /* Set up to receive the callback when the counter overflow occurs */ diff --git a/arch/arm/src/samd5e5/sam_freerun.h b/arch/arm/src/samd5e5/sam_freerun.h index 0a66d06f87..cb5fdd98a6 100644 --- a/arch/arm/src/samd5e5/sam_freerun.h +++ b/arch/arm/src/samd5e5/sam_freerun.h @@ -57,7 +57,6 @@ struct sam_freerun_s { uint8_t chan; /* The timer/counter in use */ - bool running; /* True: the timer is running */ uint32_t overflow; /* Timer counter overflow */ TC_HANDLE tch; /* Handle returned by sam_tc_initialize() */ }; diff --git a/arch/arm/src/samv7/sam_freerun.c b/arch/arm/src/samv7/sam_freerun.c index 4acac93fd1..27a5fa7f6f 100644 --- a/arch/arm/src/samv7/sam_freerun.c +++ b/arch/arm/src/samv7/sam_freerun.c @@ -185,7 +185,6 @@ int sam_freerun_initialize(struct sam_freerun_s *freerun, int chan, */ freerun->chan = chan; - freerun->running = false; freerun->overflow = 0; /* Set up to receive the callback when the counter overflow occurs */ diff --git a/arch/arm/src/samv7/sam_freerun.h b/arch/arm/src/samv7/sam_freerun.h index 54cfa2eb93..3fbb1ce89d 100644 --- a/arch/arm/src/samv7/sam_freerun.h +++ b/arch/arm/src/samv7/sam_freerun.h @@ -53,7 +53,6 @@ struct sam_freerun_s { uint8_t chan; /* The timer/counter in use */ - bool running; /* True: the timer is running */ uint32_t overflow; /* Timer counter overflow */ TC_HANDLE tch; /* Handle returned by sam_tc_initialize() */ }; diff --git a/arch/arm/src/stm32/stm32_freerun.c b/arch/arm/src/stm32/stm32_freerun.c index 67b4bfb5b2..f5c353167c 100644 --- a/arch/arm/src/stm32/stm32_freerun.c +++ b/arch/arm/src/stm32/stm32_freerun.c @@ -124,7 +124,6 @@ int stm32_freerun_initialize(struct stm32_freerun_s *freerun, int chan, freerun->chan = chan; freerun->width = STM32_TIM_GETWIDTH(freerun->tch); - freerun->running = false; #ifdef CONFIG_CLOCK_TIMEKEEPING freerun->counter_mask = 0xffffffffull; diff --git a/arch/arm/src/stm32/stm32_freerun.h b/arch/arm/src/stm32/stm32_freerun.h index 8e40fe6dc0..061e75da8b 100644 --- a/arch/arm/src/stm32/stm32_freerun.h +++ b/arch/arm/src/stm32/stm32_freerun.h @@ -49,7 +49,6 @@ struct stm32_freerun_s { uint8_t chan; /* The timer/counter in use */ uint8_t width; /* Width of timer (16- or 32-bits) */ - bool running; /* True: the timer is running */ FAR struct stm32_tim_dev_s *tch; /* Handle returned by stm32_tim_init() */ uint32_t frequency; diff --git a/arch/arm/src/stm32l4/stm32l4_freerun.c b/arch/arm/src/stm32l4/stm32l4_freerun.c index ecc7c6639e..d3ceb346fb 100644 --- a/arch/arm/src/stm32l4/stm32l4_freerun.c +++ b/arch/arm/src/stm32l4/stm32l4_freerun.c @@ -138,7 +138,6 @@ int stm32l4_freerun_initialize(FAR struct stm32l4_freerun_s *freerun, */ freerun->chan = chan; - freerun->running = false; freerun->overflow = 0; /* Set up to receive the callback when the counter overflow occurs */ diff --git a/arch/arm/src/stm32l4/stm32l4_freerun.h b/arch/arm/src/stm32l4/stm32l4_freerun.h index 8ab8167d89..fac8072574 100644 --- a/arch/arm/src/stm32l4/stm32l4_freerun.h +++ b/arch/arm/src/stm32l4/stm32l4_freerun.h @@ -64,7 +64,6 @@ struct stm32l4_freerun_s { uint8_t chan; /* The timer/counter in use */ - bool running; /* True: the timer is running */ uint32_t overflow; /* Timer counter overflow */ FAR struct stm32l4_tim_dev_s *tch; /* Handle returned by stm32l4_tim_init() */ uint32_t frequency; diff --git a/arch/mips/src/pic32mz/pic32mz_freerun.c b/arch/mips/src/pic32mz/pic32mz_freerun.c index 64b52952a2..21e706e3a6 100644 --- a/arch/mips/src/pic32mz/pic32mz_freerun.c +++ b/arch/mips/src/pic32mz/pic32mz_freerun.c @@ -139,7 +139,6 @@ int pic32mz_freerun_initialize(struct pic32mz_freerun_s *freerun, int chan, freerun->freq = PIC32MZ_TIMER_GETFREQ(freerun->timer); freerun->width = PIC32MZ_TIMER_GETWIDTH(freerun->timer); freerun->chan = chan; - freerun->running = false; #ifdef CONFIG_CLOCK_TIMEKEEPING if (freerun->width == 32) @@ -169,7 +168,6 @@ int pic32mz_freerun_initialize(struct pic32mz_freerun_s *freerun, int chan, /* Start the timer */ PIC32MZ_TIMER_START(freerun->timer); - freerun->running = true; return OK; } @@ -307,7 +305,6 @@ int pic32mz_freerun_uninitialize(struct pic32mz_freerun_s *freerun) pic32mz_timer_deinit(freerun->timer); - freerun->running = false; freerun->timer = NULL; return OK; diff --git a/arch/mips/src/pic32mz/pic32mz_freerun.h b/arch/mips/src/pic32mz/pic32mz_freerun.h index c20e88eab3..6aaa122500 100644 --- a/arch/mips/src/pic32mz/pic32mz_freerun.h +++ b/arch/mips/src/pic32mz/pic32mz_freerun.h @@ -49,7 +49,6 @@ struct pic32mz_freerun_s { uint8_t chan; /* The timer in use */ uint8_t width; /* Width of timer (16- or 32) */ - bool running; /* True: the timer is running */ FAR struct pic32mz_timer_dev_s *timer; /* PIC32MZ timer driver */ uint32_t freq; /* Timer's frequency (Hz) */