From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2] drm/i915: reword documentation of possible pci_device_id struct
Date: Wed, 5 Sep 2018 13:19:43 -0700 [thread overview]
Message-ID: <20180905201943.22675-1-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20180828180615.GD5565@intel.com>
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.
v2: - remove mention to (non-existent) PCI_DEVICE_ANY and better explain
use of __u16 in first 2 fields
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
include/drm/i915_pciids.h | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index 754ce4b10129..0f15d7b2e8ea 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -26,14 +26,17 @@
#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.
+ *
+ * This matches the struct used in the kernel. First two fields may be
+ * changed to __u16 if using this header in a userspace program.
*/
#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
next prev parent reply other threads:[~2018-09-05 20:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 17:41 [PATCH 1/2] drm/i915: make field unsigned Lucas De Marchi
2018-08-28 17:41 ` [PATCH 2/2] drm/i915: reword documentation of possible pci_device_id struct Lucas De Marchi
2018-08-28 18:05 ` Chris Wilson
2018-08-28 19:30 ` Lucas De Marchi
2018-09-04 13:24 ` Jani Nikula
2018-08-28 18:06 ` Ville Syrjälä
2018-08-28 19:34 ` Lucas De Marchi
2018-09-05 20:19 ` Lucas De Marchi [this message]
2018-09-15 0:10 ` [PATCH v2] " Lucas De Marchi
2018-08-28 18:15 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: make field unsigned Patchwork
2018-08-28 18:34 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-28 22:33 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-05 21:05 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: make field unsigned (rev2) Patchwork
2018-09-05 21:38 ` Lucas De Marchi
2018-09-05 21:23 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-06 6:04 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-31 18:12 ` [PATCH 1/2] drm/i915: make field unsigned Lucas De Marchi
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=20180905201943.22675-1-lucas.demarchi@intel.com \
--to=lucas.demarchi@intel.com \
--cc=intel-gfx@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).