git: 557627dda9b0 - main - hdaa_eld_dump: eliminate write only variable len
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 05 Apr 2022 04:32:43 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=557627dda9b015728a478e31348808356eb75c73 commit 557627dda9b015728a478e31348808356eb75c73 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-04-05 02:24:21 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-04-05 04:30:17 +0000 hdaa_eld_dump: eliminate write only variable len Sponsored by: Netflix --- 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 e0524fe53287..91c0892111a2 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",