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] [day] [month] [year] [list]
Date:   Fri, 2 Dec 2016 12:05:20 -0800
From:   Dan Williams <dan.j.williams@...el.com>
To:     Fabian Frederick <fabf@...net.be>
Cc:     "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/8 linux-next] libnvdimm, namespace: avoid multiple
 sector calculations

On Fri, Dec 2, 2016 at 11:20 AM, Fabian Frederick <fabf@...net.be> wrote:
> add cleared_sectors variable to add more readability.
>
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
>  drivers/nvdimm/pmem.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> index 204912c..4da4735 100644
> --- a/drivers/nvdimm/pmem.c
> +++ b/drivers/nvdimm/pmem.c
> @@ -52,16 +52,16 @@ static int pmem_clear_poison(struct pmem_device *pmem, phys_addr_t offset,
>  {
>         struct device *dev = to_dev(pmem);
>         sector_t sector;
> -       long cleared;
> +       long cleared, cleared_sectors;
>
>         sector = (offset - pmem->data_offset) / 512;
>         cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset, len);

Let's skip adding a new 'cleared_sectors' variable and just adjust
cleared to be in terms of sectors.  Also, this patch collides with the
latest contents of libnvdimm-pending, please respin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ