diff mbox series

[v2,01/39] drm/i915/gvt: Fix kernel-doc for intel_gvt_switch_mmio()

Message ID 72db6b58c1f223e326f84978267ba064eaf67ff0.1657699522.git.mchehab@kernel.org (mailing list archive)
State New, archived
Headers show
Series drm/i915: fix kernel-doc issues | expand

Commit Message

Mauro Carvalho Chehab July 13, 2022, 8:11 a.m. UTC
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Fix the following W=1 kernel warnings:

drivers/gpu/drm/i915/gvt/mmio_context.c:560: warning: expecting
prototype for intel_gvt_switch_render_mmio(). Prototype was for
intel_gvt_switch_mmio() instead.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH v2 00/39] at: https://lore.kernel.org/all/cover.1657699522.git.mchehab@kernel.org/

 drivers/gpu/drm/i915/gvt/mmio_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rodrigo Vivi July 13, 2022, 9:54 p.m. UTC | #1
On Wed, Jul 13, 2022 at 09:11:49AM +0100, Mauro Carvalho Chehab wrote:
> From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> 
> Fix the following W=1 kernel warnings:
> 
> drivers/gpu/drm/i915/gvt/mmio_context.c:560: warning: expecting
> prototype for intel_gvt_switch_render_mmio(). Prototype was for
> intel_gvt_switch_mmio() instead.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
> 
> To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
> See [PATCH v2 00/39] at: https://lore.kernel.org/all/cover.1657699522.git.mchehab@kernel.org/
> 
>  drivers/gpu/drm/i915/gvt/mmio_context.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.c b/drivers/gpu/drm/i915/gvt/mmio_context.c
> index c85bafe7539e..1c6e941c9666 100644
> --- a/drivers/gpu/drm/i915/gvt/mmio_context.c
> +++ b/drivers/gpu/drm/i915/gvt/mmio_context.c
> @@ -546,7 +546,7 @@ static void switch_mmio(struct intel_vgpu *pre,
>  }
>  
>  /**
> - * intel_gvt_switch_render_mmio - switch mmio context of specific engine
> + * intel_gvt_switch_mmio - switch mmio context of specific engine
>   * @pre: the last vGPU that own the engine
>   * @next: the vGPU to switch to
>   * @engine: the engine
> -- 
> 2.36.1
>
Rodrigo Vivi July 13, 2022, 10 p.m. UTC | #2
On Wed, Jul 13, 2022 at 05:54:44PM -0400, Rodrigo Vivi wrote:
> On Wed, Jul 13, 2022 at 09:11:49AM +0100, Mauro Carvalho Chehab wrote:
> > From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> > 
> > Fix the following W=1 kernel warnings:
> > 
> > drivers/gpu/drm/i915/gvt/mmio_context.c:560: warning: expecting
> > prototype for intel_gvt_switch_render_mmio(). Prototype was for
> > intel_gvt_switch_mmio() instead.
> > 
> > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> > Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

I actually changed my mind after seeing that in most cases you use "()"
for the functions and you didn't use for this case...

which one should we pick for consistency?

> 
> > ---
> > 
> > To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
> > See [PATCH v2 00/39] at: https://lore.kernel.org/all/cover.1657699522.git.mchehab@kernel.org/
> > 
> >  drivers/gpu/drm/i915/gvt/mmio_context.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.c b/drivers/gpu/drm/i915/gvt/mmio_context.c
> > index c85bafe7539e..1c6e941c9666 100644
> > --- a/drivers/gpu/drm/i915/gvt/mmio_context.c
> > +++ b/drivers/gpu/drm/i915/gvt/mmio_context.c
> > @@ -546,7 +546,7 @@ static void switch_mmio(struct intel_vgpu *pre,
> >  }
> >  
> >  /**
> > - * intel_gvt_switch_render_mmio - switch mmio context of specific engine
> > + * intel_gvt_switch_mmio - switch mmio context of specific engine
> >   * @pre: the last vGPU that own the engine
> >   * @next: the vGPU to switch to
> >   * @engine: the engine
> > -- 
> > 2.36.1
> >
Mauro Carvalho Chehab July 14, 2022, 8:50 a.m. UTC | #3
On Wed, 13 Jul 2022 18:00:59 -0400
Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:

> On Wed, Jul 13, 2022 at 05:54:44PM -0400, Rodrigo Vivi wrote:
> > On Wed, Jul 13, 2022 at 09:11:49AM +0100, Mauro Carvalho Chehab wrote:  
> > > From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> > > 
> > > Fix the following W=1 kernel warnings:
> > > 
> > > drivers/gpu/drm/i915/gvt/mmio_context.c:560: warning: expecting
> > > prototype for intel_gvt_switch_render_mmio(). Prototype was for
> > > intel_gvt_switch_mmio() instead.
> > > 
> > > Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> > > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> > > Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>  
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>  
> 
> I actually changed my mind after seeing that in most cases you use "()"
> for the functions and you didn't use for this case...

The documentation build system handles both ways equally, and there's
no consensus kernel-wide about what would be the preferred way[1].

Also, at the html (or pdf) output, they'll all look the same. So, no
difference in practice at the produced documentation.

[1] The current count (using drm-tip 2022y-07m-12d-21h-47m-27s) as basis,
    is:

	$ git ls-files|xargs grep -Pzo "\/\*\*\n \* [_a-zA-Z0-9]+ -" |wc -l
	36680
	$ git ls-files|xargs grep -Pzo "\/\*\*\n \* [_a-zA-Z0-9]+\s*\(\) -" |wc -l
	12068

    So, 48748 documented functions, being ~25% with parenthesis, 
    and ~75% without it.

    Under drivers/gpu, the numbers are:

	$ git ls-files|grep drivers/gpu/|xargs grep -Pzo "\/\*\*\n \* [_a-zA-Z0-9]+\s*\(\) -" |wc -l
	480
	mchehab@sal /new_devel/v4l/tmp $ git ls-files|grep drivers/gpu/|xargs grep -Pzo "\/\*\*\n \* [_a-zA-Z0-9]+ -" |wc -l
	4046

> which one should we pick for consistency?

Yeah, it is nicer to use the same way everywhere. Btw, on media, I was
enforcing one way at the beginning, but I ended giving up doing that
as it was too many efforts for too little. Nowadays, half of media
function declarations have parenthesis, half doesn't.

Anyway, this is what we have at i915 driver, before this series:

	$ grep -Pzo "\/\*\*\n \* [_a-zA-Z0-9]+\s*\(\) -" $(find drivers/gpu/drm/i915 -type f)|wc -l
	53
	$ grep -Pzo "\/\*\*\n \* [_a-zA-Z0-9]+ -" $(find drivers/gpu/drm/i915 -type f)|wc -l
	542

This series include 3 functions with "()" (on patches 1 and 3, both
authored by Jiapeng, and 11 functions without it on my own patches.

I'll change those two patches to remove the "()" for consistency.

I guess I'll add a patch at the end changing the other 53 functions
to drop "()".

Regards,
Mauro
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.c b/drivers/gpu/drm/i915/gvt/mmio_context.c
index c85bafe7539e..1c6e941c9666 100644
--- a/drivers/gpu/drm/i915/gvt/mmio_context.c
+++ b/drivers/gpu/drm/i915/gvt/mmio_context.c
@@ -546,7 +546,7 @@  static void switch_mmio(struct intel_vgpu *pre,
 }
 
 /**
- * intel_gvt_switch_render_mmio - switch mmio context of specific engine
+ * intel_gvt_switch_mmio - switch mmio context of specific engine
  * @pre: the last vGPU that own the engine
  * @next: the vGPU to switch to
  * @engine: the engine