From nobody Wed Apr 06 03:42:57 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 8B0151A9147B; Wed, 6 Apr 2022 03:42:58 +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 4KY9MQ2dyxz4s7T; Wed, 6 Apr 2022 03:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649216578; 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=UugngVTJIgOsFMmrRGqfbyBJg+21UlzVzT4TbWdNzLc=; b=dZpE/vA3vIf4LJrc+ZtzuqHgZcuF5N3g4m1DQPfQsa+DG05fsyLKoFK1dy/whBbl/2UoIo yZ5FGDRDNKEexzkAEh0wTOE2W6SkW6woKtEYBTXRO30+dX+vWMs7TDbV6ZawxLUeZT1xFI IcPWirP5FxFH0ACeL8+ou3+mySizYuE7seRIuF5J0e+HCRHQjqU2tu/u/VZXjNgSOjHNcN fks3SDCL+qARllN5HzzBf+AIJ8q+zpi7a1icsbzkHUgu0l/cBHt2nAH8YC15Po/Wq/rV1r VOlp1v0xJ/00y2yMbL4gi7b6gik5+k/2IotN6hr0Fa0pA5py6yjlAwikdkGQBg== 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 B782A13D9D; Wed, 6 Apr 2022 03:42:57 +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 2363gvsn089191; Wed, 6 Apr 2022 03:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2363gvGl089190; Wed, 6 Apr 2022 03:42:57 GMT (envelope-from git) Date: Wed, 6 Apr 2022 03:42:57 GMT Message-Id: <202204060342.2363gvGl089190@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: 8707108f33da - main - ipmi: Remove write only variables used to read form hardware 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: 8707108f33da7628e8befcd0d777ca051eea97f3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649216578; 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=UugngVTJIgOsFMmrRGqfbyBJg+21UlzVzT4TbWdNzLc=; b=Y5B/AdqYa+0UiLa1umCDUcwdnoB8H3t0s4hWJFOQh8gzRRJR1GCeHDV3TAibKF+P9u7LZ6 P/spRaNtTbBkK3i+lSZbKUUB1rmwg8u5QVniYuzCvbNKYzoTsd9Z0J8a81GeJ1odExyi22 ZipVQpUxmcS24fhGksaqhAOZjmqTb4wy8urOoFcnch+ARiwfskPNmkMDbXDiBsYReYGc+3 +aPZ3KGklkB33CxO6GjL+awCmHnyuxQ3uDOKK2dJVX+zpbrhQe+PpbmbdoJCMJUPho3GYO XWH2BnmK37oVPvwhUtX2dU5yEc2vIyhjZJ9bElZjNFJ2x0w9TuoQOjiv8pZVwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649216578; a=rsa-sha256; cv=none; b=kPal6d4gFIyzfiCJKauu531EAsw8JIvoepW/RI0ajX+poKNMXR39snzSRVcSO22neFzpvv 0XKTpEGLuPrxEtUdLjKKgSve81MtR8peGVM/87+fR51BtHgty5IQA5WN0arMYXr9bJuw/w OA/AudTewhdwnvxB7XhBTkjU7CN2eXGXJEjMqtInIPsKf/lwsip8pho/q+c6ORuKkeBqVG an1mINRKL+WmX/JleO5d70UHIRj/q7EhDiDgwxC4A+r9QEsWgQPKZXWSTnQNliPdVug+5V 4EJgUvYCm0+1ffL0jpOdyLRsyiCh3oPgrLKMabQQw1zcIytWyB/dYtaCBzJW4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8707108f33da7628e8befcd0d777ca051eea97f3 commit 8707108f33da7628e8befcd0d777ca051eea97f3 Author: Warner Losh AuthorDate: 2022-04-06 02:00:29 +0000 Commit: Warner Losh CommitDate: 2022-04-06 03:42:05 +0000 ipmi: Remove write only variables used to read form hardware Sponsored by: Netflix --- sys/dev/ipmi/ipmi_kcs.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/dev/ipmi/ipmi_kcs.c b/sys/dev/ipmi/ipmi_kcs.c index 79f2ef720ca8..df3b37614eb7 100644 --- a/sys/dev/ipmi/ipmi_kcs.c +++ b/sys/dev/ipmi/ipmi_kcs.c @@ -93,11 +93,10 @@ kcs_wait_for_obf(struct ipmi_softc *sc, bool level) static void kcs_clear_obf(struct ipmi_softc *sc, int status) { - int data; /* Clear OBF */ if (status & KCS_STATUS_OBF) { - data = INB(sc, KCS_DATA); + INB(sc, KCS_DATA); } } @@ -266,7 +265,6 @@ static int kcs_read_byte(struct ipmi_softc *sc, u_char *data) { int status; - u_char dummy; /* Wait for IBF = 0 */ status = kcs_wait_for_ibf(sc, 0); @@ -296,7 +294,7 @@ kcs_read_byte(struct ipmi_softc *sc, u_char *data) return (0); /* Read Dummy */ - dummy = INB(sc, KCS_DATA); + INB(sc, KCS_DATA); return (2); } @@ -545,7 +543,7 @@ ipmi_kcs_attach(struct ipmi_softc *sc) int ipmi_kcs_probe_align(struct ipmi_softc *sc) { - int data, status; + int status; sc->ipmi_io_spacing = 1; retry: @@ -587,7 +585,7 @@ retry: /* Clear OBF */ if (status & KCS_STATUS_OBF) - data = INB(sc, KCS_DATA); + INB(sc, KCS_DATA); /* 0x00 to DATA_IN */ OUTB(sc, KCS_DATA, 0); @@ -607,7 +605,7 @@ retry: } /* Read error status. */ - data = INB(sc, KCS_DATA); + INB(sc, KCS_DATA); /* Write dummy READ to DATA_IN. */ OUTB(sc, KCS_DATA, KCS_DATA_IN_READ); @@ -629,7 +627,7 @@ retry: /* Clear OBF */ if (status & KCS_STATUS_OBF) - data = INB(sc, KCS_DATA); + INB(sc, KCS_DATA); } else device_printf(sc->ipmi_dev, "KCS probe: end state %x\n", KCS_STATUS_STATE(status));