linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu)
@ 2023-07-12  2:37 Randy Dunlap
  2023-07-12  3:32 ` Akira Yokosawa
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2023-07-12  2:37 UTC (permalink / raw)
  To: Linux Doc Mailing List, Jonathan Corbet
  Cc: dri-devel@lists.freedesktop.org, amd-gfx list,
	linux-kernel@vger.kernel.org

[just documenting this for posterity or in case someone wants to fix it.]

In drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c, one can find both

struct amdgpu_vm_tlb_seq_cb {...};

and
static void amdgpu_vm_tlb_seq_cb(...)

Of course C has no problem with this, but kernel-doc reports:

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:833: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/driver-core:115.

And of course, if the name of one of them is changed, kernel-doc is all happy...
not that I am suggesting that one of them should be changed.

I just want to make people aware of this. (or maybe people are already aware of this?)

-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu)
  2023-07-12  2:37 scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu) Randy Dunlap
@ 2023-07-12  3:32 ` Akira Yokosawa
  2023-07-12  3:45   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Akira Yokosawa @ 2023-07-12  3:32 UTC (permalink / raw)
  To: rdunlap
  Cc: amd-gfx, corbet, dri-devel, linux-doc, linux-kernel,
	Akira Yokosawa, Mauro Carvalho Chehab

Hi Randy,

> [just documenting this for posterity or in case someone wants to fix it.]
> 
> In drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c, one can find both
> 
> struct amdgpu_vm_tlb_seq_cb {...};
> 
> and
> static void amdgpu_vm_tlb_seq_cb(...)
> 
> Of course C has no problem with this, but kernel-doc reports:
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:833: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/driver-core:115.
> 
> And of course, if the name of one of them is changed, kernel-doc is all happy...
> not that I am suggesting that one of them should be changed.
> 
> I just want to make people aware of this. (or maybe people are already aware of this?)

The duplicate warning is emitted from Sphinx, not kernel-doc.

This is a bug of Sphinx >=3.1, first reported by Mauro back in September 2020 at:

    https://github.com/sphinx-doc/sphinx/issues/8241

It was closed when a local fix was presented.  Unfortunately, it was not
merged at the time and a subsequent pull request was opened at:

    https://github.com/sphinx-doc/sphinx/pull/8313

It is not merged yet and carries a milestone of Sphinx 7.x.

Looks like we need to wait patiently.

        Thanks, Akira

> 
> -- 
> ~Randy


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu)
  2023-07-12  3:32 ` Akira Yokosawa
@ 2023-07-12  3:45   ` Randy Dunlap
  2023-07-12  5:42     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2023-07-12  3:45 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: amd-gfx, corbet, dri-devel, linux-doc, linux-kernel,
	Mauro Carvalho Chehab



On 7/11/23 20:32, Akira Yokosawa wrote:
> Hi Randy,
> 
>> [just documenting this for posterity or in case someone wants to fix it.]
>>
>> In drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c, one can find both
>>
>> struct amdgpu_vm_tlb_seq_cb {...};
>>
>> and
>> static void amdgpu_vm_tlb_seq_cb(...)
>>
>> Of course C has no problem with this, but kernel-doc reports:
>>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:833: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/driver-core:115.
>>
>> And of course, if the name of one of them is changed, kernel-doc is all happy...
>> not that I am suggesting that one of them should be changed.
>>
>> I just want to make people aware of this. (or maybe people are already aware of this?)
> 
> The duplicate warning is emitted from Sphinx, not kernel-doc.
> 
> This is a bug of Sphinx >=3.1, first reported by Mauro back in September 2020 at:
> 
>     https://github.com/sphinx-doc/sphinx/issues/8241
> 
> It was closed when a local fix was presented.  Unfortunately, it was not
> merged at the time and a subsequent pull request was opened at:
> 
>     https://github.com/sphinx-doc/sphinx/pull/8313
> 
> It is not merged yet and carries a milestone of Sphinx 7.x.
> 
> Looks like we need to wait patiently.
> 
>         Thanks, Akira

Ooooh, thanks for your assistance.  Waiting.... :)

-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu)
  2023-07-12  3:45   ` Randy Dunlap
@ 2023-07-12  5:42     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2023-07-12  5:42 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Akira Yokosawa, amd-gfx, corbet, dri-devel, linux-doc,
	linux-kernel

Em Tue, 11 Jul 2023 20:45:18 -0700
Randy Dunlap <rdunlap@infradead.org> escreveu:

> On 7/11/23 20:32, Akira Yokosawa wrote:
> > Hi Randy,
> >   
> >> [just documenting this for posterity or in case someone wants to fix it.]
> >>
> >> In drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c, one can find both
> >>
> >> struct amdgpu_vm_tlb_seq_cb {...};
> >>
> >> and
> >> static void amdgpu_vm_tlb_seq_cb(...)
> >>
> >> Of course C has no problem with this, but kernel-doc reports:
> >>
> >> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:833: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/driver-core:115.
> >>
> >> And of course, if the name of one of them is changed, kernel-doc is all happy...
> >> not that I am suggesting that one of them should be changed.
> >>
> >> I just want to make people aware of this. (or maybe people are already aware of this?)  
> > 
> > The duplicate warning is emitted from Sphinx, not kernel-doc.
> > 
> > This is a bug of Sphinx >=3.1, first reported by Mauro back in September 2020 at:
> > 
> >     https://github.com/sphinx-doc/sphinx/issues/8241
> > 
> > It was closed when a local fix was presented.  Unfortunately, it was not
> > merged at the time and a subsequent pull request was opened at:
> > 
> >     https://github.com/sphinx-doc/sphinx/pull/8313
> > 
> > It is not merged yet and carries a milestone of Sphinx 7.x.
> > 
> > Looks like we need to wait patiently.
> > 
> >         Thanks, Akira  
> 
> Ooooh, thanks for your assistance.  Waiting.... :)

Yeah, we've been waiting this since Sphinx version 3.x times :-(

It seems that applying the fix would break an extension
(intersphinx). We don't use at the Kernel, so it won't affect
us, but it seems to be a popular extension, as it allows one
web server to have cross-references to Sphinx docs produced
elsewhere. Btw, such extension could be interesting on partial
doc builds (e. g. make SPHNXDIRS="foo_dir" htmldocs), as the
non-existing cross-references would be pointing, for instance,
to the docs stored at kernel.doc latest docs.

Btw, I'm still using version 2.4.4 when building the docs
to avoid the wrong duplicate warnings with 3.1+ due to this bug.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-12  5:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12  2:37 scripts/kernel-doc does not handle duplicate struct & function names (e.g., in amdgpu) Randy Dunlap
2023-07-12  3:32 ` Akira Yokosawa
2023-07-12  3:45   ` Randy Dunlap
2023-07-12  5:42     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).