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: <20180508131654.GD2888@lunn.ch>
Date:   Tue, 8 May 2018 15:16:54 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     linux-kernel@...r.kernel.org, andrew.smirnov@...il.com
Subject: Re: [PATCH RFC] drivers: nvmem: Export nvmem_add_cells()

On Tue, May 08, 2018 at 09:35:55AM +0100, Srinivas Kandagatla wrote:
> 
> 
> On 05/05/18 20:11, Andrew Lunn wrote:
> >Not all platforms use device tree. It is useful to be able to add
> >cells to a NVMEM device from code. Export nvmem_add_cells() so making
> >this possible.
> >
> >This required changing the parameters a bit, so that just the cells
> >and the number of cells are passed, not the whole nvmem config
> >structure.
> >
> >Signed-off-by: Andrew Lunn <andrew@...n.ch>
> 
> >---
> >
> >This is an RFC.
> >
> >I have an intel platform with an AT24 EEPROM. I want to make use of
> >nvmem, but don't have device tree to be able to specify cells. I have
> >an x86 platform driver which does:
> >
> >struct nvmem_cell_info nameplate_cells[] = {
> >        {
> >                .name = "checksum",
> >                .offset = 2,
> >                .bytes = 1,
> >        },
> >        {
> >                .name = "part_number",
> >                .offset = 11,
> >                .bytes = 11,
> >        },
> >};
> >
> >        err = nvmem_add_cells(nvmem, nameplate_cells,
> >                              ARRAY_SIZE(nameplate_cells));
> >        if (err) {
> >                dev_err(dev, "Error adding cells to nameplate nvmem device\n");
> >                return;
> >        }
> >
> >        cell = nvmem_cell_get(NULL, "checksum");
> >
> >
> >drivers/nvmem/core.c           | 15 ++++++++-------
> >  include/linux/nvmem-provider.h | 11 +++++++++++
> >  2 files changed, 19 insertions(+), 7 deletions(-)
> >
> 
> 
> Thanks Andrew for the patch,
> 
> Overall the patch looks good to me,
> I would like to see some kernel doc for this new exported function

Hi Srini

O.K. I can do that.

Will you accept the patch without a user of this API? The driver which
needs it is not yet up to mainline quality. I doubt it will be ready
for this merge window. But having this patch applied soon will remove
a dependency when i do submit it.

Thanks
	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ