All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm 01/11] libdrm: valgrind-clear a few more IOCTL arguments
Date: Sun, 25 Jan 2015 01:19:36 +0200	[thread overview]
Message-ID: <7731489.QkRjgeOOA4@avalon> (raw)
In-Reply-To: <1422029304-1926-2-git-send-email-thierry.reding@gmail.com>

Hi Thierry,

Thank you for the patch.

On Friday 23 January 2015 17:08:14 Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Fixes a few complaints raised by valgrind when running the Tegra tests.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

I agree that a fix is needed, and that this patch matches the rest of the 
code, so

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

However, shouldn't structures be memset to 0 unconditionally, especially 
considering the recent discussion regarding reserved fields that should be 
initialized to default values by userspace ? This can be fixed by a separate 
patch.

> ---
>  xf86drmMode.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xf86drmMode.c b/xf86drmMode.c
> index 60ce3699f3e3..f6e4416b88b5 100644
> --- a/xf86drmMode.c
> +++ b/xf86drmMode.c
> @@ -282,6 +282,7 @@ int drmModeAddFB2(int fd, uint32_t width, uint32_t
> height, struct drm_mode_fb_cmd2 f;
>  	int ret;
> 
> +	VG_CLEAR(f);
>  	f.width  = width;
>  	f.height = height;
>  	f.pixel_format = pixel_format;
> @@ -309,6 +310,7 @@ drmModeFBPtr drmModeGetFB(int fd, uint32_t buf)
>  	struct drm_mode_fb_cmd info;
>  	drmModeFBPtr r;
> 
> +	VG_CLEAR(info);
>  	info.fb_id = buf;
> 
>  	if (drmIoctl(fd, DRM_IOCTL_MODE_GETFB, &info))

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-01-24 23:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 16:08 [PATCH libdrm 00/11] Random assortment of fixes and enhancements Thierry Reding
2015-01-23 16:08 ` [PATCH libdrm 01/11] libdrm: valgrind-clear a few more IOCTL arguments Thierry Reding
2015-01-24 23:19   ` Laurent Pinchart [this message]
2015-01-23 16:08 ` [PATCH libdrm 02/11] libdrm: Remove gratuitous blank lines Thierry Reding
2015-01-24 23:19   ` Laurent Pinchart
2015-01-23 16:08 ` [PATCH libdrm 03/11] libdrm: Make indentation consistent Thierry Reding
2015-01-24 23:20   ` Laurent Pinchart
2015-01-23 16:08 ` [PATCH libdrm 04/11] tests: Split helpers into library Thierry Reding
2015-01-24 23:24   ` Laurent Pinchart
2015-01-29 15:27   ` [PATCH 04.1/11] SQUASH: tests: misc cleanups Emil Velikov
2015-01-29 15:27   ` [PATCH 04.2/11] SQUASH: util: add android build Emil Velikov
2015-01-23 16:08 ` [PATCH libdrm 05/11] tests: Move name tables to libutil Thierry Reding
2015-01-24 23:24   ` Laurent Pinchart
2015-01-29 15:28   ` [PATCH 05.1/11] SQUASH: util: add the kms.[ch] to makefile.sources Emil Velikov
2015-01-23 16:08 ` [PATCH libdrm 06/11] xf86drmMode.h: Use consistent padding Thierry Reding
2015-01-24 23:26   ` Laurent Pinchart
2015-01-23 16:08 ` [PATCH libdrm 07/11] xf86drmMode.h: Add DisplayPort MST encoder type Thierry Reding
2015-01-24 23:40   ` Laurent Pinchart
2015-01-23 16:08 ` [PATCH libdrm 08/11] tests: modetest: Accept connector names Thierry Reding
2015-01-24 23:56   ` Laurent Pinchart
2015-01-26 10:14     ` Thierry Reding
2015-01-26 10:24       ` Laurent Pinchart
2015-01-23 16:08 ` [PATCH libdrm 09/11] tests: Add libkms-test library Thierry Reding
2015-01-29 15:30   ` [PATCH 09.1/11] SQUASH: libkms-test: add missing header to the distribution Emil Velikov
2015-01-23 16:08 ` [PATCH libdrm 10/11] tests: kms: Implement CRTC stealing test Thierry Reding
2015-01-29 15:30   ` [PATCH 10.1/11] SQUASH: kms-steal-crtc: link against cairo Emil Velikov
2015-01-23 16:08 ` [PATCH libdrm 11/11] tests: kms: Implement universal planes test Thierry Reding
2015-01-29 15:31   ` [PATCH 11.1/11] SQUASH: kms-universal-planes: link against cairo Emil Velikov
2015-01-29 15:36 ` [PATCH libdrm 00/11] Random assortment of fixes and enhancements Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7731489.QkRjgeOOA4@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.