From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/9] drm: Make sure every ioctl structure has a typedef Date: Sun, 8 Sep 2013 13:58:29 +0200 Message-ID: <20130908115829.GW27291@phenom.ffwll.local> References: <1378493845-476-1-git-send-email-damien.lespiau@intel.com> <1378493845-476-4-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C013E6131 for ; Sun, 8 Sep 2013 04:58:17 -0700 (PDT) Received: by mail-ee0-f45.google.com with SMTP id c50so2557754eek.18 for ; Sun, 08 Sep 2013 04:58:16 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1378493845-476-4-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Damien Lespiau Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Sep 06, 2013 at 07:57:19PM +0100, Damien Lespiau wrote: > Just for consistency. > > Signed-off-by: Damien Lespiau Afaik kernel coding style is to echew typdefs for normal structures as much as possible. The only exception is for truly opaque types used in abstractions, like dma_addr_t or pid_t. All the typedefs we still have here go back to the old days of a drm core shared between *bsd and linux. Since that's long gone they imo should all die, but certainly we shouldn't add new ones. Aside: My patcha apply script will also bitch about new usages of drm_i915_private_t ;-) Cheers, Daniel > --- > include/uapi/drm/drm.h | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h > index b8604d2..0430fab 100644 > --- a/include/uapi/drm/drm.h > +++ b/include/uapi/drm/drm.h > @@ -799,6 +799,11 @@ typedef struct drm_client drm_client_t; > typedef enum drm_stat_type drm_stat_type_t; > typedef struct drm_stats drm_stats_t; > typedef struct drm_set_version drm_set_version_t; > +typedef struct drm_modeset_ctl drm_modeset_ctl_t; > +typedef struct drm_gem_close drm_gem_close_t; > +typedef struct drm_gem_flink drm_gem_flink_t; > +typedef struct drm_gem_open drm_gem_open_t; > +typedef struct drm_get_cap drm_get_cap_t; > typedef struct drm_block drm_block_t; > typedef struct drm_control drm_control_t; > typedef struct drm_buf_desc drm_buf_desc_t; > @@ -815,6 +820,7 @@ typedef struct drm_ctx_res drm_ctx_res_t; > typedef struct drm_draw drm_draw_t; > typedef enum drm_lock_flags drm_lock_flags_t; > typedef struct drm_lock drm_lock_t; > +typedef struct drm_prime_handle drm_prime_handle_t; > typedef struct drm_agp_mode drm_agp_mode_t; > typedef struct drm_agp_info drm_agp_info_t; > typedef struct drm_agp_buffer drm_agp_buffer_t; > @@ -823,6 +829,29 @@ typedef struct drm_scatter_gather drm_scatter_gather_t; > typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; > typedef union drm_wait_vblank drm_wait_vblank_t; > typedef struct drm_update_draw drm_update_draw_t; > +typedef struct drm_mode_card_res drm_mode_card_res_t; > +typedef struct drm_mode_crtc drm_mode_crtc_t; > +typedef struct drm_mode_cursor drm_mode_cursor_t; > +typedef struct drm_mode_crtc_lut drm_mode_crtc_lut_t; > +typedef struct drm_mode_get_encoder drm_mode_get_encoder_t; > +typedef struct drm_mode_get_connector drm_mode_get_connector_t; > +typedef struct drm_mode_mode_cmd drm_mode_mode_cmd_t; > +typedef struct drm_mode_get_property drm_mode_get_property_t; > +typedef struct drm_mode_connector_set_property drm_mode_connector_set_property_t; > +typedef struct drm_mode_get_blob drm_mode_get_blob_t; > +typedef struct drm_mode_fb_cmd drm_mode_fb_cmd_t; > +typedef struct drm_mode_crtc_page_flip drm_mode_crtc_page_flip_t; > +typedef struct drm_mode_fb_dirty_cmd drm_mode_fb_dirty_cmd_t; > +typedef struct drm_mode_create_dumb drm_mode_create_dumb_t; > +typedef struct drm_mode_map_dumb drm_mode_map_dumb_t; > +typedef struct drm_mode_destroy_dumb drm_mode_destroy_dumb_t; > +typedef struct drm_mode_get_plane_res drm_mode_get_plane_res_t; > +typedef struct drm_mode_get_plane drm_mode_get_plane_t; > +typedef struct drm_mode_set_plane drm_mode_set_plane_t; > +typedef struct drm_mode_fb_cmd2 drm_mode_fb_cmd2_t; > +typedef struct drm_mode_obj_get_properties drm_mode_obj_get_properties_t; > +typedef struct drm_mode_obj_set_property drm_mode_obj_set_property_t; > +typedef struct drm_mode_cursor2 drm_mode_cursor2_t; > > typedef struct drm_clip_rect drm_clip_rect_t; > typedef struct drm_drawable_info drm_drawable_info_t; > -- > 1.8.3.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch