From nobody Sun Oct 02 04:29:53 2022 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 4Mg9wy0cMcz4dtMQ; Sun, 2 Oct 2022 04:29:54 +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 4Mg9wy05tVz45r6; Sun, 2 Oct 2022 04:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664684994; 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=M5uqDou2x9GWZoNFMMBNvSahwBMs78RzhpQkcLRsHNI=; b=EwOW1yhii6fLHvXfDiuUlZdav2mWAXZXtjFBd5LJI+aWAbU4ufauU4+3I1Wa9qjgmqI33t MmiLrHXHvFd/EDUjON9ybSP6bqcVhVqVF1p3ALMItXGnWKrDRPBd9HG8m8KOQEBV8zyAHz 3A/BDsps+HlNCFILcC6D7ILmmpQWJpvcdH0iRpPYO5pRJ3ymFTDsDK4VSJzeiItip5M0Kr pbcLjFeCgOzrPLRfGPrA7pmeNhFmYCFWslnlKd/TZnkNDZIZDqbUggxVJp+WLX1Q9WmjJj FJwvX1rlJGzaBu5TjAnUI8l58+O6OSJAIfTM2TFDBrXZ25WCSiihLHk8GaVNsA== 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 4Mg9wx62VxzlNB; Sun, 2 Oct 2022 04:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2924TrkN058802; Sun, 2 Oct 2022 04:29:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2924TrpG058801; Sun, 2 Oct 2022 04:29:53 GMT (envelope-from git) Date: Sun, 2 Oct 2022 04:29:53 GMT Message-Id: <202210020429.2924TrpG058801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 5d6c09f86995 - stable/13 - hdaa_eld_dump: eliminate write only variable len 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d6c09f86995c57768a88556466356174aa6635c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664684994; 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=M5uqDou2x9GWZoNFMMBNvSahwBMs78RzhpQkcLRsHNI=; b=nyB2do0AJHjiV5fnE+q4XQfjrnrDXxue/AxipXg8Acqyx4CKFKYVBXW0rlCigro5yj1a34 JKdxscr+cZnsutalP4cymjI6Ew0CsGnpbvGYchGt/DaR/lZBrDQOE5oJu8ECCgeoSVTlOu 0gyNuJd5dqqctNcoVrBcQsHOcmePoBWQh6Lt7EZoddP6o0uahJC1Yc00MaKrCvMr/24W5Z CxYwzeQLjkYgQB3aXIL593xnW5EPOL9l8T8fMoQ1x9OgJ2ikA9xZSkzb34RpL9YlGXC1Z0 hxxtOkKnyjZEcQCSHImlBC7EafJ5HEoE+xXhdWGv8nUUPBXPQ67JvCzzS7xNbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664684994; a=rsa-sha256; cv=none; b=OYSnQHNTyB6Zeq5ombSomU1uh9YzdcmRwJLxus7sdLtIKMEcyNGOTVSMqDa1/wRKY3lKmS b6XBQZNogXAciowM8YWNSG8oN143hyVJl3egusjDccwVNbeLI6YaF7EUcA/UbUwyHko1w5 sMRMVsqrxPD0E2A6RzIA/l9ljcmk/wnm4JCdsgX51IbGI/NV5aMzTh93Kj+kQ2kKNiiOa0 kP/C2E1z8JMoMNPRnvohAKN2p4AadB3pkqHSjF+Ep7oFVtnKQJOzfi5ttibDnztebgkaXN 7GWQa3MyuaVV1SU6lAke3VB4ahcIoXIG/p/CC4SQuoCVUxcBaYM5nHCktHGtrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d6c09f86995c57768a88556466356174aa6635c commit 5d6c09f86995c57768a88556466356174aa6635c Author: Warner Losh AuthorDate: 2022-07-08 17:53:33 +0000 Commit: Warner Losh CommitDate: 2022-10-02 04:25:55 +0000 hdaa_eld_dump: eliminate write only variable len Sponsored by: Netflix (cherry picked from commit 557627dda9b015728a478e31348808356eb75c73) --- sys/dev/sound/pci/hda/hdaa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 6cc873efb042..e0cfca10e014 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -605,7 +605,7 @@ hdaa_eld_dump(struct hdaa_widget *w) struct hdaa_devinfo *devinfo = w->devinfo; device_t dev = devinfo->dev; uint8_t *sad; - int len, mnl, i, sadc, fmt; + int mnl, i, sadc, fmt; if (w->eld == NULL || w->eld_len < 4) return; @@ -614,7 +614,6 @@ hdaa_eld_dump(struct hdaa_widget *w) w->nid, w->eld[0] >> 3, w->eld[2]); if ((w->eld[0] >> 3) != 0x02) return; - len = min(w->eld_len, (u_int)w->eld[2] * 4); mnl = w->eld[4] & 0x1f; device_printf(dev, "ELD nid=%d: CEA_EDID_Ver=%u MNL=%u\n",