From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH] drm/fourcc: Add DOC: overview comment Date: Tue, 21 Aug 2018 09:26:39 -0700 Message-ID: <20180821162639.GA21697@bombadil.infradead.org> References: <20180821161611.10424-1-brian.starkey@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180821161611.10424-1-brian.starkey@arm.com> Sender: linux-kernel-owner@vger.kernel.org To: Brian Starkey Cc: dri-devel@lists.freedesktop.org, daniel.vetter@ffwll.ch, airlied@linux.ie, gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, alexandru-cosmin.gheorghe@arm.com, liviu.dudau@arm.com, ayan.halder@arm.com List-Id: dri-devel@lists.freedesktop.org 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 ...