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: <CAPcyv4gvrSeSYFdM2sRYKCKF79EjNKEoxou2T6EvVAsi9_Ef3A@mail.gmail.com>
Date:	Thu, 24 Mar 2016 08:26:00 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	Johannes Thumshirn <jthumshirn@...e.de>
Cc:	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 12/13] libnvdimm, pmem, pfn: move pfn setup to the core

On Thu, Mar 24, 2016 at 7:36 AM, Johannes Thumshirn <jthumshirn@...e.de> wrote:
> On Mittwoch, 23. März 2016 18:26:24 CET Dan Williams wrote:
>> Now that pmem internals have been disentangled from pfn setup, that code
>> can move to the core.  This is in preparation for adding another user of
>> the pfn-device capabilities.
>>
>> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
[..]
>> diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
>> index f8fd379501bf..51a214ee75a7 100644
>> --- a/drivers/nvdimm/pfn_devs.c
>> +++ b/drivers/nvdimm/pfn_devs.c
[..]
>> +static int nd_pfn_init(struct nd_pfn *nd_pfn)
>> +{
>> +     struct nd_namespace_common *ndns = nd_pfn->ndns;
>> +     u32 start_pad = 0, end_trunc = 0;
>> +     resource_size_t start, size;
>> +     struct nd_namespace_io *nsio;
>> +     struct nd_region *nd_region;
>> +     struct nd_pfn_sb *pfn_sb;
>> +     unsigned long npfns;
>> +     phys_addr_t offset;
>> +     u64 checksum;
>> +     int rc;
>> +
>> +     pfn_sb = devm_kzalloc(&nd_pfn->dev, sizeof(*pfn_sb), GFP_KERNEL);
>> +     if (!pfn_sb)
>> +             return -ENOMEM;
>> +
>> +     nd_pfn->pfn_sb = pfn_sb;
>> +     rc = nd_pfn_validate(nd_pfn);
>> +     if (rc == -ENODEV)
>> +             /* no info block, do init */;
>> +     else
>> +             return rc;
>
> Why not:
> if (rc != -ENODEV)
>         return  rc;
> /* no info block, do init */

Looks good to me, will fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ