Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Dec 2013 21:02:30 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Aleksandr Rybalko <ray@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r259261 - head/sys/dev/drm2
Message-ID:  <20131212190230.GU59496@kib.kiev.ua>
In-Reply-To: <201312121449.rBCEnRRQ045690@svn.freebsd.org>
References:  <201312121449.rBCEnRRQ045690@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131212190230.GU59496>