[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200713145934.18243-1-brgl@bgdev.pl>
Date: Mon, 13 Jul 2020 16:59:31 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Michal Simek <michal.simek@...inx.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Guenter Roeck <linux@...ck-us.net>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-iio@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: [PATCH v4 0/3] devres: provide and use devm_krealloc()
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
Regular krealloc() obviously can't work with managed memory. This series
implements devm_krealloc() and adds the first users with hope that this
helper will be adopted by other drivers currently using non-managed
krealloc().
Some additional changes to the code modified by main patches are included.
v1 -> v2:
- remove leftover call to hwmon_device_unregister() from pmbus_core.c
- add a patch extending devm_kmalloc() to handle zero size case
- use WARN_ON() instead of WARN_ONCE() in devm_krealloc() when passed
a pointer to non-managed memory
- correctly handle the case when devm_krealloc() is passed a pointer to
memory in .rodata (potentially returned by devm_kstrdup_const())
- correctly handle ZERO_SIZE_PTR passed as the ptr argument in devm_krealloc()
v2 -> v3:
- drop already applied patches
- collect Acks
- add an additional user in iio
v3 -> v4:
- add the kerneldoc for devm_krealloc()
- WARN() outside of spinlock
- rename local variable
Bartosz Golaszewski (3):
devres: provide devm_krealloc()
hwmon: pmbus: use more devres helpers
iio: adc: xilinx-xadc: use devm_krealloc()
.../driver-api/driver-model/devres.rst | 1 +
drivers/base/devres.c | 67 +++++++++++++++++++
drivers/hwmon/pmbus/pmbus_core.c | 28 +++-----
drivers/iio/adc/xilinx-xadc-core.c | 16 ++---
include/linux/device.h | 2 +
5 files changed, 87 insertions(+), 27 deletions(-)
--
2.26.1
Powered by blists - more mailing lists