[PATCH] drm/amd: open brace '{' following struct go on the same line

sunran001@208suo.com posted 1 patch 2 years, 1 month ago
drivers/gpu/drm/amd/include/yellow_carp_offset.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
[PATCH] drm/amd: open brace '{' following struct go on the same line
Posted by sunran001@208suo.com 2 years, 1 month ago
Fix the checkpatch error as open brace '{' following struct should
go on the same line.

Signed-off-by: Ran Sun <sunran001@208suo.com>
---
  drivers/gpu/drm/amd/include/yellow_carp_offset.h | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/include/yellow_carp_offset.h 
b/drivers/gpu/drm/amd/include/yellow_carp_offset.h
index 0fea6a746611..a2c8dca2425e 100644
--- a/drivers/gpu/drm/amd/include/yellow_carp_offset.h
+++ b/drivers/gpu/drm/amd/include/yellow_carp_offset.h
@@ -7,13 +7,11 @@
  #define MAX_SEGMENT                                         6


-struct IP_BASE_INSTANCE
-{
+struct IP_BASE_INSTANCE {
      unsigned int segment[MAX_SEGMENT];
  } __maybe_unused;

-struct IP_BASE
-{
+struct IP_BASE {
      struct IP_BASE_INSTANCE instance[MAX_INSTANCE];
  } __maybe_unused;
Re: [PATCH] drm/amd: open brace '{' following struct go on the same line
Posted by Alex Deucher 2 years, 1 month ago
On Thu, Jul 20, 2023 at 9:31 PM <sunran001@208suo.com> wrote:
>
> Fix the checkpatch error as open brace '{' following struct should
> go on the same line.
>
> Signed-off-by: Ran Sun <sunran001@208suo.com>

git am didn't seem to like the patch, but I was able to apply it
cleanly manually with no fuzz.  Not sure what's up, but I've applied
it.

Alex


> ---
>   drivers/gpu/drm/amd/include/yellow_carp_offset.h | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/include/yellow_carp_offset.h
> b/drivers/gpu/drm/amd/include/yellow_carp_offset.h
> index 0fea6a746611..a2c8dca2425e 100644
> --- a/drivers/gpu/drm/amd/include/yellow_carp_offset.h
> +++ b/drivers/gpu/drm/amd/include/yellow_carp_offset.h
> @@ -7,13 +7,11 @@
>   #define MAX_SEGMENT                                         6
>
>
> -struct IP_BASE_INSTANCE
> -{
> +struct IP_BASE_INSTANCE {
>       unsigned int segment[MAX_SEGMENT];
>   } __maybe_unused;
>
> -struct IP_BASE
> -{
> +struct IP_BASE {
>       struct IP_BASE_INSTANCE instance[MAX_INSTANCE];
>   } __maybe_unused;