From owner-svn-src-head@freebsd.org Tue Mar 19 14:30:55 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D938155254A; Tue, 19 Mar 2019 14:30:55 +0000 (UTC) (envelope-from mmel@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D6E08732D; Tue, 19 Mar 2019 14:30:55 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4B59A793; Tue, 19 Mar 2019 14:30:54 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2JEUsBE056234; Tue, 19 Mar 2019 14:30:54 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2JEUsbR056231; Tue, 19 Mar 2019 14:30:54 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201903191430.x2JEUsbR056231@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 19 Mar 2019 14:30:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345295 - in head/sys/dev/extres: phy regulator syscon X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: in head/sys/dev/extres: phy regulator syscon X-SVN-Commit-Revision: 345295 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0D6E08732D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Mar 2019 14:30:55 -0000 Author: mmel Date: Tue Mar 19 14:30:54 2019 New Revision: 345295 URL: https://svnweb.freebsd.org/changeset/base/345295 Log: extres: Unify error codes for _get_by_ofw_property() methods. Return: - ENOENT if requested property doesn't exist - ENODEV if producer device is not (yet) attached - ENXIO otherwise MFC after: 2 weeks Modified: head/sys/dev/extres/phy/phy.c head/sys/dev/extres/regulator/regulator.c head/sys/dev/extres/syscon/syscon.c Modified: head/sys/dev/extres/phy/phy.c ============================================================================== --- head/sys/dev/extres/phy/phy.c Tue Mar 19 11:16:42 2019 (r345294) +++ head/sys/dev/extres/phy/phy.c Tue Mar 19 14:30:54 2019 (r345295) @@ -517,7 +517,7 @@ phy_get_by_ofw_property(device_t consumer_dev, phandle ncells = OF_getencprop_alloc_multi(cnode, name, sizeof(pcell_t), (void **)&cells); if (ncells < 1) - return (ENXIO); + return (ENOENT); /* Tranlate provider to device. */ phydev = OF_device_from_xref(cells[0]); Modified: head/sys/dev/extres/regulator/regulator.c ============================================================================== --- head/sys/dev/extres/regulator/regulator.c Tue Mar 19 11:16:42 2019 (r345294) +++ head/sys/dev/extres/regulator/regulator.c Tue Mar 19 14:30:54 2019 (r345295) @@ -1091,7 +1091,7 @@ regulator_get_by_ofw_property(device_t cdev, phandle_t ncells = OF_getencprop_alloc_multi(cnode, name, sizeof(*cells), (void **)&cells); if (ncells <= 0) - return (ENXIO); + return (ENOENT); /* Translate xref to device */ regdev = OF_device_from_xref(cells[0]); Modified: head/sys/dev/extres/syscon/syscon.c ============================================================================== --- head/sys/dev/extres/syscon/syscon.c Tue Mar 19 11:16:42 2019 (r345294) +++ head/sys/dev/extres/syscon/syscon.c Tue Mar 19 14:30:54 2019 (r345295) @@ -238,7 +238,7 @@ syscon_get_by_ofw_property(device_t cdev, phandle_t cn ncells = OF_getencprop_alloc_multi(cnode, name, sizeof(pcell_t), (void **)&cells); if (ncells < 1) - return (ENXIO); + return (ENOENT); /* Translate to syscon node. */ SYSCON_TOPO_SLOCK();