From: Eric Anholt Subject: Re: [PATCH libdrm] Export drmCompareDevices Date: Thu, 04 May 2017 10:15:37 -0700 Message-ID: <87inlgsfuu.fsf@eliezer.anholt.net> References: <20170504163951.25091-1-ajax@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0668136773==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 57C7389D4A for ; Thu, 4 May 2017 17:15:40 +0000 (UTC) In-Reply-To: <20170504163951.25091-1-ajax@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Adam Jackson , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0668136773== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Adam Jackson writes: > drmCompareBusInfo was almost this already, but it wasn't exported, its > name didn't match its functionality, and while it almost looks like it > was usable for sorting due to memcmp it wouldn't work if you had > multiple bus types. I don't really want to think about defining a > sensible sort order for bus types, so let's at least make it less of a > trap for the caller. > > Invert its boolean sense to be 'true if equal', rename it to describe > the type it actually operates on, and export. I love flipping the comparison, but my only request would be to name it drmDevicesEqual() instead, as Compare sounds a bit like memcmp() to me. With that changed, Reviewed-by: Eric Anholt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlkLYbkACgkQtdYpNtH8 nuhgIg//cGoazLRsTQKV0mQ5UrwU/bNW43uYpg91+pE9R/BvFyRF8vbrdJCZS78i lPMLLAIKK0LgCBfFZCObDR/ykTwid7yj0I9wKW9RgXrp3lA9gthBjLFXYuTmhO+k TMHYO83E0XoLaDobR/UQVyXrSn2AmLLkXFJoNbiv9zA8xOkvaMJhBl5jxnUtzGAA CAj77isRVEFMXu2McHAnnPRKNuP0Uysw5XmoNGDTiTBbNKCjCKE+KEUkqUYnNNt0 fZZD+ggKpnLaJ3QQVXW598dKp6RBn76NLb4JM+IXs9ptgglxiuQ8J4MuKpx5qYbG OCZRcqtyAETK+lUowV8fM8zSG9yVnxotTJ/iTeWdVKYAVF6D5JMJctv//yzYUKmU SPf4RXHrOiodlIhh8dXMopTpCG2Lzuhcfr12IkccT+tLl/W+6azLd0CwJA9ATn5d fnQqQ9NbsFogmjKo8qF9MlH2UBEwavfikpxqOGFlwffrx1DvfMOmhve4Z4vwWt+h Rwp8cmdULC9Q+7elcVVzIBafr1MvgNwHXvEPQn5C17vBzSD1M9KraFbAZjXCLt3j 8946LHNJ+gNLi2XXigT6gOE1ryf5RZd2iuq0T0LcxchwyirjC7kMvBWRuNihNHSz YndYYtZCy2rKCJ9N73KdCAPE8Wci8gOeVtdtCBu8MdDYrUvdAU8= =dnrT -----END PGP SIGNATURE----- --=-=-=-- --===============0668136773== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0668136773==--