From owner-svn-src-all@FreeBSD.ORG Thu Dec 12 19:02:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84712F68; Thu, 12 Dec 2013 19:02:42 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08DD71E57; Thu, 12 Dec 2013 19:02:38 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id rBCJ2UsW095290; Thu, 12 Dec 2013 21:02:30 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua rBCJ2UsW095290 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id rBCJ2Uoo095289; Thu, 12 Dec 2013 21:02:30 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 12 Dec 2013 21:02:30 +0200 From: Konstantin Belousov To: Aleksandr Rybalko Subject: Re: svn commit: r259261 - head/sys/dev/drm2 Message-ID: <20131212190230.GU59496@kib.kiev.ua> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BhuKUG3dHSy3oxDJ" Content-Disposition: inline In-Reply-To: <201312121449.rBCEnRRQ045690@svn.freebsd.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 19:02:42 -0000 --BhuKUG3dHSy3oxDJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote: > Author: ray > Date: Thu Dec 12 14:49:26 2013 > New Revision: 259261 > URL: http://svnweb.freebsd.org/changeset/base/259261 >=20 > Log: > Do not try to probe/attach if attempt to add fbd child are failed. > =20 > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/sys/dev/drm2/drm_fb_helper.c >=20 > Modified: head/sys/dev/drm2/drm_fb_helper.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 2013 (r259260) > +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 2013 (r259261) > @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct > =20 > kdev =3D fb_helper->dev->device; > fbd =3D device_add_child(kdev, "fbd", device_get_unit(kdev)); > - ret =3D device_probe_and_attach(fbd); > + if (fbd !=3D NULL)=20 > + ret =3D device_probe_and_attach(fbd); > + else > + ret =3D ENODEV; This must be -ENODEV, since linux layer operates on negative values for error. The error is negated in the drm layer, which would result in non-existent errno returned to FreeBSD code. Also, the #ifdef __FreeBSD braces in the file are not useful, please remove them. > #ifdef DEV_VT > if (ret !=3D 0) > DRM_ERROR("Failed to attach fbd device: %d\n", ret); --BhuKUG3dHSy3oxDJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJSqghFAAoJEJDCuSvBvK1B6X0P/1UOq9aWIYUxjzMDG4HVXa6u +v9WI63f4yCHMKX/HtmZTX5rLI0amcNXXzJ4VFIKyytVEbZWem/5BY7KOUe8tnqK +AR5ArCD5lqRl4jVYPv/L862dXnHQc0P2T3x0kupGETGbA/ImL9QPTUXXJc8deGD i5tcQL6IyxtGFbBgfQMl8XnNkuvCqAt4JmEMi3WVy1neXjzSRobsOzW06hZNVxhb GN3x131o5GoLSP05zjg+VAbE0OtOJrQ78hTvFq6mED7SBIQpXhrSNgdUVuHzQcgm p2it9diWKvOW6O7eRkfVLaYUjnmpXW1ORxCwc2C2QDp7WhdaZXQTpZqT4HoST8Ij 3yWlRvuN1ug1DsAOF6cSXEPTYrp4JThKTDFrIV9FqoNRyevWIghCnxAJJ29yYUij j8psf80Jl510DHRfaAnnxTU2I998r7PpkC3a7FzaSv8J7gLvao2XgE+4cyplN9l+ 0+iB9c07hJ9DC4/rzaxr/MtXegPA+Lp+eBLkdSNztzDLNx+BJ/GBo/4beCfXJEYy /mgoXwBN18XbKgLJhaQ2Hy0zqqxnI8ShtJmCW7BreIorVqS0Vd4yplU5Sb5EAsHy 4n++aljh2rgxjW97fbErAw74v69FhSeX7f3IhWgfoY2Hzhlz6FL7sY1+YJyR2HOY P+IiOmY/gRgCvvaaz3Xb =zl8g -----END PGP SIGNATURE----- --BhuKUG3dHSy3oxDJ--