From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH i-g-t 1/4] kms_content_protection: Fix log bug on 32-bit platforms. Date: Thu, 15 Nov 2018 10:51:51 -0800 Message-ID: <87o9aqyy0o.fsf@anholt.net> References: <20181114222832.22839-1-eric@anholt.net> <20181115111749.GW9144@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0656185609==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id D56FD6E659 for ; Thu, 15 Nov 2018 18:51:53 +0000 (UTC) In-Reply-To: <20181115111749.GW9144@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0656185609== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ville Syrj=C3=A4l=C3=A4 writes: > On Wed, Nov 14, 2018 at 02:28:29PM -0800, Eric Anholt wrote: >> long is different between 32 and 64 and should basically never be >> used. Fixes compiler warning about passing the wrong type. >>=20 >> Signed-off-by: Eric Anholt >> --- >> tests/kms_content_protection.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >>=20 >> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protecti= on.c >> index 801eff66c272..bb9ecd3f4cde 100644 >> --- a/tests/kms_content_protection.c >> +++ b/tests/kms_content_protection.c >> @@ -89,7 +89,8 @@ wait_for_prop_value(igt_output_t *output, uint64_t exp= ected, >> return true; >> usleep(1000); >> } >> - igt_info("prop_value mismatch %ld !=3D %ld\n", val, expected); >> + igt_info("prop_value mismatch %lld !=3D %lld\n", >> + (long long)val, (long long)expected); > > We use the ugly PRId64 & co. elsewhere for this. My experience with those ugly macros is that people have a flinch when trying to remember how they work and just ignore the issue instead, leaving it for those that have to compile for 32. I'll switch it, though. Hopefully i-g-t will get cross-compiling CI and merge requests at some point so that these bugs can just never land in the first place. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlvtwEcACgkQtdYpNtH8 nuilRg//eY1vCy21huvKlVOmcXwMvPew9xH75NJC+ffB8KmKqdVK51LngIGThdUp 4LIVbt0v2PtSc5oZ+/AX9ZsLUe12lrTsnovDabGqrQozpi6cvzgtWldTWyNm+TCO X4NZhdq+fbP3KHL7hpL2XYOjSv2xZfSGbpUR1idD4B7BlE7gzmVUjjjvCLjsYoe8 iLRUvK74CLKG1kjYW2p4Lob+RET+zkod0x0PQnoQpLL3zX357SyRRKWxYtWkLwMF 3ishBkIOc5/SP79WC1mrrN7Cns3FjWL9WCsKxse2K7mtE+20kmUG2nvZnBYNJHiW C0b9QyB2TrcxIO0ruQeuElGqjWW9flSNQylFBabRHKJYrpI7iT14Nvowhmxu0nTI 9DEj2fzByGfFWJ3xRSAxPioNC5pRxh8DyQvsqu5ThTtOHZEWf2U56V/o6NNGsmYZ VLWAogQ80ED5VEBaBcsgshowXBTufZof+R86XZ8D561LiXPQn8APyJz6OA+oF7iv DGOaMl0OlubeqJTRJeJ1S4FQDeSKgZnUmvpobtug+xpGw9SjQcX4mwCnDSfWOg7G J6xIj5x+yflDgBnLrztDSa0DAOm1UOdgPWhFumH3jEXCdeaQbXcDQHiWCzn8lRV9 d8BN3sqe5vTNtk4ydugFLA4ZZaohQc146eCJG+xyjj+q5432qMI= =yptP -----END PGP SIGNATURE----- --=-=-=-- --===============0656185609== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0656185609==--