On Tue, Aug 28, 2018 at 10:41:46AM -0700, Lucas De Marchi wrote:
> Document it like a real struct for ease of copy and paste, remove
> comment of C99 compatibility and document that in some cases the first 2
> fields can be u16.
> 
> Cc: Chris Wilson <ch...@chris-wilson.co.uk>
> Signed-off-by: Lucas De Marchi <lucas.demar...@intel.com>
> ---
>  include/drm/i915_pciids.h | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
> index 754ce4b10129..0c2cc43f916c 100644
> --- a/include/drm/i915_pciids.h
> +++ b/include/drm/i915_pciids.h
> @@ -26,14 +26,16 @@
>  #define _I915_PCIIDS_H
>  
>  /*
> - * A pci_device_id struct {
> - *   __u32 vendor, device;
> - *      __u32 subvendor, subdevice;
> - *   __u32 class, class_mask;
> - *   kernel_ulong_t driver_data;
> + * These macros can be used with a struct declared like this:
> + *
> + * struct pci_device_id {
> + *   __u32 vendor, device;
> + *   __u32 subvendor, subdevice;
> + *   __u32 class, class_mask;
> + *   kernel_ulong_t driver_data;
>   * };
> - * Don't use C99 here because "class" is reserved and we want to
> - * give userspace flexibility.
> + *
> + * First two fields may be __u16 if PCI_DEVICE_ANY is not used

PCI_DEVICE_ANY undefined?

Also you can surely use u16 just fine as long as you're careful when
comparing with ~0?

>   */
>  #define INTEL_VGA_DEVICE(id, info) {         \
>       0x8086, id,                             \
> -- 
> 2.17.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to