From nobody Fri Jan 13 21:24:44 2023 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 4NtvZP3rT1z2qkkD; Fri, 13 Jan 2023 21:24:45 +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 4NtvZP0Fqpz40NR; Fri, 13 Jan 2023 21:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645085; 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=aFn04xeYCxr4GbUKjijc4HuqCvb2rprvjaibTwfMh74=; b=KNRxF99qcW8yA49JIDYfo+SCj74lwi4jaE91daEaHfpTOSUI0earhCdFsL5T68jc6WM1es 57T+EmnTNZvSXf8SzcoZ2UrEmBVHo9X5I49abhX2YCSNF3/udsH9+UE8l5gStTK2NHK6lf BsaPSMFZUvQD+EfxRD57J8zhINBkMJ/qM1GJRosFglv7FhgIv58IujfMVI1TSBJT9ZIstI O488Paz2bYxihdaxOsSAbISB/vQtQCQt8gUUQ1RY3zR0tlOPJmAx4S/+kqG0vI4iB5DjMh 9MjyI0llQIevPdr9tBCiKW9brgGZ2qEVvHnYZJskvcewTexMAuuWjG3azPgDlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645085; 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=aFn04xeYCxr4GbUKjijc4HuqCvb2rprvjaibTwfMh74=; b=sg+QcOhSPMXtYCgTNlgzg8lFgNFrjnnSw+lfhiRsyn0OK3oD3USrMmp++iKarXe6kngfMZ K7XPsRgwMs5K4XqkpobejeTcfhW/fc46iMovqNRFiJCaivPqr4xSnHZ63vmv0kyZOrCfI5 RY+HaI/cU8qduqdoaBIRbT97YlNGmJE6XGp9fMV89acs2vfTegDyTY0oXp+bbBeFnsFKQJ 6uXcHg92PjzYJA+AmDAtuK67J6PlZ18AVvg9RzKLYzTHSb70EbulWhQJKXkCcrIHb73ytU MeGgNJxaWmUq8hcpQ/q8O8WwN5GqM6RQSeMrKJ5c8B3rwF+LIHL05pN/6OTfUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673645085; a=rsa-sha256; cv=none; b=vfigvFBOzipk5IICE4LJYY21ofQh1MYGcPjzBTs5JF2st4B072aATsx6lv+mLXgOyXfN40 q8QO0SmnX9y8Cd0CsSSxY3xd9xRYGEZgn7JFxBjkYLFjsxr+n2bsAENcx4EuCK0Xdp8vZU A52rKu15GAtNANUxI6WjXLxyF7xbvNL97RAtMk5K2MqrhLI+heSUPgpClUAUOMklPfUAiT DTCGxaRfR01gsqEBZMTPWZb9vKXjiStm+fnx84Gsn1Og0PTBJ2M8UL1OxtjAdp/wcNKuZD WRyA2fc6Tm2J04EYAkgIJyyqGJ4HrYrAJ5NTQmLmquOLPR1aVhlI1gLPlNhOUQ== 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 4NtvZN66wQzMv3; Fri, 13 Jan 2023 21:24:44 +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 30DLOiNQ040577; Fri, 13 Jan 2023 21:24:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30DLOic7040576; Fri, 13 Jan 2023 21:24:44 GMT (envelope-from git) Date: Fri, 13 Jan 2023 21:24:44 GMT Message-Id: <202301132124.30DLOic7040576@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: d38d8a4c4e9a - main - stand/ofw: dev can't be NULL here 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: d38d8a4c4e9a3c4667307ac2163007ff193040b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d38d8a4c4e9a3c4667307ac2163007ff193040b0 commit d38d8a4c4e9a3c4667307ac2163007ff193040b0 Author: Warner Losh AuthorDate: 2023-01-13 21:19:39 +0000 Commit: Warner Losh CommitDate: 2023-01-13 21:22:38 +0000 stand/ofw: dev can't be NULL here dev can't be NULL here. ofw_common_parsedev is always called via devparse (indirectly through dv_parsedev() calls there which call it with the args unchanged). In the past, ofw_getdev could call us with NULL pointer for the parse-only case, but that's now all handled inside of devparse for simplicity. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38041 --- stand/libofw/devicename.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stand/libofw/devicename.c b/stand/libofw/devicename.c index 76ba5530520c..510fe9d92ec1 100644 --- a/stand/libofw/devicename.c +++ b/stand/libofw/devicename.c @@ -108,8 +108,7 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path }; strlcpy(idev->d_path, devspec, min(rem_path - devspec + 1, sizeof(idev->d_path))); - if (dev != NULL) - *dev = &idev->dd; + *dev = &idev->dd; if (path != NULL) *path = rem_path; return 0;