[PATCH] drm/amdgpu: Fix identifier names to function definition arguments in atom.h

Chen, Guchun Guchun.Chen at amd.com
Mon Aug 7 08:37:04 UTC 2023


[Public]

> -----Original Message-----
> From: SHANMUGAM, SRINIVASAN <SRINIVASAN.SHANMUGAM at amd.com>
> Sent: Monday, August 7, 2023 4:27 PM
> To: Koenig, Christian <Christian.Koenig at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>; Chen, Guchun <Guchun.Chen at amd.com>;
> Pan, Xinhui <Xinhui.Pan at amd.com>
> Cc: amd-gfx at lists.freedesktop.org; SHANMUGAM, SRINIVASAN
> <SRINIVASAN.SHANMUGAM at amd.com>
> Subject: [PATCH] drm/amdgpu: Fix identifier names to function definition
> arguments in atom.h
>
> Fixes the following:
>
> WARNING: function definition argument 'struct card_info *' should also have
> an identifier name
> WARNING: function definition argument 'uint32_t' should also have an
> identifier name
> WARNING: function definition argument 'void *' should also have an
> identifier name
> WARNING: function definition argument 'struct atom_context *' should also
> have an identifier name
> WARNING: function definition argument 'int' should also have an identifier
> name
> WARNING: function definition argument 'uint32_t *' should also have an
> identifier name
> WARNING: Unnecessary space before function pointer name
> ERROR: space prohibited after that '*' (ctx:BxW)
> CHECK: Prefer kernel type 'u32' over 'uint32_t'
>
> Cc: Guchun Chen <guchun.chen at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>

Reviewed-by: Guchun Chen <guchun.chen at amd.com>

Regards,
Guchun

> ---
>  drivers/gpu/drm/amd/amdgpu/atom.h | 23 +++++++++++++----------
>  1 file changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/atom.h
> b/drivers/gpu/drm/amd/amdgpu/atom.h
> index 55bf99d5288d..c11cf18a0f18 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atom.h
> +++ b/drivers/gpu/drm/amd/amdgpu/atom.h
> @@ -117,12 +117,15 @@ struct drm_device;
>
>  struct card_info {
>       struct drm_device *dev;
> -     void (* reg_write)(struct card_info *, uint32_t, uint32_t);   /*  filled by
> driver */
> -     uint32_t (* reg_read)(struct card_info *, uint32_t);          /*  filled by
> driver */
> -     void (* mc_write)(struct card_info *, uint32_t, uint32_t);   /*  filled by
> driver */
> -     uint32_t (* mc_read)(struct card_info *, uint32_t);          /*  filled by
> driver */
> -     void (* pll_write)(struct card_info *, uint32_t, uint32_t);   /*  filled by
> driver */
> -     uint32_t (* pll_read)(struct card_info *, uint32_t);          /*  filled by
> driver */
> +     void (*reg_write)(struct card_info *info,
> +                       u32 reg, uint32_t val);   /*  filled by driver */
> +     uint32_t (*reg_read)(struct card_info *info, uint32_t reg);          /*
> filled by driver */
> +     void (*mc_write)(struct card_info *info,
> +                      u32 reg, uint32_t val);   /*  filled by driver */
> +     uint32_t (*mc_read)(struct card_info *info, uint32_t reg);          /*
> filled by driver */
> +     void (*pll_write)(struct card_info *info,
> +                       u32 reg, uint32_t val);   /*  filled by driver */
> +     uint32_t (*pll_read)(struct card_info *info, uint32_t reg);          /*
> filled by driver */
>  };
>
>  struct atom_context {
> @@ -152,10 +155,10 @@ struct atom_context {
>
>  extern int amdgpu_atom_debug;
>
> -struct atom_context *amdgpu_atom_parse(struct card_info *, void *); -int
> amdgpu_atom_execute_table(struct atom_context *, int, uint32_t *); -int
> amdgpu_atom_asic_init(struct atom_context *); -void
> amdgpu_atom_destroy(struct atom_context *);
> +struct atom_context *amdgpu_atom_parse(struct card_info *card, void
> +*bios); int amdgpu_atom_execute_table(struct atom_context *ctx, int
> +index, uint32_t *params); int amdgpu_atom_asic_init(struct atom_context
> +*ctx); void amdgpu_atom_destroy(struct atom_context *ctx);
>  bool amdgpu_atom_parse_data_header(struct atom_context *ctx, int index,
> uint16_t *size,
>                           uint8_t *frev, uint8_t *crev, uint16_t *data_start);
> bool amdgpu_atom_parse_cmd_header(struct atom_context *ctx, int index,
> --
> 2.25.1



More information about the amd-gfx mailing list