dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sunran001@208suo.com
To: airlied@gmail.com, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] drm/amdgpu/discovery: open brace '{' following struct go on the same line
Date: Fri, 14 Jul 2023 14:38:02 +0800	[thread overview]
Message-ID: <ac2d3cb0173cd6f40faf57a6faaa2bb7@208suo.com> (raw)
In-Reply-To: <20230714063651.13980-1-xujianghui@cdjrlc.com>

[-- Attachment #1: Type: text/plain, Size: 2919 bytes --]


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/discovery.h | 33 +++++++++----------------
  1 file changed, 11 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/amd/include/discovery.h 
b/drivers/gpu/drm/amd/include/discovery.h
index f43e29722ef7..eed394df36d5 100644
--- a/drivers/gpu/drm/amd/include/discovery.h
+++ b/drivers/gpu/drm/amd/include/discovery.h
@@ -32,8 +32,7 @@
  #define VCN_INFO_TABLE_ID               0x004E4356
  #define MALL_INFO_TABLE_ID              0x4D414C4C

-typedef enum
-{
+typedef enum {
      IP_DISCOVERY = 0,
      GC,
      HARVEST_INFO,
@@ -45,16 +44,14 @@ typedef enum

  #pragma pack(1)

-typedef struct table_info
-{
+typedef struct table_info {
      uint16_t offset;   /* Byte offset */
      uint16_t checksum; /* Byte sum of the table */
      uint16_t size;     /* Table size */
      uint16_t padding;
  } table_info;

-typedef struct binary_header
-{
+typedef struct binary_header {
      /* psp structure should go at the top of this structure */
      uint32_t binary_signature; /* 0x7, 0x14, 0x21, 0x28 */
      uint16_t version_major;
@@ -64,15 +61,13 @@ typedef struct binary_header
      table_info table_list[TOTAL_TABLES];
  } binary_header;

-typedef struct die_info
-{
+typedef struct die_info {
      uint16_t die_id;
      uint16_t die_offset; /* Points to the corresponding die_header 
structure */
  } die_info;

-typedef struct ip_discovery_header
-{
+typedef struct ip_discovery_header {
      uint32_t signature;    /* Table Signature */
      uint16_t version;      /* Table Version */
      uint16_t size;         /* Table Size */
@@ -89,8 +84,7 @@ typedef struct ip_discovery_header
      };
  } ip_discovery_header;

-typedef struct ip
-{
+typedef struct ip {
      uint16_t hw_id;           /* Hardware ID */
      uint8_t number_instance;  /* instance of the IP */
      uint8_t num_base_address; /* Number of Base Addresses */
@@ -107,8 +101,7 @@ typedef struct ip
      uint32_t base_address[]; /* variable number of Addresses */
  } ip;

-typedef struct ip_v3
-{
+typedef struct ip_v3 {
      uint16_t hw_id;                         /* Hardware ID */
      uint8_t instance_number;                /* Instance number for the 
IP */
      uint8_t num_base_address;               /* Number of base 
addresses*/
@@ -145,20 +138,16 @@ typedef struct ip_v4 {
      } __packed;
  } ip_v4;

-typedef struct die_header
-{
+typedef struct die_header {
      uint16_t die_id;
      uint16_t num_ips;
  } die_header;

-typedef struct ip_structure
-{
+typedef struct ip_structure {
      ip_discovery_header* header;
-    struct die
-    {
+    struct die {
          die_header *die_header;
-        union
-        {
+        union {
              ip *ip_list;
              ip_v3 *ip_v3_list;
              ip_v4 *ip_v4_list;

[-- Attachment #2: Type: text/html, Size: 5430 bytes --]

           reply	other threads:[~2023-07-14  6:38 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230714063651.13980-1-xujianghui@cdjrlc.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac2d3cb0173cd6f40faf57a6faaa2bb7@208suo.com \
    --to=sunran001@208suo.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox