Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5323137imm; Tue, 21 Aug 2018 09:46:03 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwCSqy+NiNygqNGizt2eBuaGiR2bo0kahGensHPetoBWfXrEvTDfRggh2+YrtSnAHhJaerw X-Received: by 2002:a17:902:a40b:: with SMTP id p11-v6mr51349010plq.228.1534869963129; Tue, 21 Aug 2018 09:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534869963; cv=none; d=google.com; s=arc-20160816; b=rwH7xg0U/TMA+fRjNsXPX952qTv9OU7VABmWmCdwS8ksov9Egq9idx1Rau8lnAwyOq tWNoFuFkmI2WyRfYSHZ848Dx4DPq0bnoB/f32tPyZCAyxhAf3eO95PRMqJKx8u+eDxsX txZAug8ffq61YkNxp3PYhQMGs5zNEb4U4BWv9iBQ2G6uWUqjrKZP1NiPxFOs3mG58flI ZH1c5A7xDs163P/58pf3ZbFB+0gp04gEDdJN2zioICSq7dTnci4KN04sNOg2NyvXH0HY jAsuzZ/6h7axYGgQ5LUJLt748jy4RJEjAKunVoP7QHWRIzugAFAFQj0CKPHGNmiyx72/ q1Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=o8xLlsreWDwgt0z83lGD6dssrTL0SCwl+PZ33fIzVao=; b=T6/6XsPoXlsK1n+U6DXBPGb+1TUPejyICM4hsglcnR29K5E323dmwTMVvGeuH/PToy ZgWvSo1RfePqotfgEs0taG6Lrk2Csch0GMudYDqYJuN+9+i5NFiPSwaFV6TA9Rm82DNt rZw+6bQhEZgdqIVPhKh035qL1NLv7hS7cfo3M3WuGzhMJIlJ/7WzXblJ/CeEQjpd5ZeG mFpFkg9huf07XjUS31DjmFRdf9wgrUzGO0hqe9RQS0pTlmnTxOet5CqKZXuJXmciC1ZM +WOtsJUeZybNgSGTXyY9S4GqfSNLiJzsmLjWdAZizABceWrV5t92hzJQpkTlKr53q+el EX1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=edckW98b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k193-v6si8113906pge.4.2018.08.21.09.45.47; Tue, 21 Aug 2018 09:46:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=edckW98b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728393AbeHUTrc (ORCPT + 99 others); Tue, 21 Aug 2018 15:47:32 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34790 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbeHUTrb (ORCPT ); Tue, 21 Aug 2018 15:47:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=o8xLlsreWDwgt0z83lGD6dssrTL0SCwl+PZ33fIzVao=; b=edckW98b2gEHoggIrQihEajE/ FPOCXTOF5p45ni+2DK46iS4KbbzviOTNFK2juu8IJhR9XEAODFv2qAYbYTsaNWHS/LN2CpwSksuVQ eNUG5TKRs2gGVMp5oVyGV2oZNoNhlEhW9fbCB3Z/eWyYz5Iawvcr/3aLY9NPKgBhe5Q0UL/CADGyu 2hB2CGPFgHiXnNW7l6oc6YsZFtILliUEEqxojF/fdKHUzZOEVgYxccnbgBPrvZhRPbWzlypSF0z5y +Se6iFhnisA3yPRNjzY/hKXgstuN9PYDN3YemvrEObXTqb2N1Fg6W/qpWAerOQhEgxoDtSq191bIH uek64pPeg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fs9UN-0005NL-CG; Tue, 21 Aug 2018 16:26:39 +0000 Date: Tue, 21 Aug 2018 09:26:39 -0700 From: Matthew Wilcox 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 Subject: Re: [PATCH] drm/fourcc: Add DOC: overview comment 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 Content-Disposition: inline In-Reply-To: <20180821161611.10424-1-brian.starkey@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 ...