flash/nor/sfdp, stmqspi: use native type for buffer size

Two different sizes uint8_t and uint32_t was used for this value
without a good reason.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I4bb60cc5397ffd0d37e7034e3930e62793140c8d
Reviewed-on: https://review.openocd.org/c/openocd/+/8439
Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
Tested-by: jenkins
This commit is contained in:
Tomas Vanek
2024-08-14 09:17:36 +02:00
committed by Antonio Borneo
parent 1dc3d7e8fe
commit ea28f96aa9
3 changed files with 4 additions and 4 deletions

View File

@@ -99,7 +99,7 @@ int spi_sfdp(struct flash_bank *bank, struct flash_device *dev,
goto err;
for (k = 0; k < nph; k++) {
uint8_t words = (pheaders[k].revision >> 24) & 0xFF;
unsigned int words = (pheaders[k].revision >> 24) & 0xFF;
uint16_t id = (((pheaders[k].ptr) >> 16) & 0xFF00) | (pheaders[k].revision & 0xFF);
uint32_t ptr = pheaders[k].ptr & 0xFFFFFF;