From nobody Thu Aug 11 14:53:15 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 4M3VDD07zGz4Y7pQ; Thu, 11 Aug 2022 14:53:16 +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 4M3VDC6bwLz3TGF; Thu, 11 Aug 2022 14:53:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660229595; 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=FRBkuK7oFcXSKJmXyyAa2K0gVxCJd4aT7qsiGyygnkU=; b=QUxv6hfqT0e+Hg42tyombelIWkiTxYOFcXX5dLMuPwIcqkhI3A5uO/z+DymTWbF4OAfT1r nc4TDDLHiXhXbV0YTXVW3tGKNXFeUfCrjkrTs1EH8AGUB9OkR88nuw4U0ASyPdMyfGTQHL DlTe6Ep0Ac/a5OuRi6mlqeDjJ9Wlb8QUu06trxpfabH/mcTpg+V6ucSn2jvE4bgdVyLc/4 G2fRlgOITR7Gtj6Yc4SXLxD+F2jsAGuUKs1SUMpcxQTamygygezBZYk7IIP0QhHkAEIqLz 8cPxUhvXfctewwOlXXHXmS4LaxCufDndj91nf+V46m44wZQIUVOQsNyfiBIMWA== 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 4M3VDC5ckdzw99; Thu, 11 Aug 2022 14:53:15 +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 27BErFBp032456; Thu, 11 Aug 2022 14:53:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27BErFLY032455; Thu, 11 Aug 2022 14:53:15 GMT (envelope-from git) Date: Thu, 11 Aug 2022 14:53:15 GMT Message-Id: <202208111453.27BErFLY032455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: d4b1761482a4 - stable/12 - if_dwc: dwc_get_hwaddr cannot fail, change return to void 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d4b1761482a485fd51e4d1cb969e1199bde65bb6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660229595; 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=FRBkuK7oFcXSKJmXyyAa2K0gVxCJd4aT7qsiGyygnkU=; b=EIGc2mB4sSIOSXgk7/zMuJKyhFRgIQXDH3LjBGW4Qauw+ILyGxGhqVMnolwdP0St4R4x3d 9KJP8SjC2oI1/dt281SP4vTKO8QOwrzTYSfim7nWD732Gmd8C0/YTkhuSFTKaX3UfoTExM eiLKvRPAPUxpkHsuYGPh0w6P+OrByv8PxDWCkciS+MbHOawLjigCAxdJnuekLRlhEtG/Er I01WR5JWodCU3LQdC6sjMQNWXrgP3Ld9gO/bgWU0qhYyf3vZDckfcfW9qv6X7KXm9t/605 c/Fjepyr9XtIKuYLinWrlOHgDG4uOgiLeC45btvzo4/DyKvgwFOZan2tu28F0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660229595; a=rsa-sha256; cv=none; b=E+hB+xSvuxLQb6RbbDBLF/3GltFKwz52wBrXNgdwsAiALs1+2/kGLjcsj/i0f7ECn8ASUu jlI4rOOpx8GWdeHjwoL2OUrU8rbT9Zou7zZyVDVqCVTFx5nCCF8bupY01ddQ44qF+u/Ff/ 6WQ+n/ZYkf7FV3h8KVc+EJCH/alW6r+pwi7ti4e+Ilt/0X+3u6hoDTc3hlg/pZDBysa5tO qgSvGghtG18nNOf1sPIpkAgeSf+88pT8K6sFCGQWBfALJNpUyf5xYL3cZ7x7LibRllkGol gYTYXltYqNC4YLlYNyyylv6tYlsoJ8XtrHxftifXJM3DEY0/Ua6f5s3lFBiVPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d4b1761482a485fd51e4d1cb969e1199bde65bb6 commit d4b1761482a485fd51e4d1cb969e1199bde65bb6 Author: Emmanuel Vadot AuthorDate: 2020-11-20 11:29:20 +0000 Commit: Mitchell Horne CommitDate: 2022-08-11 14:52:02 +0000 if_dwc: dwc_get_hwaddr cannot fail, change return to void No functional changes intended (cherry picked from commit f88e0af64abb8317c67fa075125b1943a7f42997) --- sys/dev/dwc/if_dwc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index d4bc4caffa32..8a0adfeea6cd 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1153,7 +1153,7 @@ out: return (0); } -static int +static void dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr) { uint32_t hi, lo, rnd; @@ -1185,8 +1185,6 @@ dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr) hwaddr[4] = rnd >> 8; hwaddr[5] = rnd >> 0; } - - return (0); } #define GPIO_ACTIVE_LOW 1 @@ -1336,10 +1334,7 @@ dwc_attach(device_t dev) } /* Read MAC before reset */ - if (dwc_get_hwaddr(sc, macaddr)) { - device_printf(sc->dev, "can't get mac\n"); - return (ENXIO); - } + dwc_get_hwaddr(sc, macaddr); /* Reset the PHY if needed */ if (dwc_reset(dev) != 0) {