qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RISU PATCH v5 03/13] all: fix up code consitency


From: Peter Maydell
Subject: Re: [Qemu-devel] [RISU PATCH v5 03/13] all: fix up code consitency
Date: Tue, 20 Jun 2017 14:13:02 +0100

On 19 June 2017 at 11:46, Alex Bennée <address@hidden> wrote:
> This is pretty much a mechanical change where I ran:
>
>   indent -kr
>
> Across all the files and then fixed up all but a few violations of:
>
>   ../../qemu.git/scripts/checkpatch.pl -f *.c *.h > checkpatch.out
>
> Along with heavy use of M-x untabify to make everything consistent.
>
> Signed-off-by: Alex Bennée <address@hidden>


> diff --git a/risu_reginfo_arm.c b/risu_reginfo_arm.c
> index 5309f3a..8e6736b 100644
> --- a/risu_reginfo_arm.c
> +++ b/risu_reginfo_arm.c
> @@ -26,173 +26,173 @@ extern int insnsize(ucontext_t *uc);
>
>  static void reginfo_init_vfp(struct reginfo *ri, ucontext_t *uc)
>  {
> -   // Read VFP registers. These live in uc->uc_regspace, which is
> -   // a sequence of
> -   //   u32 magic
> -   //   u32 size
> -   //   data....
> -   // blocks. We have to skip through to find the one for VFP.
> -   unsigned long *rs = uc->uc_regspace;
> -
> -   for (;;)
> -   {
> -      switch (*rs++)
> -      {
> -         case 0:
> -         {
> -            /* We didn't find any VFP at all (probably a no-VFP
> -             * kernel). Zero out all the state to avoid mismatches.
> -             */
> -            int j;
> -            for (j = 0; j < 32; j++)
> -               ri->fpregs[j] = 0;
> -            ri->fpscr = 0;
> -            return;
> -         }
> -         case 0x56465001: /* VFP_MAGIC */
> -         {
> -            /* This is the one we care about. The format (after the size 
> word)
> -             * is 32 * 64 bit registers, then the 32 bit fpscr, then some 
> stuff
> -             * we don't care about.
> -             */
> -            int i;
> -            /* Skip if it's smaller than we expected (should never happen!) 
> */
> -            if (*rs < ((32*2)+1))
> +    /* Read VFP registers. These live in uc->uc_regspace, which is
> +     * a sequence of
> +     *   u32 magic
> +     *   u32 size
> +     *   data....
> +     * blocks. We have to skip through to find the one for VFP.
> +     */
> +    unsigned long *rs = uc->uc_regspace;
> +
> +    for (;;) {
> +        switch (*rs++) {
> +        case 0:
>              {
> -               rs += (*rs / 4);
> -               break;
> +                /* We didn't find any VFP at all (probably a no-VFP
> +                 * kernel). Zero out all the state to avoid mismatches.
> +                 */
> +                int j;
> +                for (j = 0; j < 32; j++) {
> +                    ri->fpregs[j] = 0;
> +                }
> +                ri->fpscr = 0;
> +                return;
>              }
> -            rs++;
> -            for (i = 0; i < 32; i++)
> +        case 0x56465001:        /* VFP_MAGIC */
>              {
> -               ri->fpregs[i] = *rs++;
> -               ri->fpregs[i] |= (uint64_t)(*rs++) << 32;
> +                /* This is the one we care about. The format (after


Something seems to have gone wrong in this file -- note the extra indent
of {} blocks after "case 0:". The others are all fine though so I'll
just fix this locally.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]