public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] nvmem: Add support for write-only instances, and clean-up
@ 2020-03-02 15:41 Nicholas Johnson
  2020-03-02 15:42 ` [PATCH v2 1/3] nvmem: Add support for write-only instances Nicholas Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Nicholas Johnson @ 2020-03-02 15:41 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org
  Cc: Mika Westerberg, Srinivas Kandagatla, Nicholas Johnson

Hello all,

Previous version: https://lkml.org/lkml/2020/2/24/973

Changed since previous version:

- No longer looking to drop read_only flag in this series because of 
  reasons given by Srinivas. Fixed some areas where I was ignoring the 
  read_only flag and relying solely on presence of reg_read to determine 
  if read only.

- Changed nvmem_register() to return failure if group is NULL from 
  nvmem_sysfs_get_groups().

- Added commit to check for NULL reg_read and reg_write before 
  dereferencing

- No longer using WARN_ON() because now we can return NULL from 
  nvmem_sysfs_get_groups() if the inputs are unacceptable. Much nicer.

- No longer providing global writable entry - my bad.

Not changed since previous version despite discussion:

- Not changing read_only flag to world_writable and inverting logic - it 
  would mean that all of the drivers that do not set the flag now need 
  to set it and vice-versa. Too much verification for now. I might come 
  back to these things later, but for now, I realised my eyes should be 
  on the main goal.

- Not documented kernel-doc of struct nvmem_config. Unclear if this was 
  required because of WARN_ON() - if so, this no longer applies, as
  WARN_ON() was removed. If this is still an issue, please clarify whether 
  this means Documentation/driver-api/nvmem.rst or just the blurb in 
  include/linux/nvmem-provider.h, and what specific change needs 
  documenting.

Nicholas Johnson (3):
  nvmem: Add support for write-only instances
  nvmem: check for NULL reg_read and reg_write before dereferencing
  Revert "thunderbolt: Prevent crash if non-active NVMem file is read"

 drivers/nvmem/core.c         |  2 ++
 drivers/nvmem/nvmem-sysfs.c  | 59 +++++++++++++++++++++++++++++++-----
 drivers/thunderbolt/switch.c |  7 -----
 3 files changed, 54 insertions(+), 14 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-03-06  5:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-02 15:41 [PATCH v2 0/3] nvmem: Add support for write-only instances, and clean-up Nicholas Johnson
2020-03-02 15:42 ` [PATCH v2 1/3] nvmem: Add support for write-only instances Nicholas Johnson
2020-03-05 17:03   ` Srinivas Kandagatla
2020-03-05 18:11     ` Nicholas Johnson
2020-03-05 18:22       ` Srinivas Kandagatla
2020-03-02 15:43 ` [PATCH v2 2/3] nvmem: check for NULL reg_read and reg_write before dereferencing Nicholas Johnson
2020-03-03 10:29   ` Mika Westerberg
2020-03-04 16:03     ` Nicholas Johnson
2020-03-05 17:03   ` Srinivas Kandagatla
2020-03-02 15:43 ` [PATCH v2 3/3] Revert "thunderbolt: Prevent crash if non-active NVMem file is read" Nicholas Johnson
2020-03-03 10:33   ` Mika Westerberg
2020-03-04 16:07     ` Nicholas Johnson
2020-03-04 16:18       ` Mika Westerberg
2020-03-05 17:05         ` Srinivas Kandagatla
2020-03-06  5:34           ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox