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:36:26 +0300 Message-ID: <20150911123625.GC6177@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> <20150911121005.GB6177@altlinux.org> <20150911122035.GA768@patrik-desktop.isw.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2095518166==" Return-path: Received: from pegasus3.altlinux.org (pegasus3.altlinux.org [194.107.17.103]) by gabe.freedesktop.org (Postfix) with ESMTP id 22B0B6E40F for ; Fri, 11 Sep 2015 05:36:28 -0700 (PDT) In-Reply-To: <20150911122035.GA768@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, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============2095518166== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m51xatjYGsM+13rf" Content-Disposition: inline --m51xatjYGsM+13rf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 11, 2015 at 02:20:35PM +0200, Patrik Jakobsson wrote: > On Fri, Sep 11, 2015 at 03:10:05PM +0300, Dmitry V. Levin wrote: > > 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 lo= ng unsigned 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 no= t. If > > > -Werror is a requirement (which is already broken last time I checked= ) there > >=20 > > Is it? Could you cite the error, please? >=20 > It's in aio.c:185 which at a closer look is intentional. Would still brea= k the > build though. But I'm not arguing that letting warnings slip through (wit= h or > without -Werror) is ok, just wondering if it justifies what I'm trying to= do > here. strace is expected to build without compilation warnings assuming that the compiler and headers are supported. In fact, I routinely build strace with --enable-gcc-Werror. If it doesn't build for you, please report. --=20 ldv --m51xatjYGsM+13rf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlXyyskACgkQfKvmrJ41Nh71xACgl36EyI7m1UxyWPPcCT8ZRKzQ yZQAn20lL5RbFvsSBLfCVSlz92zzwmXf =PbkK -----END PGP SIGNATURE----- --m51xatjYGsM+13rf-- --===============2095518166== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============2095518166==--