From nobody Thu Feb 29 17:54:24 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlzPY0F6tz5CcR9; Thu, 29 Feb 2024 17:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlzPX6ZGnz4G1q; Thu, 29 Feb 2024 17:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4z2WQ8yqxu57xgvRcZX0hoMBqi+TItfPNCRH8IliFY=; b=s+X6fHrQluOZjF4HZAyHQQjXObGnz/gmhK2nDDOz7egdc9eC8fHR8XwL7K7+7uSXXEDP+Y +fHHPkG27CKVg6aRUz4YH8+VGe5BafleW2ch8O+iXKRckcV/BA3f69xS9id3IePRE0XSTV NHwlMk3AXYIq5D+E2d2wcZm1MTX3v9E+iC56S7+VibWBFsvGGWhhsrIeAEjiNiXfkdc9aG XRGFNQxq7AIFbF298YeKohM2t6yf2Dmwc0cUiUB9uY1LdHxW/U5LWkJt4VEvw6fUxcs7Eq nqbXbFv508yZvseiSAkwhaIfdP29JMGrGfn4kaI8g1Rvq9EocbPDcpyoQtwqfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709229264; a=rsa-sha256; cv=none; b=bwGtJiaRFOrJJv7T63ogkmGEfzbudKAWW299tYG+KvyJEQcN/4R0K+s1d6l74239pZOuHD rbFCx6bZYFRjkPX6pV83qlPRQIWzj+jPV/7kfyAPNHYpoNgRHJy5q5qtnKm+TvXwrVwgl2 JB6hbHws+CG/te5+dsq7KBjwDkVbArYzvqbmevfrY6+kyvNVkfl0ZXityjUIau+VILO9H7 uBaNGUlFIrU7ZEiHj1whMq3BEl+0Ovt9z954HnIsXFO45QqHQ74RI2bJz3cHa3YrceaIcZ rHqSM0hxDKiBeGk4KTh1zWNcK7G/Zud9nf9KLmSpw498pIX3pE6Gt1bHRn1hmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4z2WQ8yqxu57xgvRcZX0hoMBqi+TItfPNCRH8IliFY=; b=Vv+L7mcT/Ap3epVfIonmlhEH53qyr6Hk0R+HlcT05b45rBNByRcFMSQxmJ94FDOoW8r0EE WS3qB8epm0jYb9uR220AE2hdaiyVJUD+2gf1gXR2ze8eNZFrZcK113mI4vw5hF+pSsYHCh yxJofdNkeBrSkRD2MiFOjMbhhFah/jE7EUuK81KP8fkekFvcjtLGpnKmF5yqysBzVPSNv2 r+YUl9Ntj87prNoVv6/iAJO6pHdRFDNS+IPJ0oh/Fpix8SoP55i+saj2RojERSlz1DvAlF QSjQa0l9bUAmL3QaS2R4xGQVwuxDkEFlSTcx3Zqvs1N2idDJgErV6MK4ssK5Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlzPX69qqzsN2; Thu, 29 Feb 2024 17:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41THsO99076780; Thu, 29 Feb 2024 17:54:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41THsOD5076777; Thu, 29 Feb 2024 17:54:24 GMT (envelope-from git) Date: Thu, 29 Feb 2024 17:54:24 GMT Message-Id: <202402291754.41THsOD5076777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3a3afbec3860 - main - firmware: unbreak armv7 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a3afbec3860b0eb4178b63713ca12bd223b585a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3a3afbec3860b0eb4178b63713ca12bd223b585a commit 3a3afbec3860b0eb4178b63713ca12bd223b585a Author: Warner Losh AuthorDate: 2024-02-29 17:53:05 +0000 Commit: Warner Losh CommitDate: 2024-02-29 17:53:05 +0000 firmware: unbreak armv7 Use proper format specifiers (with casts) and don't redefine flags. Fixes: c7b1e980ae16 Sponsored by: Netflix --- 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 33ec2e0cc0e4..99f7ef6ff8b9 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -278,7 +278,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; @@ -295,8 +295,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); @@ -310,8 +310,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);