2022-12-13 06:06:56

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH v2] drm/i915/hwconfig: Remove comment block

No functional modification involved.

drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c:112: warning: expecting prototype for intel_guc_hwconfig_init(). Prototype was for guc_hwconfig_init() instead.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3414
Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
Changes in v2:
-Remove the comment block.

drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
index 4781fccc2687..5559d39881ee 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
@@ -102,12 +102,6 @@ static bool has_table(struct drm_i915_private *i915)
return false;
}

-/**
- * intel_guc_hwconfig_init - Initialize the HWConfig
- *
- * Retrieve the HWConfig table from the GuC and save it locally.
- * It can then be queried on demand by other users later on.
- */
static int guc_hwconfig_init(struct intel_gt *gt)
{
struct intel_hwconfig *hwconfig = &gt->info.hwconfig;
--
2.20.1.7.g153144c


2022-12-13 14:23:21

by Rodrigo Vivi

[permalink] [raw]
Subject: Re: [PATCH v2] drm/i915/hwconfig: Remove comment block


On Tue, 2022-12-13 at 13:50 +0800, Jiapeng Chong wrote:
> No functional modification involved.
>
> drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c:112: warning:
> expecting prototype for intel_guc_hwconfig_init(). Prototype was for
> guc_hwconfig_init() instead.

Thank you for the patch and for addressing the comment.
But now the commit message is not explaining what's really going on.

Could you please improve the message saying that the function has
changed to static and we don't need doc comment in the static
functions, etc?!

Also, while doing this, please find a better commit message.
This is way to generic. Something like
drm/i915: Remove unnecessary doc from static hwconfig_init
sounds better and easier to understand from a log --oneline.

Oh, and it also looks this patch deserves a "Fixes:" tag,
pointing to the patch that created the mess. Either the original
patch if it already introduced like this, or to the patch that
transformed this function in static. git blame to find the culprit out.

With the commit msg fixed as above I will add my rv-b while merging it.

>
> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3414
> Reported-by: Abaci Robot <[email protected]>
> Signed-off-by: Jiapeng Chong <[email protected]>
> ---
> Changes in v2:
>   -Remove the comment block.
>
>  drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
> b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
> index 4781fccc2687..5559d39881ee 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
> @@ -102,12 +102,6 @@ static bool has_table(struct drm_i915_private
> *i915)
>         return false;
>  }
>  
> -/**
> - * intel_guc_hwconfig_init - Initialize the HWConfig
> - *
> - * Retrieve the HWConfig table from the GuC and save it locally.
> - * It can then be queried on demand by other users later on.
> - */
>  static int guc_hwconfig_init(struct intel_gt *gt)
>  {
>         struct intel_hwconfig *hwconfig = &gt->info.hwconfig;