dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Frans Klaver <fransklaver-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 04/98] drm_mode.h: use __u32 and __u64 from linux/types.h
Date: Sat, 30 May 2015 21:58:14 +0200	[thread overview]
Message-ID: <20150530195814.GB15645@bugger.home> (raw)
In-Reply-To: <1433000370-19509-5-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>

On Sat, May 30, 2015 at 05:37:56PM +0200, Mikko Rapeli wrote:
> Fixes userspace compilation error:
> 
> drm/drm_mode.h:472:2: error: unknown type name ‘uint32_t’

It's even more or less required by the coding style. Chapter 5
(typedefs) says:

 (e) Types safe for use in userspace.

     In certain structures which are visible to userspace, we cannot
     require C99 types and cannot use the 'u32' form above. Thus, we
     use __u32 and similar types in all structures which are shared
     with userspace.

So this is probably an improvement in any case.

Thanks,
Frans

> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org>
> ---
>  include/uapi/drm/drm_mode.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index dbeba94..03e4d75 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -508,14 +508,14 @@ struct drm_mode_crtc_page_flip {
>  
>  /* create a dumb scanout buffer */
>  struct drm_mode_create_dumb {
> -	uint32_t height;
> -	uint32_t width;
> -	uint32_t bpp;
> -	uint32_t flags;
> +	__u32 height;
> +	__u32 width;
> +	__u32 bpp;
> +	__u32 flags;
>  	/* handle, pitch, size will be returned */
> -	uint32_t handle;
> -	uint32_t pitch;
> -	uint64_t size;
> +	__u32 handle;
> +	__u32 pitch;
> +	__u64 size;
>  };
>  
>  /* set up for mmap of a dumb scanout buffer */
> @@ -532,7 +532,7 @@ struct drm_mode_map_dumb {
>  };
>  
>  struct drm_mode_destroy_dumb {
> -	uint32_t handle;
> +	__u32 handle;
>  };
>  
>  /* page-flip flags are valid, plus: */
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2015-05-30 19:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1433000370-19509-1-git-send-email-mikko.rapeli@iki.fi>
2015-05-30 15:37 ` [PATCH 03/98] drm.h: use __kernel_size_t instead of size_t Mikko Rapeli
2015-06-03 17:19   ` Emil Velikov
     [not found]     ` <CACvgo50OLHbvk4scG+pSOW53gR8Ze=yrD4GvbmdE=YRgALjdow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-30 10:42       ` Mikko Rapeli
2015-10-15  6:49       ` Daniel Vetter
2015-05-30 15:37 ` [PATCH 07/98] radeon_drm.h: use __u32 and __u64 from linux/types.h Mikko Rapeli
2015-05-30 15:38 ` [PATCH 08/98] r128_drm.h: include drm/drm.h Mikko Rapeli
2015-05-30 15:38 ` [PATCH 11/98] savage_drm.h: include <drm/drm.h> Mikko Rapeli
     [not found] ` <1433000370-19509-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-05-30 15:37   ` [PATCH 04/98] drm_mode.h: use __u32 and __u64 from linux/types.h Mikko Rapeli
     [not found]     ` <1433000370-19509-5-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-05-30 19:58       ` Frans Klaver [this message]
2015-05-30 15:37   ` [PATCH 05/98] exynos_drm.h: use " Mikko Rapeli
     [not found]     ` <1433000370-19509-6-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-05-30 16:46       ` Russell King - ARM Linux
2015-06-01  8:20         ` Christian König
     [not found]           ` <556C15BA.7000909-5C7GfCeVMHo@public.gmane.org>
2015-06-01  8:56             ` Russell King - ARM Linux
     [not found]               ` <20150601085605.GN2067-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-06-01  9:08                 ` Christian König
2015-06-01  9:14                   ` Frans Klaver
     [not found]                   ` <556C2105.2090607-5C7GfCeVMHo@public.gmane.org>
2015-06-01  9:38                     ` Russell King - ARM Linux
     [not found]                       ` <20150601093808.GP2067-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-06-01  9:51                         ` Christian König
2015-06-01  9:15             ` Mikko Rapeli
2015-06-02 18:59         ` Mikko Rapeli
2015-05-30 15:37   ` [PATCH 06/98] nouveau_drm.h: use __u32 and " Mikko Rapeli
2015-05-30 15:38   ` [PATCH 09/98] via_drm.h: include linux/types.h instead of non-existing via_drmclient.h Mikko Rapeli
2015-06-03 17:16     ` Emil Velikov
2015-06-04 11:34       ` Emil Velikov
2015-05-30 15:38   ` [PATCH 10/98] via_drm.h: hide struct via_file_private in userspace Mikko Rapeli
     [not found]     ` <1433000370-19509-11-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2015-06-03 16:50       ` Emil Velikov
2015-09-02 19:17         ` Mikko Rapeli
2015-05-30 15:38   ` [PATCH 12/98] sis_drm.h: hide sis_file_private " Mikko Rapeli
2015-05-30 15:38   ` [PATCH 13/98] drm/i810_drm.h: include drm/drm.h Mikko Rapeli
2015-05-30 15:38 ` [PATCH 14/98] include/uapi/drm/vmwgfx_drm.h: use __s32, __u32 and __u64 from linux/types.h Mikko Rapeli
2015-05-30 15:38 ` [PATCH 15/98] include/uapi/drm/qxl_drm.h: " Mikko Rapeli
2015-05-30 15:38 ` [PATCH 16/98] include/uapi/drm/msm_drm.h: use __s32, __s64, " Mikko Rapeli

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=20150530195814.GB15645@bugger.home \
    --to=fransklaver-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mikko.rapeli-X3B1VOXEql0@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox