From patchwork Wed Sep 5 20:19:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 10589387 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BAF115E9 for ; Wed, 5 Sep 2018 20:21:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 635562AC36 for ; Wed, 5 Sep 2018 20:21:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 617E62AC3A; Wed, 5 Sep 2018 20:21:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D33B62AC42 for ; Wed, 5 Sep 2018 20:21:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C0AE6E55B; Wed, 5 Sep 2018 20:21:44 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D8A36E55B for ; Wed, 5 Sep 2018 20:21:42 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2018 13:21:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,334,1531810800"; d="scan'208";a="70867670" Received: from ldmartin-desk.jf.intel.com ([10.24.11.56]) by orsmga008.jf.intel.com with ESMTP; 05 Sep 2018 13:21:41 -0700 From: Lucas De Marchi To: intel-gfx@lists.freedesktop.org Date: Wed, 5 Sep 2018 13:19:43 -0700 Message-Id: <20180905201943.22675-1-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180828180615.GD5565@intel.com> References: <20180828180615.GD5565@intel.com> Subject: [Intel-gfx] [PATCH v2] drm/i915: reword documentation of possible pci_device_id struct X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Lucas De Marchi --- 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, \