Re: [PATCH v8 1/7] xen/console: do not use XENCONS_RING_IDX in console_init_ring()

Stefano Stabellini <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
On Mon, 27 Jul 2026, [email protected] wrote:
> From: Denis Mukhin <[email protected]> 
> 
> Replace XENCONS_RING_IDX with unsigned int for the console ring indices,
> as the console ring is not a Xen console (XENCONS) ring.
> 
> Suggested-by: Andrew Cooper <[email protected]>
> Signed-off-by: Denis Mukhin <[email protected]>

Reviewed-by: Stefano Stabellini <[email protected]>


> ---
> Changes since v7:
> - new patch
> ---
>  xen/drivers/char/console.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> index ea4e3ff34178..37fdda93a4c1 100644
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -463,7 +463,7 @@ static void cf_check conring_dump_keyhandler(unsigned char key)
>  void __init console_init_ring(void)
>  {
>      char *ring;
> -    XENCONS_RING_IDX done, size, n;
> +    unsigned int done, size, n;
>      unsigned int order, memflags;
>      unsigned long flags;
>  
> @@ -484,8 +484,8 @@ void __init console_init_ring(void)
>      size = conringp - conringc;
>      for ( done = 0; done < size; done += n )
>      {
> -        XENCONS_RING_IDX src = (conringc + done) & (conring_size - 1);
> -        XENCONS_RING_IDX dst = (conringc + done) & (opt_conring_size - 1);
> +        unsigned int src = (conringc + done) & (conring_size - 1);
> +        unsigned int dst = (conringc + done) & (opt_conring_size - 1);
>  
>          n = min(opt_conring_size - dst, conring_size - src);
>          n = min(size - done, n);
> -- 
> 2.54.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.