drivers: 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
25e8e4d4e7
commit
8ff96b5a57
172 changed files with 693 additions and 693 deletions
|
@ -34,8 +34,8 @@ static int gpio_mcux_configure(struct device *dev,
|
|||
GPIO_Type *gpio_base = config->gpio_base;
|
||||
PORT_Type *port_base = config->port_base;
|
||||
port_interrupt_t port_interrupt = 0;
|
||||
u32_t mask = 0;
|
||||
u32_t pcr = 0;
|
||||
u32_t mask = 0U;
|
||||
u32_t pcr = 0U;
|
||||
u8_t i;
|
||||
|
||||
/* Check for an invalid pin configuration */
|
||||
|
@ -116,7 +116,7 @@ static int gpio_mcux_configure(struct device *dev,
|
|||
if (access_op == GPIO_ACCESS_BY_PIN) {
|
||||
port_base->PCR[pin] = (port_base->PCR[pin] & ~mask) | pcr;
|
||||
} else { /* GPIO_ACCESS_BY_PORT */
|
||||
for (i = 0; i < ARRAY_SIZE(port_base->PCR); i++) {
|
||||
for (i = 0U; i < ARRAY_SIZE(port_base->PCR); i++) {
|
||||
port_base->PCR[i] = (port_base->PCR[pin] & ~mask) | pcr;
|
||||
}
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ static int gpio_mcux_disable_callback(struct device *dev,
|
|||
if (access_op == GPIO_ACCESS_BY_PIN) {
|
||||
data->pin_callback_enables &= ~BIT(pin);
|
||||
} else {
|
||||
data->pin_callback_enables = 0;
|
||||
data->pin_callback_enables = 0U;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue