From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757882AbbE3T5q (ORCPT ); Sat, 30 May 2015 15:57:46 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34276 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754617AbbE3T5h (ORCPT ); Sat, 30 May 2015 15:57:37 -0400 Date: Sat, 30 May 2015 21:58:14 +0200 From: Frans Klaver To: Mikko Rapeli Cc: linux-kernel@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, linux-api@vger.kernel.org Subject: Re: [PATCH 04/98] drm_mode.h: use __u32 and __u64 from linux/types.h Message-ID: <20150530195814.GB15645@bugger.home> References: <1433000370-19509-1-git-send-email-mikko.rapeli@iki.fi> <1433000370-19509-5-git-send-email-mikko.rapeli@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1433000370-19509-5-git-send-email-mikko.rapeli@iki.fi> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > --- > 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@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/