Message ID | 20240106032957.1195-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-18468-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6594591dyb; Fri, 5 Jan 2024 19:30:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvqXNniMV5OiNHRFDqQYI4hgK7apYu3/ODIFXnwIaWkX5FiMa12+hwjWCRlxOg8Z+s0W7C X-Received: by 2002:a17:906:a451:b0:a26:97fe:b8cc with SMTP id cb17-20020a170906a45100b00a2697feb8ccmr105296ejb.66.1704511818543; Fri, 05 Jan 2024 19:30:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704511818; cv=none; d=google.com; s=arc-20160816; b=wfqET7ABZpr+N1j9aomDyzTGsqJFQl3X6vdEF6ymKq+iTvq0Kh2NcQGr9CoZI9aoQm aHODKitFWXbj1Au7uQokxkV/S/m5QtrX6mX6UZXa+xf8Lvf83tSrKPUGm8jUam8i7Klp XDjWxZjDoqGFTbTyo8xXmV5Cd497GBm5yZ6dlnBs57mw0aCjtZt55C5hgjVgudNw2xQG z1OAFVVdZhm5UnISIT4hLdJKtXEcBhcF7lFu9GO4oINoSIyRwWMlFCieWBU9vrk7SzP1 n/q3iXC0qo7ZbApq2lbwf8zsup4QgMtsUFY1XhgbBcRdeb8b90uIBuMeCuxGtJ7qIpJM rLrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=a/L9G46O4yhPeKVX82rAQHZm/PfK/fhGBjlWV3FYXi0=; fh=1ywy2wkwu6RyzJB5eIenXGslVBu+lxGcEwWxZSTPKaI=; b=l7HccoAg6ZtF0zP5RuSe6K9TMJ7ZVh5dFkT2XQXKKqSbmGBUyGaV/iHnH3rZGVOQN0 k6HBxVok6nBOaYifh5CZIVXOqnIx1z9xL8rwxqvH8jNM4o+GvDVgzvZt2lybkrCj2/aY +qNvOO675glbBXGB5yjKn2Z5MNaoGGbqmFshxl5UVkkgWLK6GzUcz67qwE3aXGQgtWtS bU9TAGThAue0xRHUSvI4514mjpByOJcRZYPOX6c6bHXzsKHba75css0Igf0MNZFJXSP6 tErJDA06MrJVlqKznXt/IcbCVyIM3/g17ueRFmEIUIMCaNG17hsTbq6W2w+rEqSsYPYp wLQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=TTNAvLcz; spf=pass (google.com: domain of linux-kernel+bounces-18468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18468-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bg21-20020a170906a05500b00a27eba85d99si1118992ejb.980.2024.01.05.19.30.18 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 19:30:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=TTNAvLcz; spf=pass (google.com: domain of linux-kernel+bounces-18468-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18468-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2BB281F241F7 for <ouuuleilei@gmail.com>; Sat, 6 Jan 2024 03:30:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CAE81FD9; Sat, 6 Jan 2024 03:30:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="TTNAvLcz" X-Original-To: linux-kernel@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26BEA15AB for <linux-kernel@vger.kernel.org>; Sat, 6 Jan 2024 03:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=a/L9G46O4yhPeKVX82rAQHZm/PfK/fhGBjlWV3FYXi0=; b=TTNAvLczvr5LT3niKmQY/G7frt 4KoWmsHpP5oImO4I+wxtgQmeL+uphRn+pFdELVw8FQOJvmeqr5jSMHyGqpPR8rS8R6jLT0Y4GlV99 ihjQ9rE+m8dnfb9rX73v+c9lYuUhqYOFgUJ8+NIa++G1bHQx/WP8cAcMrMApbnalValBaMuwzWD4q 2rFBlWIoVrQw0l9RN58odnuJW/CjuzZ/85i65KpwBkAaLmH9qwDy6JOxbWJaQg74QRoux/tzbnFQW 92IIgiDnm7NpNhNeK1jvEA3YD/7v7aZNU+1XKkUlbq7wVwS6pDJ8EjOFw/mPCQ18zLUR8faZr/aEf j+/ZPaxA==; Received: from [50.53.46.231] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rLxNm-000fid-1A; Sat, 06 Jan 2024 03:29:58 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, dri-devel@lists.freedesktop.org, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de> Subject: [PATCH v2] drm/vram-helper: fix kernel-doc warnings Date: Fri, 5 Jan 2024 19:29:57 -0800 Message-ID: <20240106032957.1195-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787309764563159468 X-GMAIL-MSGID: 1787310184348020205 |
Series |
[v2] drm/vram-helper: fix kernel-doc warnings
|
|
Commit Message
Randy Dunlap
Jan. 6, 2024, 3:29 a.m. UTC
Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc
warning.
Use the "define" kernel-doc keyword and an '\' line continuation
to fix another kernel-doc warning.
drm_gem_vram_helper.h:129: warning: missing initial short description on line:
* DRM_GEM_VRAM_PLANE_HELPER_FUNCS -
drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
---
v2: Add commit description
base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a
include/drm/drm_gem_vram_helper.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi, thanks for the fix. Am 06.01.24 um 04:29 schrieb Randy Dunlap: > Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc > warning. > > Use the "define" kernel-doc keyword and an '\' line continuation > to fix another kernel-doc warning. > > drm_gem_vram_helper.h:129: warning: missing initial short description on line: > * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Cc: David Airlie <airlied@gmail.com> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: dri-devel@lists.freedesktop.org > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > --- > v2: Add commit description > > base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a > > include/drm/drm_gem_vram_helper.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h > --- a/include/drm/drm_gem_vram_helper.h > +++ b/include/drm/drm_gem_vram_helper.h > @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str > struct drm_plane_state *old_state); > > /** > - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? Best regards Thomas > * Initializes struct drm_plane_helper_funcs for VRAM handling > * > * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This > @@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cl > * @vram_base: Base address of the managed video memory > * @vram_size: Size of the managed video memory in bytes > * @bdev: The TTM BO device. > - * @funcs: TTM BO functions > * > * The fields &struct drm_vram_mm.vram_base and > * &struct drm_vram_mm.vrm_size are managed by VRAM MM, but are -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Hi Thomas, On 1/8/24 00:57, Thomas Zimmermann wrote: > Hi, > > thanks for the fix. > > Am 06.01.24 um 04:29 schrieb Randy Dunlap: >> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc >> warning. >> >> Use the "define" kernel-doc keyword and an '\' line continuation >> to fix another kernel-doc warning. >> >> drm_gem_vram_helper.h:129: warning: missing initial short description on line: >> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' >> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >> Cc: David Airlie <airlied@gmail.com> >> Cc: Daniel Vetter <daniel@ffwll.ch> >> Cc: dri-devel@lists.freedesktop.org >> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> >> Cc: Maxime Ripard <mripard@kernel.org> >> Cc: Thomas Zimmermann <tzimmermann@suse.de> >> --- >> v2: Add commit description >> >> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a >> >> include/drm/drm_gem_vram_helper.h | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h >> --- a/include/drm/drm_gem_vram_helper.h >> +++ b/include/drm/drm_gem_vram_helper.h >> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str >> struct drm_plane_state *old_state); >> /** >> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ > > Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? > There are no doc syntax changes that I know of. This is not new syntax. It has been around since 2014: cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") "define OBJ_LIKE_MACRO" is used 2 other times in include/drm/: drm_fb_helper.h: /** * define DRM_FB_HELPER_DEFAULT_OPS - helper define for drm drivers * * Helper define to register default implementations of drm_fb_helper * functions. To be used in struct fb_ops of drm drivers. */ drm_gem_vram_helper.h: (the file being patched here) /** * define DRM_GEM_VRAM_DRIVER - default callback functions for \ &struct drm_driver * * Drivers that use VRAM MM and GEM VRAM can use this macro to initialize * &struct drm_driver with default functions. */ > >> * Initializes struct drm_plane_helper_funcs for VRAM handling >> * >> * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This >> @@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cl >> * @vram_base: Base address of the managed video memory >> * @vram_size: Size of the managed video memory in bytes >> * @bdev: The TTM BO device. >> - * @funcs: TTM BO functions >> * >> * The fields &struct drm_vram_mm.vram_base and >> * &struct drm_vram_mm.vrm_size are managed by VRAM MM, but are >
On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: > Hi Thomas, > > On 1/8/24 00:57, Thomas Zimmermann wrote: > > Hi, > > > > thanks for the fix. > > > > Am 06.01.24 um 04:29 schrieb Randy Dunlap: > >> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc > >> warning. > >> > >> Use the "define" kernel-doc keyword and an '\' line continuation > >> to fix another kernel-doc warning. > >> > >> drm_gem_vram_helper.h:129: warning: missing initial short description on line: > >> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > >> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' > >> > >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > >> Cc: David Airlie <airlied@gmail.com> > >> Cc: Daniel Vetter <daniel@ffwll.ch> > >> Cc: dri-devel@lists.freedesktop.org > >> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > >> Cc: Maxime Ripard <mripard@kernel.org> > >> Cc: Thomas Zimmermann <tzimmermann@suse.de> > >> --- > >> v2: Add commit description > >> > >> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a > >> > >> include/drm/drm_gem_vram_helper.h | 3 +-- > >> 1 file changed, 1 insertion(+), 2 deletions(-) > >> > >> diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h > >> --- a/include/drm/drm_gem_vram_helper.h > >> +++ b/include/drm/drm_gem_vram_helper.h > >> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str > >> struct drm_plane_state *old_state); > >> /** > >> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > >> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ > > > > Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? > > > > There are no doc syntax changes that I know of. This is not > new syntax. It has been around since 2014: > cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") I had no idea this exists, thanks a lot for this TIL :-) I guess the issue here is that this exists, yay, but it's not documented with the other here: https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc folks. Cheers, Sima
On Tue, 9 Jan 2024 at 13:59, Daniel Vetter <daniel@ffwll.ch> wrote: > > On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: > > Hi Thomas, > > > > On 1/8/24 00:57, Thomas Zimmermann wrote: > > > Hi, > > > > > > thanks for the fix. > > > > > > Am 06.01.24 um 04:29 schrieb Randy Dunlap: > > >> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc > > >> warning. > > >> > > >> Use the "define" kernel-doc keyword and an '\' line continuation > > >> to fix another kernel-doc warning. > > >> > > >> drm_gem_vram_helper.h:129: warning: missing initial short description on line: > > >> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > > >> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' > > >> > > >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > > >> Cc: David Airlie <airlied@gmail.com> > > >> Cc: Daniel Vetter <daniel@ffwll.ch> > > >> Cc: dri-devel@lists.freedesktop.org > > >> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > > >> Cc: Maxime Ripard <mripard@kernel.org> > > >> Cc: Thomas Zimmermann <tzimmermann@suse.de> > > >> --- > > >> v2: Add commit description > > >> > > >> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a > > >> > > >> include/drm/drm_gem_vram_helper.h | 3 +-- > > >> 1 file changed, 1 insertion(+), 2 deletions(-) > > >> > > >> diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h > > >> --- a/include/drm/drm_gem_vram_helper.h > > >> +++ b/include/drm/drm_gem_vram_helper.h > > >> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str > > >> struct drm_plane_state *old_state); > > >> /** > > >> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > > >> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ > > > > > > Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? > > > > > > > There are no doc syntax changes that I know of. This is not > > new syntax. It has been around since 2014: > > cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") > > I had no idea this exists, thanks a lot for this TIL :-) > > I guess the issue here is that this exists, yay, but it's not documented > with the other here: > > https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation > > I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc > folks. Ok I went ahead and typed that patch (just we don't waste effort), just waiting for the sphinx build to finish to make sure it looks nice before I send out the patch. -Sima
On 1/9/24 05:42, Daniel Vetter wrote: > On Tue, 9 Jan 2024 at 13:59, Daniel Vetter <daniel@ffwll.ch> wrote: >> >> On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: >>> Hi Thomas, >>> >>> On 1/8/24 00:57, Thomas Zimmermann wrote: >>>> Hi, >>>> >>>> thanks for the fix. >>>> >>>> Am 06.01.24 um 04:29 schrieb Randy Dunlap: >>>>> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc >>>>> warning. >>>>> >>>>> Use the "define" kernel-doc keyword and an '\' line continuation >>>>> to fix another kernel-doc warning. >>>>> >>>>> drm_gem_vram_helper.h:129: warning: missing initial short description on line: >>>>> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' >>>>> >>>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >>>>> Cc: David Airlie <airlied@gmail.com> >>>>> Cc: Daniel Vetter <daniel@ffwll.ch> >>>>> Cc: dri-devel@lists.freedesktop.org >>>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> >>>>> Cc: Maxime Ripard <mripard@kernel.org> >>>>> Cc: Thomas Zimmermann <tzimmermann@suse.de> >>>>> --- >>>>> v2: Add commit description >>>>> >>>>> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a >>>>> >>>>> include/drm/drm_gem_vram_helper.h | 3 +-- >>>>> 1 file changed, 1 insertion(+), 2 deletions(-) >>>>> >>>>> diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h >>>>> --- a/include/drm/drm_gem_vram_helper.h >>>>> +++ b/include/drm/drm_gem_vram_helper.h >>>>> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str >>>>> struct drm_plane_state *old_state); >>>>> /** >>>>> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ >>>> >>>> Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? >>>> >>> >>> There are no doc syntax changes that I know of. This is not >>> new syntax. It has been around since 2014: >>> cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") >> >> I had no idea this exists, thanks a lot for this TIL :-) >> >> I guess the issue here is that this exists, yay, but it's not documented >> with the other here: >> >> https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation >> >> I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc >> folks. > > Ok I went ahead and typed that patch (just we don't waste effort), > just waiting for the sphinx build to finish to make sure it looks nice > before I send out the patch. > -Sima I sent one a few days ago: https://lore.kernel.org/lkml/20240107012400.32587-1-rdunlap@infradead.org/
On Tue, 9 Jan 2024 at 16:23, Randy Dunlap <rdunlap@infradead.org> wrote: > > > > On 1/9/24 05:42, Daniel Vetter wrote: > > On Tue, 9 Jan 2024 at 13:59, Daniel Vetter <daniel@ffwll.ch> wrote: > >> > >> On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: > >>> Hi Thomas, > >>> > >>> On 1/8/24 00:57, Thomas Zimmermann wrote: > >>>> Hi, > >>>> > >>>> thanks for the fix. > >>>> > >>>> Am 06.01.24 um 04:29 schrieb Randy Dunlap: > >>>>> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc > >>>>> warning. > >>>>> > >>>>> Use the "define" kernel-doc keyword and an '\' line continuation > >>>>> to fix another kernel-doc warning. > >>>>> > >>>>> drm_gem_vram_helper.h:129: warning: missing initial short description on line: > >>>>> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > >>>>> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' > >>>>> > >>>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > >>>>> Cc: David Airlie <airlied@gmail.com> > >>>>> Cc: Daniel Vetter <daniel@ffwll.ch> > >>>>> Cc: dri-devel@lists.freedesktop.org > >>>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > >>>>> Cc: Maxime Ripard <mripard@kernel.org> > >>>>> Cc: Thomas Zimmermann <tzimmermann@suse.de> > >>>>> --- > >>>>> v2: Add commit description > >>>>> > >>>>> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a > >>>>> > >>>>> include/drm/drm_gem_vram_helper.h | 3 +-- > >>>>> 1 file changed, 1 insertion(+), 2 deletions(-) > >>>>> > >>>>> diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h > >>>>> --- a/include/drm/drm_gem_vram_helper.h > >>>>> +++ b/include/drm/drm_gem_vram_helper.h > >>>>> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str > >>>>> struct drm_plane_state *old_state); > >>>>> /** > >>>>> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > >>>>> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ > >>>> > >>>> Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? > >>>> > >>> > >>> There are no doc syntax changes that I know of. This is not > >>> new syntax. It has been around since 2014: > >>> cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") > >> > >> I had no idea this exists, thanks a lot for this TIL :-) > >> > >> I guess the issue here is that this exists, yay, but it's not documented > >> with the other here: > >> > >> https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation > >> > >> I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc > >> folks. > > > > Ok I went ahead and typed that patch (just we don't waste effort), > > just waiting for the sphinx build to finish to make sure it looks nice > > before I send out the patch. > > -Sima > > I sent one a few days ago: > > https://lore.kernel.org/lkml/20240107012400.32587-1-rdunlap@infradead.org/ Could you please also add documentation for function-like macros, since that's also missing? With that acked-by: me. Cheers!
On 1/9/24 07:25, Daniel Vetter wrote: > On Tue, 9 Jan 2024 at 16:23, Randy Dunlap <rdunlap@infradead.org> wrote: >> >> >> >> On 1/9/24 05:42, Daniel Vetter wrote: >>> On Tue, 9 Jan 2024 at 13:59, Daniel Vetter <daniel@ffwll.ch> wrote: >>>> >>>> On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: >>>>> Hi Thomas, >>>>> >>>>> On 1/8/24 00:57, Thomas Zimmermann wrote: >>>>>> Hi, >>>>>> >>>>>> thanks for the fix. >>>>>> >>>>>> Am 06.01.24 um 04:29 schrieb Randy Dunlap: >>>>>>> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc >>>>>>> warning. >>>>>>> >>>>>>> Use the "define" kernel-doc keyword and an '\' line continuation >>>>>>> to fix another kernel-doc warning. >>>>>>> >>>>>>> drm_gem_vram_helper.h:129: warning: missing initial short description on line: >>>>>>> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>>>> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' >>>>>>> >>>>>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> >>>>>>> Cc: David Airlie <airlied@gmail.com> >>>>>>> Cc: Daniel Vetter <daniel@ffwll.ch> >>>>>>> Cc: dri-devel@lists.freedesktop.org >>>>>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> >>>>>>> Cc: Maxime Ripard <mripard@kernel.org> >>>>>>> Cc: Thomas Zimmermann <tzimmermann@suse.de> >>>>>>> --- >>>>>>> v2: Add commit description >>>>>>> >>>>>>> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a >>>>>>> >>>>>>> include/drm/drm_gem_vram_helper.h | 3 +-- >>>>>>> 1 file changed, 1 insertion(+), 2 deletions(-) >>>>>>> >>>>>>> diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h >>>>>>> --- a/include/drm/drm_gem_vram_helper.h >>>>>>> +++ b/include/drm/drm_gem_vram_helper.h >>>>>>> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str >>>>>>> struct drm_plane_state *old_state); >>>>>>> /** >>>>>>> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - >>>>>>> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ >>>>>> >>>>>> Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? >>>>>> >>>>> >>>>> There are no doc syntax changes that I know of. This is not >>>>> new syntax. It has been around since 2014: >>>>> cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") >>>> >>>> I had no idea this exists, thanks a lot for this TIL :-) >>>> >>>> I guess the issue here is that this exists, yay, but it's not documented >>>> with the other here: >>>> >>>> https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation >>>> >>>> I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc >>>> folks. >>> >>> Ok I went ahead and typed that patch (just we don't waste effort), >>> just waiting for the sphinx build to finish to make sure it looks nice >>> before I send out the patch. >>> -Sima >> >> I sent one a few days ago: >> >> https://lore.kernel.org/lkml/20240107012400.32587-1-rdunlap@infradead.org/ > > Could you please also add documentation for function-like macros, > since that's also missing? With that acked-by: me. > > Cheers! This is already present: Function documentation ---------------------- The general format of a function and function-like macro kernel-doc comment is:: /** * function_name() - Brief description of function. * @arg1: Describe the first argument. * @arg2: Describe the second argument. * One can provide multiple line descriptions * for arguments. but the way that you did it makes sense also.
On Tue, 9 Jan 2024 at 16:29, Randy Dunlap <rdunlap@infradead.org> wrote: > > > > On 1/9/24 07:25, Daniel Vetter wrote: > > On Tue, 9 Jan 2024 at 16:23, Randy Dunlap <rdunlap@infradead.org> wrote: > >> > >> > >> > >> On 1/9/24 05:42, Daniel Vetter wrote: > >>> On Tue, 9 Jan 2024 at 13:59, Daniel Vetter <daniel@ffwll.ch> wrote: > >>>> > >>>> On Mon, Jan 08, 2024 at 01:10:12PM -0800, Randy Dunlap wrote: > >>>>> Hi Thomas, > >>>>> > >>>>> On 1/8/24 00:57, Thomas Zimmermann wrote: > >>>>>> Hi, > >>>>>> > >>>>>> thanks for the fix. > >>>>>> > >>>>>> Am 06.01.24 um 04:29 schrieb Randy Dunlap: > >>>>>>> Remove the @funcs entry from struct drm_vram_mm to quieten the kernel-doc > >>>>>>> warning. > >>>>>>> > >>>>>>> Use the "define" kernel-doc keyword and an '\' line continuation > >>>>>>> to fix another kernel-doc warning. > >>>>>>> > >>>>>>> drm_gem_vram_helper.h:129: warning: missing initial short description on line: > >>>>>>> * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > >>>>>>> drm_gem_vram_helper.h:185: warning: Excess struct member 'funcs' description in 'drm_vram_mm' > >>>>>>> > >>>>>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > >>>>>>> Cc: David Airlie <airlied@gmail.com> > >>>>>>> Cc: Daniel Vetter <daniel@ffwll.ch> > >>>>>>> Cc: dri-devel@lists.freedesktop.org > >>>>>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > >>>>>>> Cc: Maxime Ripard <mripard@kernel.org> > >>>>>>> Cc: Thomas Zimmermann <tzimmermann@suse.de> > >>>>>>> --- > >>>>>>> v2: Add commit description > >>>>>>> > >>>>>>> base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a > >>>>>>> > >>>>>>> include/drm/drm_gem_vram_helper.h | 3 +-- > >>>>>>> 1 file changed, 1 insertion(+), 2 deletions(-) > >>>>>>> > >>>>>>> diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h > >>>>>>> --- a/include/drm/drm_gem_vram_helper.h > >>>>>>> +++ b/include/drm/drm_gem_vram_helper.h > >>>>>>> @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str > >>>>>>> struct drm_plane_state *old_state); > >>>>>>> /** > >>>>>>> - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - > >>>>>>> + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ > >>>>>> > >>>>>> Did something change wrt. doc syntax? I think this used to work without warnings. About this 'define': we don't use is in another docs. Can we leave it out here or is this the new syntax? > >>>>>> > >>>>> > >>>>> There are no doc syntax changes that I know of. This is not > >>>>> new syntax. It has been around since 2014: > >>>>> cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros") > >>>> > >>>> I had no idea this exists, thanks a lot for this TIL :-) > >>>> > >>>> I guess the issue here is that this exists, yay, but it's not documented > >>>> with the other here: > >>>> > >>>> https://dri.freedesktop.org/docs/drm/doc-guide/kernel-doc.html#structure-union-and-enumeration-documentation > >>>> > >>>> I guess a patch to kernel-doc.rst would be great. Adding some kernel-doc > >>>> folks. > >>> > >>> Ok I went ahead and typed that patch (just we don't waste effort), > >>> just waiting for the sphinx build to finish to make sure it looks nice > >>> before I send out the patch. > >>> -Sima > >> > >> I sent one a few days ago: > >> > >> https://lore.kernel.org/lkml/20240107012400.32587-1-rdunlap@infradead.org/ > > > > Could you please also add documentation for function-like macros, > > since that's also missing? With that acked-by: me. > > > > Cheers! > > This is already present: > > Function documentation > ---------------------- > > The general format of a function and function-like macro kernel-doc comment is:: > > /** > * function_name() - Brief description of function. > * @arg1: Describe the first argument. > * @arg2: Describe the second argument. > * One can provide multiple line descriptions > * for arguments. > > > but the way that you did it makes sense also. Ah missed that it includes wording for function-like macros. On your patch as-is: Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
diff -- a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h --- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -126,7 +126,7 @@ drm_gem_vram_plane_helper_cleanup_fb(str struct drm_plane_state *old_state); /** - * DRM_GEM_VRAM_PLANE_HELPER_FUNCS - + * define DRM_GEM_VRAM_PLANE_HELPER_FUNCS - \ * Initializes struct drm_plane_helper_funcs for VRAM handling * * Drivers may use GEM BOs as VRAM helpers for the framebuffer memory. This @@ -170,7 +170,6 @@ void drm_gem_vram_simple_display_pipe_cl * @vram_base: Base address of the managed video memory * @vram_size: Size of the managed video memory in bytes * @bdev: The TTM BO device. - * @funcs: TTM BO functions * * The fields &struct drm_vram_mm.vram_base and * &struct drm_vram_mm.vrm_size are managed by VRAM MM, but are