Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1256079pxu; Fri, 16 Oct 2020 07:44:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpmd8M/jhR4DxG61b/5J4o7F78plHKkHZc6W/FNQ/DYDZUtJYgoOHjtDVtstM8Mtixp2aK X-Received: by 2002:a17:906:c109:: with SMTP id do9mr4072637ejc.142.1602859460512; Fri, 16 Oct 2020 07:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602859460; cv=none; d=google.com; s=arc-20160816; b=vgJtrYHtb9TgeYC1+al2h8JmUgvAErwHgDDsQU3BAcR+00S+fN4ddu7W+jbjh9B4qZ fIzVjdniiSJWZ0uhGknVjW5eHvkaq94EgO4XH6fvnClVsOWnzX8K8TJ5gM1mQZMPqHjS fCRvkio3TLz1hIhFsi3pim4b43M2YeFViRIzpXoN3DdmpTgAVmrw4SygKhXcpjZcgCVY qkofPKorfVGQghs5+uhY7iR6k1btoguQacdNwqXKvWTQYqdBStL5KYoNMQDZPb31XVLo tny3P/EbKmXHc+S+0NyqsPs2comKpQp56zbufl6LerEE8jjRpQx4slqdykslBE5s0fQQ aOgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=O87jLfEjZZ2ZSzsbI1SKSWeRlIC7NPJRB1U6s53hq54=; b=H6QHZ+c8zCXNdqmBC9UU9my+uWsDP6Yb+aE5oOhcXMhUZwzc1YQ79rhUnNQpPq8OZe 1CVX+Z4xDnuKCiK8sVBXxyH52qQ2E7i/h9nW87JJpN3doyBZimmDaBjwK1+m1uHPrWu5 BaYMwS98OCzh4ZZfKi91ewL+iQuTSohkxMlhneMwgES3VpoER9UsCLfey4PCTeWCTzMX kqTNhf3692kVtz8lp9QqEXQHB+mu0Qx1+KArn8P1FYZOc/xESjXqaa2CZEMpWGcR9agn K/pipaa4Z7OFAFe/wHwAfDl6HRhdwyc0EfK+QjrYZGv7iobdkXMwJUOMqX77fMIPymlT 7ItQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Yd/PILQ1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si1931541edk.298.2020.10.16.07.43.57; Fri, 16 Oct 2020 07:44:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Yd/PILQ1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406831AbgJPLhe (ORCPT + 99 others); Fri, 16 Oct 2020 07:37:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:36606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406825AbgJPLhd (ORCPT ); Fri, 16 Oct 2020 07:37:33 -0400 Received: from coco.lan (ip5f5ad5ad.dynamic.kabel-deutschland.de [95.90.213.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 02A6C2084C; Fri, 16 Oct 2020 11:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602848251; bh=9hpGPXNgAJZ13iqDGKTZVExjC2tLIrYDVAG4Kc6+p9A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Yd/PILQ1+QOse2x/ZMV50JBlFiZCmkZzYMLbYEhSQJ/5nNx99s4kTUp3ig9MzqUK7 EdFHKCtM7ZPuFDdF7MsDh4ZsH4jQZQBDjp0/oStOWzMo2naKl2XjyF1uJ1tsZkZijs 9YEwKUsiX+JAWmNZRYl3F6xWVYEurg9nq5hMCLuQ= Date: Fri, 16 Oct 2020 13:37:24 +0200 From: Mauro Carvalho Chehab To: Joonas Lahtinen Cc: Linux Doc Mailing List , Lionel Landwerlin , Jonathan Corbet , Daniel Vetter , David Airlie , Jani Nikula , Maarten Lankhorst , Maxime Ripard , Rodrigo Vivi , Thomas Zimmermann , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 44/80] docs: gpu: i915.rst: Fix several C duplication warnings Message-ID: <20201016133724.1d578006@coco.lan> In-Reply-To: <160284606673.11659.11178759979047002902@jlahtine-mobl.ger.corp.intel.com> References: <52a0dd42d3730d35b3ecd00d20a0601793e443e6.1602589096.git.mchehab+huawei@kernel.org> <160284606673.11659.11178759979047002902@jlahtine-mobl.ger.corp.intel.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, 16 Oct 2020 14:01:07 +0300 Joonas Lahtinen escreveu: > + Lionel > > Can you please take a look at best resolving the below problem. > > Maybe we should eliminate the duplicate declarations? Updating such > a list manually seems error prone to me. For Kernel 5.10, IMO the best is to apply this patch as-is, as any other thing would need to be postponed, and we want 5.10 free of doc warnings. Yet, when I wrote this one, I almost took a different approach: to implement something like @*group (or \*group) directives that exists on doxygen: https://www.doxygen.nl/manual/grouping.html If something like that gets added to kernel-doc syntax, then one could do something like: /** * DOC: some foo description * @group foo */ /** * foo1 - do some foo things * @group foo ... */ /** * foo2 - do some other foo things * @group foo ... */ /** * bar - do bar things * @group bar ... */ And then, at kernel-doc markup: FOO === .. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c :group: foo BAR === .. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c :group: bar I suspect that something like that would be a lot easier to maintain. Once having someone like that implemented, it should be easy to also have something like this: OTHERS ====== .. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c :export: :not-grouped: in order to pick other functions that aren't grouped. I suspect that implementing something like that at kernel-doc.pl won't be hard. Regards, Mauro > > Regards, Joonas > > Quoting Mauro Carvalho Chehab (2020-10-13 14:53:59) > > As reported by Sphinx: > > > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1147: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_oa_wait_unlocked'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1169: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_oa_poll_wait'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1189: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_oa_read'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2669: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_oa_stream_enable'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2734: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_oa_stream_disable'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2820: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_oa_stream_init'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3010: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_read'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3098: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_poll_locked'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3129: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_poll'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3152: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_enable_locked'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3181: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_disable_locked'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3273: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_ioctl'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3296: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_destroy_locked'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3321: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_release'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3379: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_open_ioctl_locked'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3534: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'read_properties_unlocked'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3717: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_open_ioctl'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3760: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_register'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3789: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_unregister'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4009: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_add_config_ioctl'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4162: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_remove_config_ioctl'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4260: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_init'. > > ./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4423: WARNING: Duplicate C declaration, also defined in 'gpu/i915'. > > Declaration is 'i915_perf_fini'. > > > > With Sphinx 3, C declarations can't be duplicated anymore, > > so let's exclude those from the other internals found on > > i915_perf.c file. > > > > Signed-off-by: Mauro Carvalho Chehab > > --- > > Documentation/gpu/i915.rst | 29 +++++++++++++++++++++++++---- > > 1 file changed, 25 insertions(+), 4 deletions(-) > > > > diff --git a/Documentation/gpu/i915.rst b/Documentation/gpu/i915.rst > > index 33cc6ddf8f64..cff1f154b473 100644 > > --- a/Documentation/gpu/i915.rst > > +++ b/Documentation/gpu/i915.rst > > @@ -636,15 +636,36 @@ i915 Perf Observation Architecture Stream > > .. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c > > :functions: i915_oa_poll_wait > > > > -All i915 Perf Internals > > ------------------------ > > +Other i915 Perf Internals > > +------------------------- > > > > -This section simply includes all currently documented i915 perf internals, in > > -no particular order, but may include some more minor utilities or platform > > +This section simply includes all other currently documented i915 perf internals, > > +in no particular order, but may include some more minor utilities or platform > > specific details than found in the more high-level sections. > > > > .. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c > > :internal: > > + :no-identifiers: > > + i915_perf_init > > + i915_perf_fini > > + i915_perf_register > > + i915_perf_unregister > > + i915_perf_open_ioctl > > + i915_perf_release > > + i915_perf_add_config_ioctl > > + i915_perf_remove_config_ioctl > > + read_properties_unlocked > > + i915_perf_open_ioctl_locked > > + i915_perf_destroy_locked > > + i915_perf_read i915_perf_ioctl > > + i915_perf_enable_locked > > + i915_perf_disable_locked > > + i915_perf_poll i915_perf_poll_locked > > + i915_oa_stream_init i915_oa_read > > + i915_oa_stream_enable > > + i915_oa_stream_disable > > + i915_oa_wait_unlocked > > + i915_oa_poll_wait > > > > Style > > ===== > > -- > > 2.26.2 > > Thanks, Mauro