lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMGffE=fH0WL7Aw81_2EB7tZjnqv6Y=yfJiLNwz=ZiXau-u5Dg@mail.gmail.com>
Date:   Tue, 24 Nov 2020 07:23:38 +0100
From:   Jinpu Wang <jinpu.wang@...ud.ionos.com>
To:     Joe Perches <joe@...ches.com>
Cc:     kernel test robot <lkp@...el.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Linux SCSI Mailinglist <linux-scsi@...r.kernel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] scsi: pm8001: Fix misindentation

On Tue, Nov 24, 2020 at 5:36 AM Joe Perches <joe@...ches.com> wrote:
>
> kernel robot reported a misindentation of a goto.
>
> Fix it.
>
> At the same time, use a temporary for a repeated entry in the same block
> to reduce visual noise.
>
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Joe Perches <joe@...ches.com>
Acked-by: Jack Wang <jinpu.wang@...ud.ionos.com>
> ---
>  drivers/scsi/pm8001/pm8001_init.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
> index 38907f45c845..17b29163c13d 100644
> --- a/drivers/scsi/pm8001/pm8001_init.c
> +++ b/drivers/scsi/pm8001/pm8001_init.c
> @@ -386,17 +386,17 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
>         pm8001_ha->memoryMap.region[FORENSIC_MEM].element_size = 0x10000;
>         pm8001_ha->memoryMap.region[FORENSIC_MEM].alignment = 0x10000;
>         for (i = 0; i < pm8001_ha->max_memcnt; i++) {
> +               struct mpi_mem *region = &pm8001_ha->memoryMap.region[i];
> +
>                 if (pm8001_mem_alloc(pm8001_ha->pdev,
> -                       &pm8001_ha->memoryMap.region[i].virt_ptr,
> -                       &pm8001_ha->memoryMap.region[i].phys_addr,
> -                       &pm8001_ha->memoryMap.region[i].phys_addr_hi,
> -                       &pm8001_ha->memoryMap.region[i].phys_addr_lo,
> -                       pm8001_ha->memoryMap.region[i].total_len,
> -                       pm8001_ha->memoryMap.region[i].alignment) != 0) {
> -                       pm8001_dbg(pm8001_ha, FAIL,
> -                                  "Mem%d alloc failed\n",
> -                                  i);
> -                               goto err_out;
> +                                    &region->virt_ptr,
> +                                    &region->phys_addr,
> +                                    &region->phys_addr_hi,
> +                                    &region->phys_addr_lo,
> +                                    region->total_len,
> +                                    region->alignment) != 0) {
> +                       pm8001_dbg(pm8001_ha, FAIL, "Mem%d alloc failed\n", i);
> +                       goto err_out;
>                 }
>         }
>
> --
> 2.26.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ