Date: Wed, 16 Oct 2024 14:32:07 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d36ba3989ca9 - stable/14 - firmware: unbreak armv7 Message-ID: <202410161432.49GEW7PE089747@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d36ba3989ca9fb684f51a300714fadbe82cb59d6 commit d36ba3989ca9fb684f51a300714fadbe82cb59d6 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-02-29 17:53:05 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-10-16 14:19:21 +0000 firmware: unbreak armv7 Use proper format specifiers (with casts) and don't redefine flags. Fixes: c7b1e980ae16 Sponsored by: Netflix (cherry picked from commit 3a3afbec3860b0eb4178b63713ca12bd223b585a) --- sys/kern/subr_firmware.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 94538670e38c..e8f9493decc0 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -279,7 +279,7 @@ try_binary_file(const char *imagename, uint32_t flags) struct vattr vattr; void *data = NULL; const struct firmware *fw; - int flags; + int oflags; size_t resid; int error; bool warn = flags & FIRMWARE_GET_NOWARN; @@ -296,8 +296,8 @@ try_binary_file(const char *imagename, uint32_t flags) printf("Trying to load binary firmware from %s\n", fn); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, fn); - flags = FREAD; - error = vn_open(&nd, &flags, 0, NULL); + oflags = FREAD; + error = vn_open(&nd, &oflags, 0, NULL); if (error) goto err; NDFREE_PNBUF(&nd); @@ -311,8 +311,8 @@ try_binary_file(const char *imagename, uint32_t flags) * Limit this to something sane, 8MB by default. */ if (vattr.va_size > firmware_max_size) { - printf("Firmware %s is too big: %ld bytes, %ld bytes max.\n", - fn, vattr.va_size, firmware_max_size); + printf("Firmware %s is too big: %lld bytes, %ld bytes max.\n", + fn, (long long)vattr.va_size, (long)firmware_max_size); goto err2; } data = malloc(vattr.va_size, M_FIRMWARE, M_WAITOK);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410161432.49GEW7PE089747>