Linux CXL
 help / color / mirror / Atom feed
* hw/cxl: avoid build error with lower(<=9) gcc versions
       [not found] <CGME20231014120038epcas2p388517f5719bcd6517ff83580aebe9f53@epcas2p3.samsung.com>
@ 2023-10-14 12:03 ` Jeongtae Park
  2023-10-18 16:37   ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Jeongtae Park @ 2023-10-14 12:03 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Adam Manzanares, Alison Schofield, Ayush Mishra, Dan Williams,
	Davidlohr Bueso, Fan Ni, gourry.memverge, linux-cxl, Kyungsan Kim,
	Wonjae Lee, Hojin Nam, Junhyeok Im, Jehoon Park, Youngshin Park,
	Jeongtae Park, Jeongtae Park

We are testing on the below branch[1] and getting the following build
error when using gcc-9 or gcc-7 (gcc-11 is ok).

I was reported in private to Jonathan Cameron, and he will get rid of
it soon.

This is just for your information and for keeping on list.

Thanks
/jtpark

[1]: https://gitlab.com/jic23/qemu/-/tree/cxl-2023-09-13/

Reported-by: Kyungsan Kim <ks0204.kim@samsung.com>
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
---
 hw/cxl/cxl-component-utils.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c
index c022a90774..fd15d9a61e 100644
--- a/hw/cxl/cxl-component-utils.c
+++ b/hw/cxl/cxl-component-utils.c
@@ -325,9 +325,11 @@ void cxl_component_register_init_common(uint32_t *reg_state,
     case CXL2_ROOT_PORT:
     case CXL2_UPSTREAM_PORT:
     case CXL2_DOWNSTREAM_PORT:
-        init_cap_reg(RAS, 2, 2);
-        ras_init_common(reg_state, write_msk);
-        break;
+        {
+            init_cap_reg(RAS, 2, 2);
+            ras_init_common(reg_state, write_msk);
+            break;
+        }
     default:
         break;
     }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: hw/cxl: avoid build error with lower(<=9) gcc versions
  2023-10-14 12:03 ` hw/cxl: avoid build error with lower(<=9) gcc versions Jeongtae Park
@ 2023-10-18 16:37   ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2023-10-18 16:37 UTC (permalink / raw)
  To: Jeongtae Park
  Cc: Adam Manzanares, Alison Schofield, Ayush Mishra, Dan Williams,
	Davidlohr Bueso, Fan Ni, gourry.memverge, linux-cxl, Kyungsan Kim,
	Wonjae Lee, Hojin Nam, Junhyeok Im, Jehoon Park, Youngshin Park,
	Jeongtae Park

On Sat, 14 Oct 2023 21:03:22 +0900
Jeongtae Park <jtp.park@samsung.com> wrote:

> We are testing on the below branch[1] and getting the following build
> error when using gcc-9 or gcc-7 (gcc-11 is ok).
> 
> I was reported in private to Jonathan Cameron, and he will get rid of
> it soon.
> 
> This is just for your information and for keeping on list.
> 
> Thanks
> /jtpark
> 
> [1]: https://gitlab.com/jic23/qemu/-/tree/cxl-2023-09-13/
> 
> Reported-by: Kyungsan Kim <ks0204.kim@samsung.com>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
FWIW this affects CLANG as well. I have no idea why reducing the scope 
surrounding a _Static_assert() has the affect.  If anyone has any pointers
to why that would be great.  Same thing in a build issue report from Michael.

> ---
>  hw/cxl/cxl-component-utils.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c
> index c022a90774..fd15d9a61e 100644
> --- a/hw/cxl/cxl-component-utils.c
> +++ b/hw/cxl/cxl-component-utils.c
> @@ -325,9 +325,11 @@ void cxl_component_register_init_common(uint32_t *reg_state,
>      case CXL2_ROOT_PORT:
>      case CXL2_UPSTREAM_PORT:
>      case CXL2_DOWNSTREAM_PORT:
> -        init_cap_reg(RAS, 2, 2);
> -        ras_init_common(reg_state, write_msk);
> -        break;
> +        {
> +            init_cap_reg(RAS, 2, 2);
> +            ras_init_common(reg_state, write_msk);
> +            break;
> +        }
>      default:
>          break;
>      }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-18 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20231014120038epcas2p388517f5719bcd6517ff83580aebe9f53@epcas2p3.samsung.com>
2023-10-14 12:03 ` hw/cxl: avoid build error with lower(<=9) gcc versions Jeongtae Park
2023-10-18 16:37   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox