all: Add 'U' suffix when using unsigned variables

Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
Patrik Flykt 2019-03-26 19:57:45 -06:00 committed by Kumar Gala
commit 24d71431e9
559 changed files with 2331 additions and 2328 deletions

View file

@ -201,7 +201,7 @@ static bool pl011_is_readable(struct device *dev)
{
if ((PL011_REGS(dev)->cr & PL011_CR_UARTEN) &&
(PL011_REGS(dev)->cr & PL011_CR_RXE) &&
((PL011_REGS(dev)->fr & PL011_FR_RXFE) == 0)) {
((PL011_REGS(dev)->fr & PL011_FR_RXFE) == 0U)) {
return true;
}
@ -236,7 +236,7 @@ static void pl011_poll_out(struct device *dev,
static int pl011_fifo_fill(struct device *dev,
const u8_t *tx_data, int len)
{
u8_t num_tx = 0;
u8_t num_tx = 0U;
while (!(PL011_REGS(dev)->fr & PL011_FR_TXFF) &&
(len - num_tx > 0)) {
@ -248,7 +248,7 @@ static int pl011_fifo_fill(struct device *dev,
static int pl011_fifo_read(struct device *dev,
u8_t *rx_data, const int len)
{
u8_t num_rx = 0;
u8_t num_rx = 0U;
while ((len - num_rx > 0) &&
!(PL011_REGS(dev)->fr & PL011_FR_RXFE)) {
@ -377,10 +377,10 @@ static int pl011_init(struct device *dev)
pl011_enable_fifo(dev);
/* initialize all IRQs as masked */
PL011_REGS(dev)->imsc = 0;
PL011_REGS(dev)->imsc = 0U;
PL011_REGS(dev)->icr = PL011_IMSC_MASK_ALL;
PL011_REGS(dev)->dmacr = 0;
PL011_REGS(dev)->dmacr = 0U;
__ISB();
PL011_REGS(dev)->cr &= ~(BIT(14) | BIT(15) | BIT(1));
PL011_REGS(dev)->cr |= PL011_CR_RXE | PL011_CR_TXE;