From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25D43EB64DA for ; Fri, 14 Jul 2023 06:38:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D8B9F10E7C5; Fri, 14 Jul 2023 06:38:08 +0000 (UTC) Received: from mail.208.org (unknown [183.242.55.162]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE6D310E7C6 for ; Fri, 14 Jul 2023 06:38:06 +0000 (UTC) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4R2MHH369vzBR9sW for ; Fri, 14 Jul 2023 14:38:03 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-type:message-id:user-agent:references:in-reply-to :subject:to:from:date:mime-version; s=dkim; t=1689316683; x= 1691908684; bh=dBV2U+m3cL4V6sxQW7pPcNUrdDg9Y+1xV8p9CwQ1qno=; b=u Qb+fUCz+oAZ1SYDTvNn7/jff3FDmdfLZr4AT5rqN8zPWUFVqsZp3QaAlonzNjpMe aJZO4SHpjZNp6yvqQPvmW7IzJvaIcOXdTnD5W0acYBI9nZKMBiCxBfTWyy2KSMJG ItG+DIz5UCFRNYTCQ+Qz0XBfKOh0FLpH+cnvkxcvGRkP7Bd7hoNb/c8xku/VGxIv 6HZSuBvD3vdzy9mZWCW+1VRiplTJUCZ6l3FncjvagU/R6wbhwUH49PD3r3vLOTF4 r2gHg0I75WqrZwIc1w5y2EfZ4FqDQbP5cSu8FHm+88eOE8Luv2ng5sgGdRkL4uOf fsJTukJT6I3UE550tBfUw== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dkOZ8VaOtgbI for ; Fri, 14 Jul 2023 14:38:03 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4R2MHH0G9FzBJFS7; Fri, 14 Jul 2023 14:38:02 +0800 (CST) MIME-Version: 1.0 Date: Fri, 14 Jul 2023 14:38:02 +0800 From: sunran001@208suo.com To: airlied@gmail.com, daniel@ffwll.ch Subject: [PATCH] drm/amdgpu/discovery: open brace '{' following struct go on the same line In-Reply-To: <20230714063651.13980-1-xujianghui@cdjrlc.com> References: <20230714063651.13980-1-xujianghui@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: X-Sender: sunran001@208suo.com Content-Type: multipart/alternative; boundary="=_1191d5ed1971db54bdee65047febf359" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --=_1191d5ed1971db54bdee65047febf359 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Fix the checkpatch error as open brace '{' following struct should go on the same line. Signed-off-by: Ran Sun --- 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; --=_1191d5ed1971db54bdee65047febf359 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8
= Fix the checkpatch error as open brace '{' following struct should
go = on the same line.

Signed-off-by: Ran Sun <sunran001@208suo.co= m>
---
 drivers/gpu/drm/amd/include/discovery.h | 33 ++++= +++++----------------
 1 file changed, 11 insertions(+), 22 delet= ions(-)

diff --git a/drivers/gpu/drm/amd/include/discovery.h b/d= rivers/gpu/drm/amd/include/discovery.h
index f43e29722ef7..eed394df36d= 5 100644
--- a/drivers/gpu/drm/amd/include/discovery.h
+++ b/driv= ers/gpu/drm/amd/include/discovery.h
@@ -32,8 +32,7 @@
 #defi= ne VCN_INFO_TABLE_ID          =      0x004E4356
 #define MALL_INFO_TABLE= _ID             = ; 0x4D414C4C
 
-typedef enum
-{
+typedef enum= {
     IP_DISCOVERY =3D 0,
  =    GC,
     HARVEST_INFO,
@@ -45,16 +44,14 @@ typedef enum
 
 #pragma pack(1) 
-typedef struct table_info
-{
+typedef struct tabl= e_info {
     uint16_t offset;   /*= Byte offset */
     uint16_t checksum; /* By= te sum of the table */
     uint16_t size; &n= bsp;   /* Table size */
     u= int16_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, 0x= 14, 0x21, 0x28 */
     uint16_t version_major= ;
@@ -64,15 +61,13 @@ typedef struct binary_header
  &n= bsp;  table_info table_list[TOTAL_TABLES];
 } binary_he= ader;
 
-typedef struct die_info
-{
+typedef struc= t die_info {
     uint16_t die_id;
 = ;    uint16_t die_offset; /* Points to the correspondin= g die_header structure */
 } die_info;
 
 -typedef struct ip_discovery_header
-{
+typedef struct ip_disc= overy_header {
     uint32_t signature;  = ;  /* Table Signature */
     uint1= 6_t version;      /* Table Version */
 &= nbsp;   uint16_t size;       &= nbsp; /* Table Size */
@@ -89,8 +84,7 @@ typedef struct ip_discov= ery_header
     };
 } ip_discovery_= header;
 
-typedef struct ip
-{
+typedef struct ip= {
     uint16_t hw_id;    &nb= sp;      /* Hardware ID */
  &= nbsp;  uint8_t number_instance;  /* instance of the IP */     uint8_t num_base_address; /* Number of Bas= e Addresses */
@@ -107,8 +101,7 @@ typedef struct ip
  =    uint32_t base_address[]; /* variable number of Addresses = */
 } ip;
 
-typedef struct ip_v3
-{
+ty= pedef struct ip_v3 {
     uint16_t hw_id; &nb= sp;            =            /* Hardwa= re ID */
     uint8_t instance_number;  =             &nb= sp; /* Instance number for the IP */
    &nbs= p;uint8_t num_base_address;         = ;      /* Number of base addresses*/
@@ = -145,20 +138,16 @@ typedef struct ip_v4 {
    &nbs= p;} __packed;
 } ip_v4;
 
-typedef struct die_head= er
-{
+typedef struct die_header {
    &= nbsp;uint16_t die_id;
     uint16_t num_ips;<= br /> } die_header;
 
-typedef struct ip_structure
-{
+typedef struct ip_structure {
     = ip_discovery_header* header;
-    struct die
- &nb= sp;  {
+    struct die {
  &nb= sp;      die_header *die_header;
-  = ;      union
-     &= nbsp;  {
+        union {=
           &nb= sp; ip *ip_list;
        =      ip_v3 *ip_v3_list;
   &nb= sp;         ip_v4 *ip_v4_list;=
--=_1191d5ed1971db54bdee65047febf359--