From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dmitry V. Levin" Subject: Re: [PATCH v4 5/5] drm: Add decoding of DRM and KMS ioctls Date: Fri, 11 Sep 2015 15:10:05 +0300 Message-ID: <20150911121005.GB6177@altlinux.org> References: <1440420170-13337-1-git-send-email-patrik.jakobsson@linux.intel.com> <1440420170-13337-6-git-send-email-patrik.jakobsson@linux.intel.com> <20150908225040.GA32328@altlinux.org> <20150911113929.GC28550@patrik-desktop.isw.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0687700892==" Return-path: Received: from pegasus3.altlinux.org (pegasus3.altlinux.org [194.107.17.103]) by gabe.freedesktop.org (Postfix) with ESMTP id 85C9C6E020 for ; Fri, 11 Sep 2015 05:10:06 -0700 (PDT) In-Reply-To: <20150911113929.GC28550@patrik-desktop.isw.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: strace-devel@lists.sourceforge.net Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0687700892== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O5XBE6gyVG5Rl6Rj" Content-Disposition: inline --O5XBE6gyVG5Rl6Rj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 11, 2015 at 01:39:29PM +0200, Patrik Jakobsson wrote: > On Wed, Sep 09, 2015 at 01:50:40AM +0300, Dmitry V. Levin wrote: > > On Mon, Aug 24, 2015 at 02:42:50PM +0200, Patrik Jakobsson wrote: > > > +static int drm_mode_create_dumb(struct tcb *tcp, const unsigned int = code, long arg) > > > +{ > > > + struct drm_mode_create_dumb dumb; > > > + > > > + if (umove(tcp, arg, &dumb)) > > > + return RVAL_DECODED; > > > + > > > + if (entering(tcp)) { > > > + tprintf(", {width=3D%u, height=3D%u, bpp=3D%u, flags=3D0x%x", > > > + dumb.width, dumb.height, dumb.bpp, dumb.flags); > > > + } else if (exiting(tcp)) { > > > + tprintf(", handle=3D%u, pitch=3D%u, size=3D%Lu}", dumb.handle, > > > + dumb.pitch, dumb.size); > > > + } > > > + > > > + return RVAL_DECODED | 1; > > > +} > >=20 > > This generates a warning (which turns into an error with > > --enable-gcc-Werror) on x86_64 when using kernel drm headers: > >=20 > > drm.c: In function 'drm_mode_create_dumb': > > drm.c:521:11: error: format '%Lu' expects argument of type 'long long u= nsigned int', but argument 4 has type 'uint64_t {aka long unsigned int}' [-= Werror=3Dformat=3D] >=20 > So this brings us back to whether to include drm kernel headers or not. If > -Werror is a requirement (which is already broken last time I checked) th= ere Is it? Could you cite the error, please? > will need to be #ifdefs at various places in drm decoding. What would you > prefer. Both options are fine by me. This is the only place where definitions differ to the extent that it's vis= ible. I'd rather cast the argument to unsigned long long. --=20 ldv --O5XBE6gyVG5Rl6Rj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlXyxJ0ACgkQfKvmrJ41Nh72YwCeM/c+5apJBSvQ8LXEv/WBXLYk 2MYAnjI1Skj5JdHlqKri031vQe9moWub =tRth -----END PGP SIGNATURE----- --O5XBE6gyVG5Rl6Rj-- --===============0687700892== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============0687700892==--