soc: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned variable. MISRA-C rule 7.2 Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
parent
a76e37a707
commit
8325a395ea
4 changed files with 6 additions and 6 deletions
|
@ -38,7 +38,7 @@ u32_t get_pwm_clock_freq(PWM_Type *base)
|
|||
|
||||
switch (root) {
|
||||
case ccmRootmuxPwmOsc24m:
|
||||
hz = 24000000;
|
||||
hz = 24000000U;
|
||||
break;
|
||||
case ccmRootmuxPwmSysPllDiv4:
|
||||
hz = CCM_ANALOG_GetSysPllFreq(CCM_ANALOG) >> 2;
|
||||
|
|
|
@ -84,7 +84,7 @@ void _sys_soc_power_state_post_ops(enum power_states state)
|
|||
{
|
||||
switch (state) {
|
||||
case SYS_POWER_STATE_CPU_LPS_2:
|
||||
*_REG_TIMER_ICR = 1;
|
||||
*_REG_TIMER_ICR = 1U;
|
||||
case SYS_POWER_STATE_CPU_LPS_1:
|
||||
case SYS_POWER_STATE_CPU_LPS:
|
||||
__asm__ volatile("sti");
|
||||
|
|
|
@ -80,7 +80,7 @@ int _arc_init(struct device *arg)
|
|||
reset_vector = (u32_t *)RESET_VECTOR;
|
||||
LOG_DBG("Reset vector address: %x", *reset_vector);
|
||||
shared_data->arc_start = *reset_vector;
|
||||
shared_data->flags = 0;
|
||||
shared_data->flags = 0U;
|
||||
if (!shared_data->arc_start) {
|
||||
/* Reset vector points to NULL => skip ARC init. */
|
||||
LOG_DBG("Reset vector is NULL, skipping ARC init.");
|
||||
|
|
|
@ -205,14 +205,14 @@ static void soc_read_bootstraps(void)
|
|||
|
||||
switch (bootstrap) {
|
||||
case SOC_S1000_STRAP_REF_CLK_19P2:
|
||||
ref_clk_freq = 19200000;
|
||||
ref_clk_freq = 19200000U;
|
||||
break;
|
||||
case SOC_S1000_STRAP_REF_CLK_24P576:
|
||||
ref_clk_freq = 24576000;
|
||||
ref_clk_freq = 24576000U;
|
||||
break;
|
||||
case SOC_S1000_STRAP_REF_CLK_38P4:
|
||||
default:
|
||||
ref_clk_freq = 38400000;
|
||||
ref_clk_freq = 38400000U;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue