mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
fix(mtd): correct types in messages
Some messages don't use the correct types, update them. This avoids warning when -Wformat-signedness is enabled. Change-Id: Ie5384a7d139c48a623e1617c93d15fecc8a36061 Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
parent
bd9cd63ba0
commit
6e86b46249
4 changed files with 15 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2021, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2019-2022, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -8,13 +8,13 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/io/io_driver.h>
|
||||
#include <drivers/io/io_mtd.h>
|
||||
#include <lib/utils.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
typedef struct {
|
||||
io_mtd_dev_spec_t *dev_spec;
|
||||
uintptr_t base;
|
||||
|
@ -214,7 +214,7 @@ static int mtd_read(io_entity_t *entity, uintptr_t buffer, size_t length,
|
|||
ops = &cur->dev_spec->ops;
|
||||
assert(ops->read != NULL);
|
||||
|
||||
VERBOSE("Read at %llx into %lx, length %zi\n",
|
||||
VERBOSE("Read at %llx into %lx, length %zu\n",
|
||||
cur->base + cur->pos, buffer, length);
|
||||
if ((cur->base + cur->pos + length) > cur->dev_spec->device_size) {
|
||||
return -EINVAL;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2021, STMicroelectronics - All Rights Reserved
|
||||
* Copyright (c) 2019-2022, STMicroelectronics - All Rights Reserved
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -8,13 +8,13 @@
|
|||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
#include <common/debug.h>
|
||||
#include <drivers/delay_timer.h>
|
||||
#include <drivers/spi_nand.h>
|
||||
#include <lib/utils.h>
|
||||
|
||||
#include <platform_def.h>
|
||||
|
||||
#define SPI_NAND_MAX_ID_LEN 4U
|
||||
#define DELAY_US_400MS 400000U
|
||||
#define MACRONIX_ID 0xC2U
|
||||
|
@ -246,7 +246,7 @@ static int spi_nand_mtd_block_is_bad(unsigned int block)
|
|||
|
||||
if ((bbm_marker[0] != GENMASK_32(7, 0)) ||
|
||||
(bbm_marker[1] != GENMASK_32(7, 0))) {
|
||||
WARN("Block %i is bad\n", block);
|
||||
WARN("Block %u is bad\n", block);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ int spi_nand_init(unsigned long long *size, unsigned int *erase_size)
|
|||
|
||||
VERBOSE("SPI_NAND Detected ID 0x%x\n", id[1]);
|
||||
|
||||
VERBOSE("Page size %i, Block size %i, size %lli\n",
|
||||
VERBOSE("Page size %u, Block size %u, size %llu\n",
|
||||
spinand_dev.nand_dev->page_size,
|
||||
spinand_dev.nand_dev->block_size,
|
||||
spinand_dev.nand_dev->size);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2021, STMicroelectronics - All Rights Reserved
|
||||
* Copyright (c) 2019-2022, STMicroelectronics - All Rights Reserved
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -284,7 +284,7 @@ int spi_nor_read(unsigned int offset, uintptr_t buffer, size_t length,
|
|||
nor_dev.read_op.addr.val = offset;
|
||||
nor_dev.read_op.data.buf = (void *)buffer;
|
||||
|
||||
VERBOSE("%s offset %i length %zu\n", __func__, offset, length);
|
||||
VERBOSE("%s offset %u length %zu\n", __func__, offset, length);
|
||||
|
||||
while (length != 0U) {
|
||||
if ((nor_dev.flags & SPI_NOR_USE_BANK) != 0U) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019, STMicroelectronics - All Rights Reserved
|
||||
* Copyright (c) 2019-2022, STMicroelectronics - All Rights Reserved
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -8,10 +8,9 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <libfdt.h>
|
||||
|
||||
#include <drivers/spi_mem.h>
|
||||
#include <lib/utils_def.h>
|
||||
#include <libfdt.h>
|
||||
|
||||
#define SPI_MEM_DEFAULT_SPEED_HZ 100000U
|
||||
|
||||
|
@ -258,7 +257,7 @@ int spi_mem_init_slave(void *fdt, int bus_node, const struct spi_bus_ops *ops)
|
|||
mode |= SPI_TX_QUAD;
|
||||
break;
|
||||
default:
|
||||
WARN("spi-tx-bus-width %d not supported\n",
|
||||
WARN("spi-tx-bus-width %u not supported\n",
|
||||
fdt32_to_cpu(*cuint));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -276,7 +275,7 @@ int spi_mem_init_slave(void *fdt, int bus_node, const struct spi_bus_ops *ops)
|
|||
mode |= SPI_RX_QUAD;
|
||||
break;
|
||||
default:
|
||||
WARN("spi-rx-bus-width %d not supported\n",
|
||||
WARN("spi-rx-bus-width %u not supported\n",
|
||||
fdt32_to_cpu(*cuint));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue