[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180821162639.GA21697@bombadil.infradead.org>
Date: Tue, 21 Aug 2018 09:26:39 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Brian Starkey <brian.starkey@....com>
Cc: dri-devel@...ts.freedesktop.org, daniel.vetter@...ll.ch,
airlied@...ux.ie, gustavo@...ovan.org,
maarten.lankhorst@...ux.intel.com, seanpaul@...omium.org,
corbet@....net, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, alexandru-cosmin.gheorghe@....com,
liviu.dudau@....com, ayan.halder@....com
Subject: Re: [PATCH] drm/fourcc: Add DOC: overview comment
On Tue, Aug 21, 2018 at 05:16:11PM +0100, Brian Starkey wrote:
> There's a number of things which haven't previously been documented
> around the usage of format modifiers. Capture the current
> understanding in an overview comment and add it to the rst
> documentation.
>
> Ideally, the generated documentation would also include documentation
> of all of the #defines, but the kernel-doc system doesn't currently
> support kernel-doc comments on #define constants.
Can you turn them into enums? This seems to work ok:
-/* color index */
-#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
-
-/* 8 bpp Red */
-#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
+enum {
+ /* color index */
+ DRM_FORMAT_C8 = fourcc_code('C', '8', ' ', ' '), /* [7:0] C */
+ /* 8 bpp Red */
+ DRM_FORMAT_R8 = fourcc_code('R', '8', ' ', ' '), /* [7:0] R */
+};
but I appreciate this is user API and maybe there's some code out there
that does #ifndef DRM_FORMAT_C8 ...
Powered by blists - more mailing lists