mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
tpm: Tidy up use of size_t
We should consistently use %z with size_t, and avoid passing a uint32_t as a size_t value. Fix these issues to avoid warnings on 64-bit machines. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
3f14f814e7
commit
22230e916e
1 changed files with 2 additions and 2 deletions
|
@ -204,7 +204,7 @@ static int tis_senddata(struct udevice *dev, const u8 *data, size_t len)
|
|||
/* Wait till the device is ready to accept more data. */
|
||||
while (!burst) {
|
||||
if (max_cycles++ == MAX_DELAY_US) {
|
||||
printf("%s:%d failed to feed %d bytes of %d\n",
|
||||
printf("%s:%d failed to feed %zd bytes of %zd\n",
|
||||
__FILE__, __LINE__, len - offset, len);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ static int tis_senddata(struct udevice *dev, const u8 *data, size_t len)
|
|||
* changes to zero exactly after the last byte is fed into the
|
||||
* FIFO.
|
||||
*/
|
||||
count = min((u32)burst, len - offset - 1);
|
||||
count = min((size_t)burst, len - offset - 1);
|
||||
while (count--)
|
||||
tpm_write_byte(priv, data[offset++],
|
||||
®s[locality].data);
|
||||
|
|
Loading…
Reference in a new issue