Skip to content

Commit af454d2

Browse files
committed
Cleanup: remove unnecessary const variable
1 parent f965eda commit af454d2

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

portable/GCC/RISC-V/port.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ void vPortSetupTimerInterrupt( void ) __attribute__( ( weak ) );
9090
uint64_t ullNextTime = 0ULL;
9191
const uint64_t * pullNextTime = &ullNextTime;
9292
const size_t uxTimerIncrementsForOneTick = ( size_t ) ( ( configCPU_CLOCK_HZ ) / ( configTICK_RATE_HZ ) ); /* Assumes increment won't go over 32-bits. */
93-
UBaseType_t const ullMachineTimerCompareRegisterBase = configMTIMECMP_BASE_ADDRESS;
9493
volatile uint64_t * pullMachineTimerCompareRegister = NULL;
9594

9695
/* Holds the critical nesting value - deliberately non-zero at start up to
@@ -136,7 +135,7 @@ size_t xTaskReturnAddress = ( size_t ) portTASK_RETURN_ADDRESS;
136135

137136
__asm volatile ( "csrr %0, mhartid" : "=r" ( ulHartId ) );
138137

139-
pullMachineTimerCompareRegister = ( volatile uint64_t * ) ( ullMachineTimerCompareRegisterBase + ( ulHartId * sizeof( uint64_t ) ) );
138+
pullMachineTimerCompareRegister = ( volatile uint64_t * ) ( configMTIMECMP_BASE_ADDRESS + ( ulHartId * sizeof( uint64_t ) ) );
140139

141140
do
142141
{

portable/IAR/RISC-V/port.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ void vPortSetupTimerInterrupt( void ) __attribute__( ( weak ) );
9898
uint64_t ullNextTime = 0ULL;
9999
const uint64_t * pullNextTime = &ullNextTime;
100100
const size_t uxTimerIncrementsForOneTick = ( size_t ) ( ( configCPU_CLOCK_HZ ) / ( configTICK_RATE_HZ ) ); /* Assumes increment won't go over 32-bits. */
101-
UBaseType_t const ullMachineTimerCompareRegisterBase = configMTIMECMP_BASE_ADDRESS;
102101
volatile uint64_t * pullMachineTimerCompareRegister = NULL;
103102

104103
/* Holds the critical nesting value - deliberately non-zero at start up to
@@ -169,7 +168,7 @@ static void prvTaskExitError( void )
169168

170169
__asm volatile ( "csrr %0, 0xf14" : "=r" ( ulHartId ) ); /* 0xf14 is HART ID. */
171170

172-
pullMachineTimerCompareRegister = ( volatile uint64_t * ) ( ullMachineTimerCompareRegisterBase + ( ulHartId * sizeof( uint64_t ) ) );
171+
pullMachineTimerCompareRegister = ( volatile uint64_t * ) ( configMTIMECMP_BASE_ADDRESS + ( ulHartId * sizeof( uint64_t ) ) );
173172

174173
do
175174
{

0 commit comments

Comments
 (0)