boards: 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
494ef1cfe2
commit
25e8e4d4e7
5 changed files with 15 additions and 15 deletions
|
@ -117,9 +117,9 @@
|
||||||
*/
|
*/
|
||||||
static void arm_mps2_pinmux_defaults(void)
|
static void arm_mps2_pinmux_defaults(void)
|
||||||
{
|
{
|
||||||
u32_t gpio_0 = 0;
|
u32_t gpio_0 = 0U;
|
||||||
u32_t gpio_1 = 0;
|
u32_t gpio_1 = 0U;
|
||||||
u32_t gpio_2 = 0;
|
u32_t gpio_2 = 0U;
|
||||||
|
|
||||||
/* Set GPIO Alternate Functions */
|
/* Set GPIO Alternate Functions */
|
||||||
|
|
||||||
|
|
|
@ -94,8 +94,8 @@
|
||||||
*/
|
*/
|
||||||
static void arm_v2m_beetle_pinmux_defaults(void)
|
static void arm_v2m_beetle_pinmux_defaults(void)
|
||||||
{
|
{
|
||||||
u32_t gpio_0 = 0;
|
u32_t gpio_0 = 0U;
|
||||||
u32_t gpio_1 = 0;
|
u32_t gpio_1 = 0U;
|
||||||
|
|
||||||
/* Set GPIO Alternate Functions */
|
/* Set GPIO Alternate Functions */
|
||||||
|
|
||||||
|
|
|
@ -46,13 +46,13 @@ static int currently_running_prio = 256; /* 255 is the lowest prio interrupt */
|
||||||
|
|
||||||
void hw_irq_ctrl_init(void)
|
void hw_irq_ctrl_init(void)
|
||||||
{
|
{
|
||||||
irq_mask = 0; /* Let's assume all interrupts are disable at boot */
|
irq_mask = 0U; /* Let's assume all interrupts are disable at boot */
|
||||||
irq_premask = 0;
|
irq_premask = 0U;
|
||||||
irqs_locked = false;
|
irqs_locked = false;
|
||||||
lock_ignore = false;
|
lock_ignore = false;
|
||||||
|
|
||||||
for (int i = 0 ; i < N_IRQS; i++) {
|
for (int i = 0 ; i < N_IRQS; i++) {
|
||||||
irq_prio[i] = 255;
|
irq_prio[i] = 255U;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,14 +137,14 @@ u64_t hw_irq_ctrl_get_irq_status(void)
|
||||||
|
|
||||||
void hw_irq_ctrl_clear_all_enabled_irqs(void)
|
void hw_irq_ctrl_clear_all_enabled_irqs(void)
|
||||||
{
|
{
|
||||||
irq_status = 0;
|
irq_status = 0U;
|
||||||
irq_premask &= ~irq_mask;
|
irq_premask &= ~irq_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
void hw_irq_ctrl_clear_all_irqs(void)
|
void hw_irq_ctrl_clear_all_irqs(void)
|
||||||
{
|
{
|
||||||
irq_status = 0;
|
irq_status = 0U;
|
||||||
irq_premask = 0;
|
irq_premask = 0U;
|
||||||
}
|
}
|
||||||
|
|
||||||
void hw_irq_ctrl_disable_irq(unsigned int irq)
|
void hw_irq_ctrl_disable_irq(unsigned int irq)
|
||||||
|
|
|
@ -155,7 +155,7 @@ void hwtimer_init(void)
|
||||||
if (real_time_mode) {
|
if (real_time_mode) {
|
||||||
boot_time = get_host_us_time();
|
boot_time = get_host_us_time();
|
||||||
last_radj_rtime = boot_time;
|
last_radj_rtime = boot_time;
|
||||||
last_radj_stime = 0;
|
last_radj_stime = 0U;
|
||||||
}
|
}
|
||||||
if (!reset_rtc) {
|
if (!reset_rtc) {
|
||||||
struct timespec tv;
|
struct timespec tv;
|
||||||
|
|
|
@ -486,8 +486,8 @@ int _galileo_pinmux_set_pin(struct device *port, u8_t pin, u32_t func)
|
||||||
{
|
{
|
||||||
struct galileo_data * const drv_data = port->driver_data;
|
struct galileo_data * const drv_data = port->driver_data;
|
||||||
|
|
||||||
u8_t mux_index = 0;
|
u8_t mux_index = 0U;
|
||||||
u8_t i = 0;
|
u8_t i = 0U;
|
||||||
struct mux_path *enable = NULL;
|
struct mux_path *enable = NULL;
|
||||||
struct pin_config *mux_config = drv_data->mux_config;
|
struct pin_config *mux_config = drv_data->mux_config;
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ int _galileo_pinmux_set_pin(struct device *port, u8_t pin, u32_t func)
|
||||||
|
|
||||||
enable = &_galileo_path[mux_index];
|
enable = &_galileo_path[mux_index];
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0U; i < 5; i++) {
|
||||||
switch (enable->path[i].mux) {
|
switch (enable->path[i].mux) {
|
||||||
case EXP0:
|
case EXP0:
|
||||||
gpio_pin_write(drv_data->exp0,
|
gpio_pin_write(drv_data->exp0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue