All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/22] Verbatim device names and devm_nvmem_(un)register()
@ 2018-02-28 14:40 ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Srinivas, all:

This patchset contains various small changes that I recently made to
ppNVMEM, more specifically:

 - Patches 1 and 3 are two changes I am hoping are acceptable upstream

 - Patches 4 to 15 are a follow up to patch 2

 - Patches 16 to 22 are just trivial fixups and I am more than happy
   to drop them if they seem to add more pointless churn rather then
   value.

Feedback is appreciated!

Thanks,
Andrey Smirnov

Changes since [v3]:

 - Patchset rebased on post 4.16-rc1 master from Linus

Changes since [v2]:

 - Added a patch with kerenl doc for struct nvmem_config as a
   prerequsite for patch #2

 - Documented behaviour of nvmem_register() when id is set to -1

 - Added kernel doc for devm_nvmem_(un)register()


Changes since [v1]:

 - Fixed a build break detected by kbuild test robot

 - Added a patch to unconditionally enable COMPILE_TEST for meson-efuse

 - Dropped Joachim Eastwood from CC list due to bouncing e-mail

[v3] lkml.kernel.org/r/20180103200114.23922-1-andrew.smirnov@gmail.com
[v2] lkml.kernel.org/r/20180101232310.30420-1-andrew.smirnov@gmail.com
[v1] lkml.kernel.org/r/20171227225956.14442-1-andrew.smirnov@gmail.com

Andrey Smirnov (22):
  nvmem: Document struct nvmem_config
  nvmem: core: Allow specifying device name verbatim
  nvmem: Introduce devm_nvmem_(un)register()
  nvmem: vf610-ocotp: Convert to use devm_nvmem_register()
  nvmem: imx-ocotp: Convert to use devm_nvmem_register()
  nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
  nvmem: snvs_lgpr: Convert to use devm_nvmem_register()
  nvmem: qfprom: Convert to use devm_nvmem_register()
  nvmem: rockchip-efuse: Convert to use devm_nvmem_register()
  nvmem: mtk-efuse: Convert to use devm_nvmem_register()
  nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
  nvmem: meson-efuse: Convert to use devm_nvmem_register()
  nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
  nvmem: imx-iim: Convert to use devm_nvmem_register()
  nvmem: bcm-ocotp: Convert to use devm_nvmem_register()
  nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
  nvmem: snvs_lpgpr: Convert commas to semicolons
  nvmem: rockchip-efuse: Make use of of_device_get_match_data()
  nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly
  nvmem: rockchip-efuse: Do not use "&pdev->dev" explicitly
  nvmem: imx-iim: Do not use "&pdev->dev" explicitly
  nvmem: bcm-ocotp: Do not use "&pdev->dev" explicitly

 drivers/nvmem/Kconfig          |  2 +-
 drivers/nvmem/bcm-ocotp.c      | 15 ++--------
 drivers/nvmem/core.c           | 68 ++++++++++++++++++++++++++++++++++++++++--
 drivers/nvmem/imx-iim.c        | 14 ++-------
 drivers/nvmem/imx-ocotp.c      | 12 +-------
 drivers/nvmem/lpc18xx_otp.c    | 12 +-------
 drivers/nvmem/meson-efuse.c    | 12 +-------
 drivers/nvmem/meson-mx-efuse.c | 12 +-------
 drivers/nvmem/mtk-efuse.c      | 12 +-------
 drivers/nvmem/qfprom.c         | 12 +-------
 drivers/nvmem/rockchip-efuse.c | 28 ++++++-----------
 drivers/nvmem/snvs_lpgpr.c     | 26 +++++-----------
 drivers/nvmem/uniphier-efuse.c | 12 +-------
 drivers/nvmem/vf610-ocotp.c    | 15 ++--------
 include/linux/nvmem-provider.h | 42 ++++++++++++++++++++++++++
 15 files changed, 138 insertions(+), 156 deletions(-)

-- 
2.14.3

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

* [PATCH v4 00/22] Verbatim device names and devm_nvmem_(un)register()
@ 2018-02-28 14:40 ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Srinivas, all:

This patchset contains various small changes that I recently made to
ppNVMEM, more specifically:

 - Patches 1 and 3 are two changes I am hoping are acceptable upstream

 - Patches 4 to 15 are a follow up to patch 2

 - Patches 16 to 22 are just trivial fixups and I am more than happy
   to drop them if they seem to add more pointless churn rather then
   value.

Feedback is appreciated!

Thanks,
Andrey Smirnov

Changes since [v3]:

 - Patchset rebased on post 4.16-rc1 master from Linus

Changes since [v2]:

 - Added a patch with kerenl doc for struct nvmem_config as a
   prerequsite for patch #2

 - Documented behaviour of nvmem_register() when id is set to -1

 - Added kernel doc for devm_nvmem_(un)register()


Changes since [v1]:

 - Fixed a build break detected by kbuild test robot

 - Added a patch to unconditionally enable COMPILE_TEST for meson-efuse

 - Dropped Joachim Eastwood from CC list due to bouncing e-mail

[v3] lkml.kernel.org/r/20180103200114.23922-1-andrew.smirnov at gmail.com
[v2] lkml.kernel.org/r/20180101232310.30420-1-andrew.smirnov at gmail.com
[v1] lkml.kernel.org/r/20171227225956.14442-1-andrew.smirnov at gmail.com

Andrey Smirnov (22):
  nvmem: Document struct nvmem_config
  nvmem: core: Allow specifying device name verbatim
  nvmem: Introduce devm_nvmem_(un)register()
  nvmem: vf610-ocotp: Convert to use devm_nvmem_register()
  nvmem: imx-ocotp: Convert to use devm_nvmem_register()
  nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
  nvmem: snvs_lgpr: Convert to use devm_nvmem_register()
  nvmem: qfprom: Convert to use devm_nvmem_register()
  nvmem: rockchip-efuse: Convert to use devm_nvmem_register()
  nvmem: mtk-efuse: Convert to use devm_nvmem_register()
  nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
  nvmem: meson-efuse: Convert to use devm_nvmem_register()
  nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
  nvmem: imx-iim: Convert to use devm_nvmem_register()
  nvmem: bcm-ocotp: Convert to use devm_nvmem_register()
  nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
  nvmem: snvs_lpgpr: Convert commas to semicolons
  nvmem: rockchip-efuse: Make use of of_device_get_match_data()
  nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly
  nvmem: rockchip-efuse: Do not use "&pdev->dev" explicitly
  nvmem: imx-iim: Do not use "&pdev->dev" explicitly
  nvmem: bcm-ocotp: Do not use "&pdev->dev" explicitly

 drivers/nvmem/Kconfig          |  2 +-
 drivers/nvmem/bcm-ocotp.c      | 15 ++--------
 drivers/nvmem/core.c           | 68 ++++++++++++++++++++++++++++++++++++++++--
 drivers/nvmem/imx-iim.c        | 14 ++-------
 drivers/nvmem/imx-ocotp.c      | 12 +-------
 drivers/nvmem/lpc18xx_otp.c    | 12 +-------
 drivers/nvmem/meson-efuse.c    | 12 +-------
 drivers/nvmem/meson-mx-efuse.c | 12 +-------
 drivers/nvmem/mtk-efuse.c      | 12 +-------
 drivers/nvmem/qfprom.c         | 12 +-------
 drivers/nvmem/rockchip-efuse.c | 28 ++++++-----------
 drivers/nvmem/snvs_lpgpr.c     | 26 +++++-----------
 drivers/nvmem/uniphier-efuse.c | 12 +-------
 drivers/nvmem/vf610-ocotp.c    | 15 ++--------
 include/linux/nvmem-provider.h | 42 ++++++++++++++++++++++++++
 15 files changed, 138 insertions(+), 156 deletions(-)

-- 
2.14.3

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

* [PATCH v4 00/22] Verbatim device names and devm_nvmem_(un)register()
@ 2018-02-28 14:40 ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Srinivas, all:

This patchset contains various small changes that I recently made to
ppNVMEM, more specifically:

 - Patches 1 and 3 are two changes I am hoping are acceptable upstream

 - Patches 4 to 15 are a follow up to patch 2

 - Patches 16 to 22 are just trivial fixups and I am more than happy
   to drop them if they seem to add more pointless churn rather then
   value.

Feedback is appreciated!

Thanks,
Andrey Smirnov

Changes since [v3]:

 - Patchset rebased on post 4.16-rc1 master from Linus

Changes since [v2]:

 - Added a patch with kerenl doc for struct nvmem_config as a
   prerequsite for patch #2

 - Documented behaviour of nvmem_register() when id is set to -1

 - Added kernel doc for devm_nvmem_(un)register()


Changes since [v1]:

 - Fixed a build break detected by kbuild test robot

 - Added a patch to unconditionally enable COMPILE_TEST for meson-efuse

 - Dropped Joachim Eastwood from CC list due to bouncing e-mail

[v3] lkml.kernel.org/r/20180103200114.23922-1-andrew.smirnov at gmail.com
[v2] lkml.kernel.org/r/20180101232310.30420-1-andrew.smirnov at gmail.com
[v1] lkml.kernel.org/r/20171227225956.14442-1-andrew.smirnov at gmail.com

Andrey Smirnov (22):
  nvmem: Document struct nvmem_config
  nvmem: core: Allow specifying device name verbatim
  nvmem: Introduce devm_nvmem_(un)register()
  nvmem: vf610-ocotp: Convert to use devm_nvmem_register()
  nvmem: imx-ocotp: Convert to use devm_nvmem_register()
  nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
  nvmem: snvs_lgpr: Convert to use devm_nvmem_register()
  nvmem: qfprom: Convert to use devm_nvmem_register()
  nvmem: rockchip-efuse: Convert to use devm_nvmem_register()
  nvmem: mtk-efuse: Convert to use devm_nvmem_register()
  nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
  nvmem: meson-efuse: Convert to use devm_nvmem_register()
  nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
  nvmem: imx-iim: Convert to use devm_nvmem_register()
  nvmem: bcm-ocotp: Convert to use devm_nvmem_register()
  nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
  nvmem: snvs_lpgpr: Convert commas to semicolons
  nvmem: rockchip-efuse: Make use of of_device_get_match_data()
  nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly
  nvmem: rockchip-efuse: Do not use "&pdev->dev" explicitly
  nvmem: imx-iim: Do not use "&pdev->dev" explicitly
  nvmem: bcm-ocotp: Do not use "&pdev->dev" explicitly

 drivers/nvmem/Kconfig          |  2 +-
 drivers/nvmem/bcm-ocotp.c      | 15 ++--------
 drivers/nvmem/core.c           | 68 ++++++++++++++++++++++++++++++++++++++++--
 drivers/nvmem/imx-iim.c        | 14 ++-------
 drivers/nvmem/imx-ocotp.c      | 12 +-------
 drivers/nvmem/lpc18xx_otp.c    | 12 +-------
 drivers/nvmem/meson-efuse.c    | 12 +-------
 drivers/nvmem/meson-mx-efuse.c | 12 +-------
 drivers/nvmem/mtk-efuse.c      | 12 +-------
 drivers/nvmem/qfprom.c         | 12 +-------
 drivers/nvmem/rockchip-efuse.c | 28 ++++++-----------
 drivers/nvmem/snvs_lpgpr.c     | 26 +++++-----------
 drivers/nvmem/uniphier-efuse.c | 12 +-------
 drivers/nvmem/vf610-ocotp.c    | 15 ++--------
 include/linux/nvmem-provider.h | 42 ++++++++++++++++++++++++++
 15 files changed, 138 insertions(+), 156 deletions(-)

-- 
2.14.3

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

* [PATCH v4 01/22] nvmem: Document struct nvmem_config
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Add a simple description of struct nvmem_config and its fields.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 include/linux/nvmem-provider.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 497706f5adca..27e599222ec1 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -22,6 +22,28 @@ typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset,
 typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset,
 				 void *val, size_t bytes);
 
+/**
+ * struct nvmem_config - NVMEM device configuration
+ *
+ * @dev:	Parent device.
+ * @name:	Optional name.
+ * @id:		Optional device ID used in full name. Ignored if name is NULL.
+ * @owner:	Pointer to exporter module. Used for refcounting.
+ * @cells:	Optional array of pre-defined NVMEM cells.
+ * @ncells:	Number of elements in cells.
+ * @read_only:	Device is read-only.
+ * @root_only:	Device is accessibly to root only.
+ * @reg_read:	Callback to read data.
+ * @reg_write:	Callback to write data.
+ * @size:	Device size.
+ * @word_size:	Minimum read/write access granularity.
+ * @stride:	Minimum read/write access stide.
+ * @priv:	User context passed to read/write callbacks.
+ *
+ * Note: A default "nvmem<id>" name will be assigned to the device if
+ * no name is specified in its configuration. In such case "<id>" is
+ * generated with ida_simple_get() and provided id field is ignored.
+ */
 struct nvmem_config {
 	struct device		*dev;
 	const char		*name;
-- 
2.14.3

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

* [PATCH v4 01/22] nvmem: Document struct nvmem_config
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Matthias Brugger, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Carlo Caione, cphealy-Re5JQEeQqe8AvxtiuMwx3w

Add a simple description of struct nvmem_config and its fields.

Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 include/linux/nvmem-provider.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 497706f5adca..27e599222ec1 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -22,6 +22,28 @@ typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset,
 typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset,
 				 void *val, size_t bytes);
 
+/**
+ * struct nvmem_config - NVMEM device configuration
+ *
+ * @dev:	Parent device.
+ * @name:	Optional name.
+ * @id:		Optional device ID used in full name. Ignored if name is NULL.
+ * @owner:	Pointer to exporter module. Used for refcounting.
+ * @cells:	Optional array of pre-defined NVMEM cells.
+ * @ncells:	Number of elements in cells.
+ * @read_only:	Device is read-only.
+ * @root_only:	Device is accessibly to root only.
+ * @reg_read:	Callback to read data.
+ * @reg_write:	Callback to write data.
+ * @size:	Device size.
+ * @word_size:	Minimum read/write access granularity.
+ * @stride:	Minimum read/write access stide.
+ * @priv:	User context passed to read/write callbacks.
+ *
+ * Note: A default "nvmem<id>" name will be assigned to the device if
+ * no name is specified in its configuration. In such case "<id>" is
+ * generated with ida_simple_get() and provided id field is ignored.
+ */
 struct nvmem_config {
 	struct device		*dev;
 	const char		*name;
-- 
2.14.3

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

* [PATCH v4 01/22] nvmem: Document struct nvmem_config
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Add a simple description of struct nvmem_config and its fields.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 include/linux/nvmem-provider.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 497706f5adca..27e599222ec1 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -22,6 +22,28 @@ typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset,
 typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset,
 				 void *val, size_t bytes);
 
+/**
+ * struct nvmem_config - NVMEM device configuration
+ *
+ * @dev:	Parent device.
+ * @name:	Optional name.
+ * @id:		Optional device ID used in full name. Ignored if name is NULL.
+ * @owner:	Pointer to exporter module. Used for refcounting.
+ * @cells:	Optional array of pre-defined NVMEM cells.
+ * @ncells:	Number of elements in cells.
+ * @read_only:	Device is read-only.
+ * @root_only:	Device is accessibly to root only.
+ * @reg_read:	Callback to read data.
+ * @reg_write:	Callback to write data.
+ * @size:	Device size.
+ * @word_size:	Minimum read/write access granularity.
+ * @stride:	Minimum read/write access stide.
+ * @priv:	User context passed to read/write callbacks.
+ *
+ * Note: A default "nvmem<id>" name will be assigned to the device if
+ * no name is specified in its configuration. In such case "<id>" is
+ * generated with ida_simple_get() and provided id field is ignored.
+ */
 struct nvmem_config {
 	struct device		*dev;
 	const char		*name;
-- 
2.14.3

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

* [PATCH v4 01/22] nvmem: Document struct nvmem_config
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Add a simple description of struct nvmem_config and its fields.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 include/linux/nvmem-provider.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 497706f5adca..27e599222ec1 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -22,6 +22,28 @@ typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset,
 typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset,
 				 void *val, size_t bytes);
 
+/**
+ * struct nvmem_config - NVMEM device configuration
+ *
+ * @dev:	Parent device.
+ * @name:	Optional name.
+ * @id:		Optional device ID used in full name. Ignored if name is NULL.
+ * @owner:	Pointer to exporter module. Used for refcounting.
+ * @cells:	Optional array of pre-defined NVMEM cells.
+ * @ncells:	Number of elements in cells.
+ * @read_only:	Device is read-only.
+ * @root_only:	Device is accessibly to root only.
+ * @reg_read:	Callback to read data.
+ * @reg_write:	Callback to write data.
+ * @size:	Device size.
+ * @word_size:	Minimum read/write access granularity.
+ * @stride:	Minimum read/write access stide.
+ * @priv:	User context passed to read/write callbacks.
+ *
+ * Note: A default "nvmem<id>" name will be assigned to the device if
+ * no name is specified in its configuration. In such case "<id>" is
+ * generated with ida_simple_get() and provided id field is ignored.
+ */
 struct nvmem_config {
 	struct device		*dev;
 	const char		*name;
-- 
2.14.3

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

* [PATCH v4 02/22] nvmem: core: Allow specifying device name verbatim
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Add code to allow avoid having nvmem core append a numeric suffix to
the end of the name by passing config->id of -1.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/core.c           | 11 ++++++++---
 include/linux/nvmem-provider.h |  3 +++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 35a3dbeea324..99e04cfcc723 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -473,9 +473,14 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
 	nvmem->reg_read = config->reg_read;
 	nvmem->reg_write = config->reg_write;
 	nvmem->dev.of_node = config->dev->of_node;
-	dev_set_name(&nvmem->dev, "%s%d",
-		     config->name ? : "nvmem",
-		     config->name ? config->id : nvmem->id);
+
+	if (config->id == -1 && config->name) {
+		dev_set_name(&nvmem->dev, "%s", config->name);
+	} else {
+		dev_set_name(&nvmem->dev, "%s%d",
+			     config->name ? : "nvmem",
+			     config->name ? config->id : nvmem->id);
+	}
 
 	nvmem->read_only = device_property_present(config->dev, "read-only") |
 			   config->read_only;
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 27e599222ec1..4889a6c62a81 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -43,6 +43,9 @@ typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset,
  * Note: A default "nvmem<id>" name will be assigned to the device if
  * no name is specified in its configuration. In such case "<id>" is
  * generated with ida_simple_get() and provided id field is ignored.
+ *
+ * Note: Specifying name and setting id to -1 implies a unique device
+ * whose name is provided as-is (kept unaltered).
  */
 struct nvmem_config {
 	struct device		*dev;
-- 
2.14.3

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

* [PATCH v4 02/22] nvmem: core: Allow specifying device name verbatim
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Add code to allow avoid having nvmem core append a numeric suffix to
the end of the name by passing config->id of -1.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/core.c           | 11 ++++++++---
 include/linux/nvmem-provider.h |  3 +++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 35a3dbeea324..99e04cfcc723 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -473,9 +473,14 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
 	nvmem->reg_read = config->reg_read;
 	nvmem->reg_write = config->reg_write;
 	nvmem->dev.of_node = config->dev->of_node;
-	dev_set_name(&nvmem->dev, "%s%d",
-		     config->name ? : "nvmem",
-		     config->name ? config->id : nvmem->id);
+
+	if (config->id == -1 && config->name) {
+		dev_set_name(&nvmem->dev, "%s", config->name);
+	} else {
+		dev_set_name(&nvmem->dev, "%s%d",
+			     config->name ? : "nvmem",
+			     config->name ? config->id : nvmem->id);
+	}
 
 	nvmem->read_only = device_property_present(config->dev, "read-only") |
 			   config->read_only;
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 27e599222ec1..4889a6c62a81 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -43,6 +43,9 @@ typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset,
  * Note: A default "nvmem<id>" name will be assigned to the device if
  * no name is specified in its configuration. In such case "<id>" is
  * generated with ida_simple_get() and provided id field is ignored.
+ *
+ * Note: Specifying name and setting id to -1 implies a unique device
+ * whose name is provided as-is (kept unaltered).
  */
 struct nvmem_config {
 	struct device		*dev;
-- 
2.14.3

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

* [PATCH v4 02/22] nvmem: core: Allow specifying device name verbatim
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Add code to allow avoid having nvmem core append a numeric suffix to
the end of the name by passing config->id of -1.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/core.c           | 11 ++++++++---
 include/linux/nvmem-provider.h |  3 +++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 35a3dbeea324..99e04cfcc723 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -473,9 +473,14 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
 	nvmem->reg_read = config->reg_read;
 	nvmem->reg_write = config->reg_write;
 	nvmem->dev.of_node = config->dev->of_node;
-	dev_set_name(&nvmem->dev, "%s%d",
-		     config->name ? : "nvmem",
-		     config->name ? config->id : nvmem->id);
+
+	if (config->id == -1 && config->name) {
+		dev_set_name(&nvmem->dev, "%s", config->name);
+	} else {
+		dev_set_name(&nvmem->dev, "%s%d",
+			     config->name ? : "nvmem",
+			     config->name ? config->id : nvmem->id);
+	}
 
 	nvmem->read_only = device_property_present(config->dev, "read-only") |
 			   config->read_only;
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 27e599222ec1..4889a6c62a81 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -43,6 +43,9 @@ typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset,
  * Note: A default "nvmem<id>" name will be assigned to the device if
  * no name is specified in its configuration. In such case "<id>" is
  * generated with ida_simple_get() and provided id field is ignored.
+ *
+ * Note: Specifying name and setting id to -1 implies a unique device
+ * whose name is provided as-is (kept unaltered).
  */
 struct nvmem_config {
 	struct device		*dev;
-- 
2.14.3

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

* [PATCH v4 03/22] nvmem: Introduce devm_nvmem_(un)register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Introduce devm_nvmem_register()/devm_nvmem_unregister() to make
.remove() unnecessary in trivial drivers.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/core.c           | 57 ++++++++++++++++++++++++++++++++++++++++++
 include/linux/nvmem-provider.h | 17 +++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 99e04cfcc723..4957536c9fea 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -549,6 +549,63 @@ int nvmem_unregister(struct nvmem_device *nvmem)
 }
 EXPORT_SYMBOL_GPL(nvmem_unregister);
 
+static void devm_nvmem_release(struct device *dev, void *res)
+{
+	WARN_ON(nvmem_unregister(*(struct nvmem_device **)res));
+}
+
+/**
+ * devm_nvmem_register() - Register a managed nvmem device for given nvmem_config.
+ * Also creates an binary entry in /sys/bus/nvmem/devices/dev-name/nvmem
+ *
+ * @config: nvmem device configuration with which nvmem device is created.
+ *
+ * Return: Will be an ERR_PTR() on error or a valid pointer to nvmem_device
+ * on success.
+ */
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *config)
+{
+	struct nvmem_device **ptr, *nvmem;
+
+	ptr = devres_alloc(devm_nvmem_release, sizeof(*ptr), GFP_KERNEL);
+	if (!ptr)
+		return ERR_PTR(-ENOMEM);
+
+	nvmem = nvmem_register(config);
+
+	if (!IS_ERR(nvmem)) {
+		*ptr = nvmem;
+		devres_add(dev, ptr);
+	} else {
+		devres_free(ptr);
+	}
+
+	return nvmem;
+}
+EXPORT_SYMBOL_GPL(devm_nvmem_register);
+
+static int devm_nvmem_match(struct device *dev, void *res, void *data)
+{
+	struct nvmem_device **r = res;
+
+	return *r == data;
+}
+
+/**
+ * devm_nvmem_unregister() - Unregister previously registered managed nvmem device
+ *
+ * @nvmem: Pointer to previously registered nvmem device.
+ *
+ * Return: Will be an negative on error or a zero on success.
+ */
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return devres_release(dev, devm_nvmem_release, devm_nvmem_match, nvmem);
+}
+EXPORT_SYMBOL(devm_nvmem_unregister);
+
+
 static struct nvmem_device *__nvmem_device_get(struct device_node *np,
 					       struct nvmem_cell **cellp,
 					       const char *cell_id)
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 4889a6c62a81..7f2f610c6eea 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -72,6 +72,11 @@ struct nvmem_config {
 struct nvmem_device *nvmem_register(const struct nvmem_config *cfg);
 int nvmem_unregister(struct nvmem_device *nvmem);
 
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *cfg);
+
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
+
 #else
 
 static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c)
@@ -84,5 +89,17 @@ static inline int nvmem_unregister(struct nvmem_device *nvmem)
 	return -ENOSYS;
 }
 
+static inline struct nvmem_device *
+devm_nvmem_register(struct device *dev, const struct nvmem_config *c)
+{
+	return nvmem_register(c);
+}
+
+static inline int
+devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return nvmem_unregister(nvmem);
+}
+
 #endif /* CONFIG_NVMEM */
 #endif  /* ifndef _LINUX_NVMEM_PROVIDER_H */
-- 
2.14.3

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

* [PATCH v4 03/22] nvmem: Introduce devm_nvmem_(un)register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Matthias Brugger, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Carlo Caione, cphealy-Re5JQEeQqe8AvxtiuMwx3w

Introduce devm_nvmem_register()/devm_nvmem_unregister() to make
.remove() unnecessary in trivial drivers.

Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/nvmem/core.c           | 57 ++++++++++++++++++++++++++++++++++++++++++
 include/linux/nvmem-provider.h | 17 +++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 99e04cfcc723..4957536c9fea 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -549,6 +549,63 @@ int nvmem_unregister(struct nvmem_device *nvmem)
 }
 EXPORT_SYMBOL_GPL(nvmem_unregister);
 
+static void devm_nvmem_release(struct device *dev, void *res)
+{
+	WARN_ON(nvmem_unregister(*(struct nvmem_device **)res));
+}
+
+/**
+ * devm_nvmem_register() - Register a managed nvmem device for given nvmem_config.
+ * Also creates an binary entry in /sys/bus/nvmem/devices/dev-name/nvmem
+ *
+ * @config: nvmem device configuration with which nvmem device is created.
+ *
+ * Return: Will be an ERR_PTR() on error or a valid pointer to nvmem_device
+ * on success.
+ */
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *config)
+{
+	struct nvmem_device **ptr, *nvmem;
+
+	ptr = devres_alloc(devm_nvmem_release, sizeof(*ptr), GFP_KERNEL);
+	if (!ptr)
+		return ERR_PTR(-ENOMEM);
+
+	nvmem = nvmem_register(config);
+
+	if (!IS_ERR(nvmem)) {
+		*ptr = nvmem;
+		devres_add(dev, ptr);
+	} else {
+		devres_free(ptr);
+	}
+
+	return nvmem;
+}
+EXPORT_SYMBOL_GPL(devm_nvmem_register);
+
+static int devm_nvmem_match(struct device *dev, void *res, void *data)
+{
+	struct nvmem_device **r = res;
+
+	return *r == data;
+}
+
+/**
+ * devm_nvmem_unregister() - Unregister previously registered managed nvmem device
+ *
+ * @nvmem: Pointer to previously registered nvmem device.
+ *
+ * Return: Will be an negative on error or a zero on success.
+ */
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return devres_release(dev, devm_nvmem_release, devm_nvmem_match, nvmem);
+}
+EXPORT_SYMBOL(devm_nvmem_unregister);
+
+
 static struct nvmem_device *__nvmem_device_get(struct device_node *np,
 					       struct nvmem_cell **cellp,
 					       const char *cell_id)
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 4889a6c62a81..7f2f610c6eea 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -72,6 +72,11 @@ struct nvmem_config {
 struct nvmem_device *nvmem_register(const struct nvmem_config *cfg);
 int nvmem_unregister(struct nvmem_device *nvmem);
 
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *cfg);
+
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
+
 #else
 
 static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c)
@@ -84,5 +89,17 @@ static inline int nvmem_unregister(struct nvmem_device *nvmem)
 	return -ENOSYS;
 }
 
+static inline struct nvmem_device *
+devm_nvmem_register(struct device *dev, const struct nvmem_config *c)
+{
+	return nvmem_register(c);
+}
+
+static inline int
+devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return nvmem_unregister(nvmem);
+}
+
 #endif /* CONFIG_NVMEM */
 #endif  /* ifndef _LINUX_NVMEM_PROVIDER_H */
-- 
2.14.3

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

* [PATCH v4 03/22] nvmem: Introduce devm_nvmem_(un)register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Introduce devm_nvmem_register()/devm_nvmem_unregister() to make
.remove() unnecessary in trivial drivers.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/core.c           | 57 ++++++++++++++++++++++++++++++++++++++++++
 include/linux/nvmem-provider.h | 17 +++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 99e04cfcc723..4957536c9fea 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -549,6 +549,63 @@ int nvmem_unregister(struct nvmem_device *nvmem)
 }
 EXPORT_SYMBOL_GPL(nvmem_unregister);
 
+static void devm_nvmem_release(struct device *dev, void *res)
+{
+	WARN_ON(nvmem_unregister(*(struct nvmem_device **)res));
+}
+
+/**
+ * devm_nvmem_register() - Register a managed nvmem device for given nvmem_config.
+ * Also creates an binary entry in /sys/bus/nvmem/devices/dev-name/nvmem
+ *
+ * @config: nvmem device configuration with which nvmem device is created.
+ *
+ * Return: Will be an ERR_PTR() on error or a valid pointer to nvmem_device
+ * on success.
+ */
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *config)
+{
+	struct nvmem_device **ptr, *nvmem;
+
+	ptr = devres_alloc(devm_nvmem_release, sizeof(*ptr), GFP_KERNEL);
+	if (!ptr)
+		return ERR_PTR(-ENOMEM);
+
+	nvmem = nvmem_register(config);
+
+	if (!IS_ERR(nvmem)) {
+		*ptr = nvmem;
+		devres_add(dev, ptr);
+	} else {
+		devres_free(ptr);
+	}
+
+	return nvmem;
+}
+EXPORT_SYMBOL_GPL(devm_nvmem_register);
+
+static int devm_nvmem_match(struct device *dev, void *res, void *data)
+{
+	struct nvmem_device **r = res;
+
+	return *r == data;
+}
+
+/**
+ * devm_nvmem_unregister() - Unregister previously registered managed nvmem device
+ *
+ * @nvmem: Pointer to previously registered nvmem device.
+ *
+ * Return: Will be an negative on error or a zero on success.
+ */
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return devres_release(dev, devm_nvmem_release, devm_nvmem_match, nvmem);
+}
+EXPORT_SYMBOL(devm_nvmem_unregister);
+
+
 static struct nvmem_device *__nvmem_device_get(struct device_node *np,
 					       struct nvmem_cell **cellp,
 					       const char *cell_id)
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 4889a6c62a81..7f2f610c6eea 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -72,6 +72,11 @@ struct nvmem_config {
 struct nvmem_device *nvmem_register(const struct nvmem_config *cfg);
 int nvmem_unregister(struct nvmem_device *nvmem);
 
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *cfg);
+
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
+
 #else
 
 static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c)
@@ -84,5 +89,17 @@ static inline int nvmem_unregister(struct nvmem_device *nvmem)
 	return -ENOSYS;
 }
 
+static inline struct nvmem_device *
+devm_nvmem_register(struct device *dev, const struct nvmem_config *c)
+{
+	return nvmem_register(c);
+}
+
+static inline int
+devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return nvmem_unregister(nvmem);
+}
+
 #endif /* CONFIG_NVMEM */
 #endif  /* ifndef _LINUX_NVMEM_PROVIDER_H */
-- 
2.14.3

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

* [PATCH v4 03/22] nvmem: Introduce devm_nvmem_(un)register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Introduce devm_nvmem_register()/devm_nvmem_unregister() to make
.remove() unnecessary in trivial drivers.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/core.c           | 57 ++++++++++++++++++++++++++++++++++++++++++
 include/linux/nvmem-provider.h | 17 +++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 99e04cfcc723..4957536c9fea 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -549,6 +549,63 @@ int nvmem_unregister(struct nvmem_device *nvmem)
 }
 EXPORT_SYMBOL_GPL(nvmem_unregister);
 
+static void devm_nvmem_release(struct device *dev, void *res)
+{
+	WARN_ON(nvmem_unregister(*(struct nvmem_device **)res));
+}
+
+/**
+ * devm_nvmem_register() - Register a managed nvmem device for given nvmem_config.
+ * Also creates an binary entry in /sys/bus/nvmem/devices/dev-name/nvmem
+ *
+ * @config: nvmem device configuration with which nvmem device is created.
+ *
+ * Return: Will be an ERR_PTR() on error or a valid pointer to nvmem_device
+ * on success.
+ */
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *config)
+{
+	struct nvmem_device **ptr, *nvmem;
+
+	ptr = devres_alloc(devm_nvmem_release, sizeof(*ptr), GFP_KERNEL);
+	if (!ptr)
+		return ERR_PTR(-ENOMEM);
+
+	nvmem = nvmem_register(config);
+
+	if (!IS_ERR(nvmem)) {
+		*ptr = nvmem;
+		devres_add(dev, ptr);
+	} else {
+		devres_free(ptr);
+	}
+
+	return nvmem;
+}
+EXPORT_SYMBOL_GPL(devm_nvmem_register);
+
+static int devm_nvmem_match(struct device *dev, void *res, void *data)
+{
+	struct nvmem_device **r = res;
+
+	return *r == data;
+}
+
+/**
+ * devm_nvmem_unregister() - Unregister previously registered managed nvmem device
+ *
+ * @nvmem: Pointer to previously registered nvmem device.
+ *
+ * Return: Will be an negative on error or a zero on success.
+ */
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return devres_release(dev, devm_nvmem_release, devm_nvmem_match, nvmem);
+}
+EXPORT_SYMBOL(devm_nvmem_unregister);
+
+
 static struct nvmem_device *__nvmem_device_get(struct device_node *np,
 					       struct nvmem_cell **cellp,
 					       const char *cell_id)
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 4889a6c62a81..7f2f610c6eea 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -72,6 +72,11 @@ struct nvmem_config {
 struct nvmem_device *nvmem_register(const struct nvmem_config *cfg);
 int nvmem_unregister(struct nvmem_device *nvmem);
 
+struct nvmem_device *devm_nvmem_register(struct device *dev,
+					 const struct nvmem_config *cfg);
+
+int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
+
 #else
 
 static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c)
@@ -84,5 +89,17 @@ static inline int nvmem_unregister(struct nvmem_device *nvmem)
 	return -ENOSYS;
 }
 
+static inline struct nvmem_device *
+devm_nvmem_register(struct device *dev, const struct nvmem_config *c)
+{
+	return nvmem_register(c);
+}
+
+static inline int
+devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem)
+{
+	return nvmem_unregister(nvmem);
+}
+
 #endif /* CONFIG_NVMEM */
 #endif  /* ifndef _LINUX_NVMEM_PROVIDER_H */
-- 
2.14.3

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

* [PATCH v4 04/22] nvmem: vf610-ocotp: Convert to use devm_nvmem_register()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/vf610-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/vf610-ocotp.c b/drivers/nvmem/vf610-ocotp.c
index 5ae9e002f195..752a0983e7fb 100644
--- a/drivers/nvmem/vf610-ocotp.c
+++ b/drivers/nvmem/vf610-ocotp.c
@@ -217,13 +217,6 @@ static const struct of_device_id ocotp_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ocotp_of_match);
 
-static int vf610_ocotp_remove(struct platform_device *pdev)
-{
-	struct vf610_ocotp *ocotp_dev = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(ocotp_dev->nvmem);
-}
-
 static int vf610_ocotp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -251,13 +244,11 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 	ocotp_config.priv = ocotp_dev;
 	ocotp_config.dev = dev;
 
-	ocotp_dev->nvmem = nvmem_register(&ocotp_config);
+	ocotp_dev->nvmem = devm_nvmem_register(dev, &ocotp_config);
 	if (IS_ERR(ocotp_dev->nvmem))
 		return PTR_ERR(ocotp_dev->nvmem);
 
 	ocotp_dev->dev = dev;
-	platform_set_drvdata(pdev, ocotp_dev);
-
 	ocotp_dev->timing = vf610_ocotp_calculate_timing(ocotp_dev);
 
 	return 0;
@@ -265,7 +256,6 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 
 static struct platform_driver vf610_ocotp_driver = {
 	.probe = vf610_ocotp_probe,
-	.remove = vf610_ocotp_remove,
 	.driver = {
 		.name = "vf610-ocotp",
 		.of_match_table = ocotp_of_match,
-- 
2.14.3

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

* [PATCH v4 04/22] nvmem: vf610-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/vf610-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/vf610-ocotp.c b/drivers/nvmem/vf610-ocotp.c
index 5ae9e002f195..752a0983e7fb 100644
--- a/drivers/nvmem/vf610-ocotp.c
+++ b/drivers/nvmem/vf610-ocotp.c
@@ -217,13 +217,6 @@ static const struct of_device_id ocotp_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ocotp_of_match);
 
-static int vf610_ocotp_remove(struct platform_device *pdev)
-{
-	struct vf610_ocotp *ocotp_dev = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(ocotp_dev->nvmem);
-}
-
 static int vf610_ocotp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -251,13 +244,11 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 	ocotp_config.priv = ocotp_dev;
 	ocotp_config.dev = dev;
 
-	ocotp_dev->nvmem = nvmem_register(&ocotp_config);
+	ocotp_dev->nvmem = devm_nvmem_register(dev, &ocotp_config);
 	if (IS_ERR(ocotp_dev->nvmem))
 		return PTR_ERR(ocotp_dev->nvmem);
 
 	ocotp_dev->dev = dev;
-	platform_set_drvdata(pdev, ocotp_dev);
-
 	ocotp_dev->timing = vf610_ocotp_calculate_timing(ocotp_dev);
 
 	return 0;
@@ -265,7 +256,6 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 
 static struct platform_driver vf610_ocotp_driver = {
 	.probe = vf610_ocotp_probe,
-	.remove = vf610_ocotp_remove,
 	.driver = {
 		.name = "vf610-ocotp",
 		.of_match_table = ocotp_of_match,
-- 
2.14.3

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

* [PATCH v4 04/22] nvmem: vf610-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/vf610-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/vf610-ocotp.c b/drivers/nvmem/vf610-ocotp.c
index 5ae9e002f195..752a0983e7fb 100644
--- a/drivers/nvmem/vf610-ocotp.c
+++ b/drivers/nvmem/vf610-ocotp.c
@@ -217,13 +217,6 @@ static const struct of_device_id ocotp_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ocotp_of_match);
 
-static int vf610_ocotp_remove(struct platform_device *pdev)
-{
-	struct vf610_ocotp *ocotp_dev = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(ocotp_dev->nvmem);
-}
-
 static int vf610_ocotp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -251,13 +244,11 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 	ocotp_config.priv = ocotp_dev;
 	ocotp_config.dev = dev;
 
-	ocotp_dev->nvmem = nvmem_register(&ocotp_config);
+	ocotp_dev->nvmem = devm_nvmem_register(dev, &ocotp_config);
 	if (IS_ERR(ocotp_dev->nvmem))
 		return PTR_ERR(ocotp_dev->nvmem);
 
 	ocotp_dev->dev = dev;
-	platform_set_drvdata(pdev, ocotp_dev);
-
 	ocotp_dev->timing = vf610_ocotp_calculate_timing(ocotp_dev);
 
 	return 0;
@@ -265,7 +256,6 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 
 static struct platform_driver vf610_ocotp_driver = {
 	.probe = vf610_ocotp_probe,
-	.remove = vf610_ocotp_remove,
 	.driver = {
 		.name = "vf610-ocotp",
 		.of_match_table = ocotp_of_match,
-- 
2.14.3

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

* [PATCH v4 05/22] nvmem: imx-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index d7ba351a70c9..68deffe636f3 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -466,26 +466,16 @@ static int imx_ocotp_probe(struct platform_device *pdev)
 	imx_ocotp_nvmem_config.dev = dev;
 	imx_ocotp_nvmem_config.priv = priv;
 	priv->config = &imx_ocotp_nvmem_config;
-	nvmem = nvmem_register(&imx_ocotp_nvmem_config);
+	nvmem = devm_nvmem_register(dev, &imx_ocotp_nvmem_config);
 
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int imx_ocotp_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver imx_ocotp_driver = {
 	.probe	= imx_ocotp_probe,
-	.remove	= imx_ocotp_remove,
 	.driver = {
 		.name	= "imx_ocotp",
 		.of_match_table = imx_ocotp_dt_ids,
-- 
2.14.3

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

* [PATCH v4 05/22] nvmem: imx-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Matthias Brugger, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Carlo Caione, cphealy-Re5JQEeQqe8AvxtiuMwx3w

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/nvmem/imx-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index d7ba351a70c9..68deffe636f3 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -466,26 +466,16 @@ static int imx_ocotp_probe(struct platform_device *pdev)
 	imx_ocotp_nvmem_config.dev = dev;
 	imx_ocotp_nvmem_config.priv = priv;
 	priv->config = &imx_ocotp_nvmem_config;
-	nvmem = nvmem_register(&imx_ocotp_nvmem_config);
+	nvmem = devm_nvmem_register(dev, &imx_ocotp_nvmem_config);
 
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int imx_ocotp_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver imx_ocotp_driver = {
 	.probe	= imx_ocotp_probe,
-	.remove	= imx_ocotp_remove,
 	.driver = {
 		.name	= "imx_ocotp",
 		.of_match_table = imx_ocotp_dt_ids,
-- 
2.14.3

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

* [PATCH v4 05/22] nvmem: imx-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index d7ba351a70c9..68deffe636f3 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -466,26 +466,16 @@ static int imx_ocotp_probe(struct platform_device *pdev)
 	imx_ocotp_nvmem_config.dev = dev;
 	imx_ocotp_nvmem_config.priv = priv;
 	priv->config = &imx_ocotp_nvmem_config;
-	nvmem = nvmem_register(&imx_ocotp_nvmem_config);
+	nvmem = devm_nvmem_register(dev, &imx_ocotp_nvmem_config);
 
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int imx_ocotp_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver imx_ocotp_driver = {
 	.probe	= imx_ocotp_probe,
-	.remove	= imx_ocotp_remove,
 	.driver = {
 		.name	= "imx_ocotp",
 		.of_match_table = imx_ocotp_dt_ids,
-- 
2.14.3

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

* [PATCH v4 05/22] nvmem: imx-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index d7ba351a70c9..68deffe636f3 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -466,26 +466,16 @@ static int imx_ocotp_probe(struct platform_device *pdev)
 	imx_ocotp_nvmem_config.dev = dev;
 	imx_ocotp_nvmem_config.priv = priv;
 	priv->config = &imx_ocotp_nvmem_config;
-	nvmem = nvmem_register(&imx_ocotp_nvmem_config);
+	nvmem = devm_nvmem_register(dev, &imx_ocotp_nvmem_config);
 
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int imx_ocotp_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver imx_ocotp_driver = {
 	.probe	= imx_ocotp_probe,
-	.remove	= imx_ocotp_remove,
 	.driver = {
 		.name	= "imx_ocotp",
 		.of_match_table = imx_ocotp_dt_ids,
-- 
2.14.3

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

* [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/uniphier-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/uniphier-efuse.c b/drivers/nvmem/uniphier-efuse.c
index be11880a1358..ff551574bb17 100644
--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -60,22 +60,13 @@ static int uniphier_efuse_probe(struct platform_device *pdev)
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
 	econfig.dev = dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int uniphier_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id uniphier_efuse_of_match[] = {
 	{ .compatible = "socionext,uniphier-efuse",},
 	{/* sentinel */},
@@ -84,7 +75,6 @@ MODULE_DEVICE_TABLE(of, uniphier_efuse_of_match);
 
 static struct platform_driver uniphier_efuse_driver = {
 	.probe = uniphier_efuse_probe,
-	.remove = uniphier_efuse_remove,
 	.driver = {
 		.name = "uniphier-efuse",
 		.of_match_table = uniphier_efuse_of_match,
-- 
2.14.3

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

* [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Matthias Brugger, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Carlo Caione, cphealy-Re5JQEeQqe8AvxtiuMwx3w

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/nvmem/uniphier-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/uniphier-efuse.c b/drivers/nvmem/uniphier-efuse.c
index be11880a1358..ff551574bb17 100644
--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -60,22 +60,13 @@ static int uniphier_efuse_probe(struct platform_device *pdev)
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
 	econfig.dev = dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int uniphier_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id uniphier_efuse_of_match[] = {
 	{ .compatible = "socionext,uniphier-efuse",},
 	{/* sentinel */},
@@ -84,7 +75,6 @@ MODULE_DEVICE_TABLE(of, uniphier_efuse_of_match);
 
 static struct platform_driver uniphier_efuse_driver = {
 	.probe = uniphier_efuse_probe,
-	.remove = uniphier_efuse_remove,
 	.driver = {
 		.name = "uniphier-efuse",
 		.of_match_table = uniphier_efuse_of_match,
-- 
2.14.3

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

* [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/uniphier-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/uniphier-efuse.c b/drivers/nvmem/uniphier-efuse.c
index be11880a1358..ff551574bb17 100644
--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -60,22 +60,13 @@ static int uniphier_efuse_probe(struct platform_device *pdev)
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
 	econfig.dev = dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int uniphier_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id uniphier_efuse_of_match[] = {
 	{ .compatible = "socionext,uniphier-efuse",},
 	{/* sentinel */},
@@ -84,7 +75,6 @@ MODULE_DEVICE_TABLE(of, uniphier_efuse_of_match);
 
 static struct platform_driver uniphier_efuse_driver = {
 	.probe = uniphier_efuse_probe,
-	.remove = uniphier_efuse_remove,
 	.driver = {
 		.name = "uniphier-efuse",
 		.of_match_table = uniphier_efuse_of_match,
-- 
2.14.3

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

* [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/uniphier-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/uniphier-efuse.c b/drivers/nvmem/uniphier-efuse.c
index be11880a1358..ff551574bb17 100644
--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -60,22 +60,13 @@ static int uniphier_efuse_probe(struct platform_device *pdev)
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
 	econfig.dev = dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int uniphier_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id uniphier_efuse_of_match[] = {
 	{ .compatible = "socionext,uniphier-efuse",},
 	{/* sentinel */},
@@ -84,7 +75,6 @@ MODULE_DEVICE_TABLE(of, uniphier_efuse_of_match);
 
 static struct platform_driver uniphier_efuse_driver = {
 	.probe = uniphier_efuse_probe,
-	.remove = uniphier_efuse_remove,
 	.driver = {
 		.name = "uniphier-efuse",
 		.of_match_table = uniphier_efuse_of_match,
-- 
2.14.3

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

* [PATCH v4 07/22] nvmem: snvs_lgpr: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/snvs_lpgpr.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index e5c2a4a17f03..6a2fdd09e74a 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -117,22 +117,13 @@ static int snvs_lpgpr_probe(struct platform_device *pdev)
 	cfg->reg_read  = snvs_lpgpr_read,
 	cfg->reg_write = snvs_lpgpr_write,
 
-	nvmem = nvmem_register(cfg);
+	nvmem = devm_nvmem_register(dev, cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int snvs_lpgpr_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id snvs_lpgpr_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-snvs-lpgpr", .data = &snvs_lpgpr_cfg_imx6q },
 	{ .compatible = "fsl,imx6ul-snvs-lpgpr",
@@ -143,7 +134,6 @@ MODULE_DEVICE_TABLE(of, snvs_lpgpr_dt_ids);
 
 static struct platform_driver snvs_lpgpr_driver = {
 	.probe	= snvs_lpgpr_probe,
-	.remove	= snvs_lpgpr_remove,
 	.driver = {
 		.name	= "snvs_lpgpr",
 		.of_match_table = snvs_lpgpr_dt_ids,
-- 
2.14.3

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

* [PATCH v4 07/22] nvmem: snvs_lgpr: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Matthias Brugger, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Carlo Caione, cphealy-Re5JQEeQqe8AvxtiuMwx3w

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/nvmem/snvs_lpgpr.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index e5c2a4a17f03..6a2fdd09e74a 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -117,22 +117,13 @@ static int snvs_lpgpr_probe(struct platform_device *pdev)
 	cfg->reg_read  = snvs_lpgpr_read,
 	cfg->reg_write = snvs_lpgpr_write,
 
-	nvmem = nvmem_register(cfg);
+	nvmem = devm_nvmem_register(dev, cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int snvs_lpgpr_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id snvs_lpgpr_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-snvs-lpgpr", .data = &snvs_lpgpr_cfg_imx6q },
 	{ .compatible = "fsl,imx6ul-snvs-lpgpr",
@@ -143,7 +134,6 @@ MODULE_DEVICE_TABLE(of, snvs_lpgpr_dt_ids);
 
 static struct platform_driver snvs_lpgpr_driver = {
 	.probe	= snvs_lpgpr_probe,
-	.remove	= snvs_lpgpr_remove,
 	.driver = {
 		.name	= "snvs_lpgpr",
 		.of_match_table = snvs_lpgpr_dt_ids,
-- 
2.14.3

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

* [PATCH v4 07/22] nvmem: snvs_lgpr: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/snvs_lpgpr.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index e5c2a4a17f03..6a2fdd09e74a 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -117,22 +117,13 @@ static int snvs_lpgpr_probe(struct platform_device *pdev)
 	cfg->reg_read  = snvs_lpgpr_read,
 	cfg->reg_write = snvs_lpgpr_write,
 
-	nvmem = nvmem_register(cfg);
+	nvmem = devm_nvmem_register(dev, cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int snvs_lpgpr_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id snvs_lpgpr_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-snvs-lpgpr", .data = &snvs_lpgpr_cfg_imx6q },
 	{ .compatible = "fsl,imx6ul-snvs-lpgpr",
@@ -143,7 +134,6 @@ MODULE_DEVICE_TABLE(of, snvs_lpgpr_dt_ids);
 
 static struct platform_driver snvs_lpgpr_driver = {
 	.probe	= snvs_lpgpr_probe,
-	.remove	= snvs_lpgpr_remove,
 	.driver = {
 		.name	= "snvs_lpgpr",
 		.of_match_table = snvs_lpgpr_dt_ids,
-- 
2.14.3

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

* [PATCH v4 07/22] nvmem: snvs_lgpr: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/snvs_lpgpr.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index e5c2a4a17f03..6a2fdd09e74a 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -117,22 +117,13 @@ static int snvs_lpgpr_probe(struct platform_device *pdev)
 	cfg->reg_read  = snvs_lpgpr_read,
 	cfg->reg_write = snvs_lpgpr_write,
 
-	nvmem = nvmem_register(cfg);
+	nvmem = devm_nvmem_register(dev, cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int snvs_lpgpr_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id snvs_lpgpr_dt_ids[] = {
 	{ .compatible = "fsl,imx6q-snvs-lpgpr", .data = &snvs_lpgpr_cfg_imx6q },
 	{ .compatible = "fsl,imx6ul-snvs-lpgpr",
@@ -143,7 +134,6 @@ MODULE_DEVICE_TABLE(of, snvs_lpgpr_dt_ids);
 
 static struct platform_driver snvs_lpgpr_driver = {
 	.probe	= snvs_lpgpr_probe,
-	.remove	= snvs_lpgpr_remove,
 	.driver = {
 		.name	= "snvs_lpgpr",
 		.of_match_table = snvs_lpgpr_dt_ids,
-- 
2.14.3

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

* [PATCH v4 08/22] nvmem: qfprom: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/qfprom.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index cb3b48b47d64..13bf43c84bd4 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -47,13 +47,6 @@ static int qfprom_reg_write(void *context,
 	return 0;
 }
 
-static int qfprom_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct nvmem_config econfig = {
 	.name = "qfprom",
 	.stride = 1,
@@ -82,12 +75,10 @@ static int qfprom_probe(struct platform_device *pdev)
 	econfig.dev = dev;
 	econfig.priv = priv;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
@@ -99,7 +90,6 @@ MODULE_DEVICE_TABLE(of, qfprom_of_match);
 
 static struct platform_driver qfprom_driver = {
 	.probe = qfprom_probe,
-	.remove = qfprom_remove,
 	.driver = {
 		.name = "qcom,qfprom",
 		.of_match_table = qfprom_of_match,
-- 
2.14.3

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

* [PATCH v4 08/22] nvmem: qfprom: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Matthias Brugger, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Carlo Caione, cphealy-Re5JQEeQqe8AvxtiuMwx3w

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/nvmem/qfprom.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index cb3b48b47d64..13bf43c84bd4 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -47,13 +47,6 @@ static int qfprom_reg_write(void *context,
 	return 0;
 }
 
-static int qfprom_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct nvmem_config econfig = {
 	.name = "qfprom",
 	.stride = 1,
@@ -82,12 +75,10 @@ static int qfprom_probe(struct platform_device *pdev)
 	econfig.dev = dev;
 	econfig.priv = priv;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
@@ -99,7 +90,6 @@ MODULE_DEVICE_TABLE(of, qfprom_of_match);
 
 static struct platform_driver qfprom_driver = {
 	.probe = qfprom_probe,
-	.remove = qfprom_remove,
 	.driver = {
 		.name = "qcom,qfprom",
 		.of_match_table = qfprom_of_match,
-- 
2.14.3

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

* [PATCH v4 08/22] nvmem: qfprom: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/qfprom.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index cb3b48b47d64..13bf43c84bd4 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -47,13 +47,6 @@ static int qfprom_reg_write(void *context,
 	return 0;
 }
 
-static int qfprom_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct nvmem_config econfig = {
 	.name = "qfprom",
 	.stride = 1,
@@ -82,12 +75,10 @@ static int qfprom_probe(struct platform_device *pdev)
 	econfig.dev = dev;
 	econfig.priv = priv;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
@@ -99,7 +90,6 @@ MODULE_DEVICE_TABLE(of, qfprom_of_match);
 
 static struct platform_driver qfprom_driver = {
 	.probe = qfprom_probe,
-	.remove = qfprom_remove,
 	.driver = {
 		.name = "qcom,qfprom",
 		.of_match_table = qfprom_of_match,
-- 
2.14.3

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

* [PATCH v4 08/22] nvmem: qfprom: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/qfprom.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index cb3b48b47d64..13bf43c84bd4 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -47,13 +47,6 @@ static int qfprom_reg_write(void *context,
 	return 0;
 }
 
-static int qfprom_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct nvmem_config econfig = {
 	.name = "qfprom",
 	.stride = 1,
@@ -82,12 +75,10 @@ static int qfprom_probe(struct platform_device *pdev)
 	econfig.dev = dev;
 	econfig.priv = priv;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
@@ -99,7 +90,6 @@ MODULE_DEVICE_TABLE(of, qfprom_of_match);
 
 static struct platform_driver qfprom_driver = {
 	.probe = qfprom_probe,
-	.remove = qfprom_remove,
 	.driver = {
 		.name = "qcom,qfprom",
 		.of_match_table = qfprom_of_match,
-- 
2.14.3

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

* [PATCH v4 09/22] nvmem: rockchip-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index f13a8335f364..8ebb103abe23 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -289,25 +289,15 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = match->data;
 	econfig.priv = efuse;
 	econfig.dev = efuse->dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int rockchip_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver rockchip_efuse_driver = {
 	.probe = rockchip_efuse_probe,
-	.remove = rockchip_efuse_remove,
 	.driver = {
 		.name = "rockchip-efuse",
 		.of_match_table = rockchip_efuse_match,
-- 
2.14.3

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

* [PATCH v4 09/22] nvmem: rockchip-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Matthias Brugger, linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Carlo Caione, cphealy-Re5JQEeQqe8AvxtiuMwx3w

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Cc: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: cphealy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Signed-off-by: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/nvmem/rockchip-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index f13a8335f364..8ebb103abe23 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -289,25 +289,15 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = match->data;
 	econfig.priv = efuse;
 	econfig.dev = efuse->dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int rockchip_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver rockchip_efuse_driver = {
 	.probe = rockchip_efuse_probe,
-	.remove = rockchip_efuse_remove,
 	.driver = {
 		.name = "rockchip-efuse",
 		.of_match_table = rockchip_efuse_match,
-- 
2.14.3

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

* [PATCH v4 09/22] nvmem: rockchip-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index f13a8335f364..8ebb103abe23 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -289,25 +289,15 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = match->data;
 	econfig.priv = efuse;
 	econfig.dev = efuse->dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int rockchip_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver rockchip_efuse_driver = {
 	.probe = rockchip_efuse_probe,
-	.remove = rockchip_efuse_remove,
 	.driver = {
 		.name = "rockchip-efuse",
 		.of_match_table = rockchip_efuse_match,
-- 
2.14.3

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

* [PATCH v4 09/22] nvmem: rockchip-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index f13a8335f364..8ebb103abe23 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -289,25 +289,15 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = match->data;
 	econfig.priv = efuse;
 	econfig.dev = efuse->dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int rockchip_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver rockchip_efuse_driver = {
 	.probe = rockchip_efuse_probe,
-	.remove = rockchip_efuse_remove,
 	.driver = {
 		.name = "rockchip-efuse",
 		.of_match_table = rockchip_efuse_match,
-- 
2.14.3

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

* [PATCH v4 10/22] nvmem: mtk-efuse: Convert to use devm_nvmem_register()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/mtk-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index 9ee3479cfc7b..97ab7e6a4789 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -72,22 +72,13 @@ static int mtk_efuse_probe(struct platform_device *pdev)
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
 	econfig.dev = dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int mtk_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id mtk_efuse_of_match[] = {
 	{ .compatible = "mediatek,mt8173-efuse",},
 	{ .compatible = "mediatek,efuse",},
@@ -97,7 +88,6 @@ MODULE_DEVICE_TABLE(of, mtk_efuse_of_match);
 
 static struct platform_driver mtk_efuse_driver = {
 	.probe = mtk_efuse_probe,
-	.remove = mtk_efuse_remove,
 	.driver = {
 		.name = "mediatek,efuse",
 		.of_match_table = mtk_efuse_of_match,
-- 
2.14.3

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

* [PATCH v4 10/22] nvmem: mtk-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/mtk-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index 9ee3479cfc7b..97ab7e6a4789 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -72,22 +72,13 @@ static int mtk_efuse_probe(struct platform_device *pdev)
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
 	econfig.dev = dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int mtk_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id mtk_efuse_of_match[] = {
 	{ .compatible = "mediatek,mt8173-efuse",},
 	{ .compatible = "mediatek,efuse",},
@@ -97,7 +88,6 @@ MODULE_DEVICE_TABLE(of, mtk_efuse_of_match);
 
 static struct platform_driver mtk_efuse_driver = {
 	.probe = mtk_efuse_probe,
-	.remove = mtk_efuse_remove,
 	.driver = {
 		.name = "mediatek,efuse",
 		.of_match_table = mtk_efuse_of_match,
-- 
2.14.3

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

* [PATCH v4 10/22] nvmem: mtk-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/mtk-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index 9ee3479cfc7b..97ab7e6a4789 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -72,22 +72,13 @@ static int mtk_efuse_probe(struct platform_device *pdev)
 	econfig.size = resource_size(res);
 	econfig.priv = priv;
 	econfig.dev = dev;
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int mtk_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id mtk_efuse_of_match[] = {
 	{ .compatible = "mediatek,mt8173-efuse",},
 	{ .compatible = "mediatek,efuse",},
@@ -97,7 +88,6 @@ MODULE_DEVICE_TABLE(of, mtk_efuse_of_match);
 
 static struct platform_driver mtk_efuse_driver = {
 	.probe = mtk_efuse_probe,
-	.remove = mtk_efuse_remove,
 	.driver = {
 		.name = "mediatek,efuse",
 		.of_match_table = mtk_efuse_of_match,
-- 
2.14.3

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

* [PATCH v4 11/22] nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/meson-mx-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 41d3a3c1104e..db1e8b072034 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -233,25 +233,15 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
 		return PTR_ERR(efuse->core_clk);
 	}
 
-	efuse->nvmem = nvmem_register(&efuse->config);
+	efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
 	if (IS_ERR(efuse->nvmem))
 		return PTR_ERR(efuse->nvmem);
 
-	platform_set_drvdata(pdev, efuse);
-
 	return 0;
 }
 
-static int meson_mx_efuse_remove(struct platform_device *pdev)
-{
-	struct meson_mx_efuse *efuse = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(efuse->nvmem);
-}
-
 static struct platform_driver meson_mx_efuse_driver = {
 	.probe = meson_mx_efuse_probe,
-	.remove = meson_mx_efuse_remove,
 	.driver = {
 		.name = "meson-mx-efuse",
 		.of_match_table = meson_mx_efuse_match,
-- 
2.14.3

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

* [PATCH v4 11/22] nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/meson-mx-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 41d3a3c1104e..db1e8b072034 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -233,25 +233,15 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
 		return PTR_ERR(efuse->core_clk);
 	}
 
-	efuse->nvmem = nvmem_register(&efuse->config);
+	efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
 	if (IS_ERR(efuse->nvmem))
 		return PTR_ERR(efuse->nvmem);
 
-	platform_set_drvdata(pdev, efuse);
-
 	return 0;
 }
 
-static int meson_mx_efuse_remove(struct platform_device *pdev)
-{
-	struct meson_mx_efuse *efuse = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(efuse->nvmem);
-}
-
 static struct platform_driver meson_mx_efuse_driver = {
 	.probe = meson_mx_efuse_probe,
-	.remove = meson_mx_efuse_remove,
 	.driver = {
 		.name = "meson-mx-efuse",
 		.of_match_table = meson_mx_efuse_match,
-- 
2.14.3

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

* [PATCH v4 11/22] nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/meson-mx-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 41d3a3c1104e..db1e8b072034 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -233,25 +233,15 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
 		return PTR_ERR(efuse->core_clk);
 	}
 
-	efuse->nvmem = nvmem_register(&efuse->config);
+	efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
 	if (IS_ERR(efuse->nvmem))
 		return PTR_ERR(efuse->nvmem);
 
-	platform_set_drvdata(pdev, efuse);
-
 	return 0;
 }
 
-static int meson_mx_efuse_remove(struct platform_device *pdev)
-{
-	struct meson_mx_efuse *efuse = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(efuse->nvmem);
-}
-
 static struct platform_driver meson_mx_efuse_driver = {
 	.probe = meson_mx_efuse_probe,
-	.remove = meson_mx_efuse_remove,
 	.driver = {
 		.name = "meson-mx-efuse",
 		.of_match_table = meson_mx_efuse_match,
-- 
2.14.3

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

* [PATCH v4 12/22] nvmem: meson-efuse: Convert to use devm_nvmem_register()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/meson-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
index a43c68f90937..66029fc85ba9 100644
--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -60,25 +60,15 @@ static int meson_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = meson_efuse_read;
 	econfig.size = size;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int meson_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver meson_efuse_driver = {
 	.probe = meson_efuse_probe,
-	.remove = meson_efuse_remove,
 	.driver = {
 		.name = "meson-efuse",
 		.of_match_table = meson_efuse_match,
-- 
2.14.3

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

* [PATCH v4 12/22] nvmem: meson-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/meson-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
index a43c68f90937..66029fc85ba9 100644
--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -60,25 +60,15 @@ static int meson_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = meson_efuse_read;
 	econfig.size = size;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int meson_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver meson_efuse_driver = {
 	.probe = meson_efuse_probe,
-	.remove = meson_efuse_remove,
 	.driver = {
 		.name = "meson-efuse",
 		.of_match_table = meson_efuse_match,
-- 
2.14.3

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

* [PATCH v4 12/22] nvmem: meson-efuse: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/meson-efuse.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/meson-efuse.c b/drivers/nvmem/meson-efuse.c
index a43c68f90937..66029fc85ba9 100644
--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -60,25 +60,15 @@ static int meson_efuse_probe(struct platform_device *pdev)
 	econfig.reg_read = meson_efuse_read;
 	econfig.size = size;
 
-	nvmem = nvmem_register(&econfig);
+	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int meson_efuse_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver meson_efuse_driver = {
 	.probe = meson_efuse_probe,
-	.remove = meson_efuse_remove,
 	.driver = {
 		.name = "meson-efuse",
 		.of_match_table = meson_efuse_match,
-- 
2.14.3

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

* [PATCH v4 13/22] nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/lpc18xx_otp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c
index 95268db155e9..74777bfe2dcd 100644
--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -86,22 +86,13 @@ static int lpc18xx_otp_probe(struct platform_device *pdev)
 	lpc18xx_otp_nvmem_config.dev = &pdev->dev;
 	lpc18xx_otp_nvmem_config.priv = otp;
 
-	nvmem = nvmem_register(&lpc18xx_otp_nvmem_config);
+	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int lpc18xx_otp_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {
 	{ .compatible = "nxp,lpc1850-otp" },
 	{ },
@@ -110,7 +101,6 @@ MODULE_DEVICE_TABLE(of, lpc18xx_otp_dt_ids);
 
 static struct platform_driver lpc18xx_otp_driver = {
 	.probe	= lpc18xx_otp_probe,
-	.remove	= lpc18xx_otp_remove,
 	.driver = {
 		.name	= "lpc18xx_otp",
 		.of_match_table = lpc18xx_otp_dt_ids,
-- 
2.14.3

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

* [PATCH v4 13/22] nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/lpc18xx_otp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c
index 95268db155e9..74777bfe2dcd 100644
--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -86,22 +86,13 @@ static int lpc18xx_otp_probe(struct platform_device *pdev)
 	lpc18xx_otp_nvmem_config.dev = &pdev->dev;
 	lpc18xx_otp_nvmem_config.priv = otp;
 
-	nvmem = nvmem_register(&lpc18xx_otp_nvmem_config);
+	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int lpc18xx_otp_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {
 	{ .compatible = "nxp,lpc1850-otp" },
 	{ },
@@ -110,7 +101,6 @@ MODULE_DEVICE_TABLE(of, lpc18xx_otp_dt_ids);
 
 static struct platform_driver lpc18xx_otp_driver = {
 	.probe	= lpc18xx_otp_probe,
-	.remove	= lpc18xx_otp_remove,
 	.driver = {
 		.name	= "lpc18xx_otp",
 		.of_match_table = lpc18xx_otp_dt_ids,
-- 
2.14.3

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

* [PATCH v4 13/22] nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/lpc18xx_otp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/lpc18xx_otp.c b/drivers/nvmem/lpc18xx_otp.c
index 95268db155e9..74777bfe2dcd 100644
--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -86,22 +86,13 @@ static int lpc18xx_otp_probe(struct platform_device *pdev)
 	lpc18xx_otp_nvmem_config.dev = &pdev->dev;
 	lpc18xx_otp_nvmem_config.priv = otp;
 
-	nvmem = nvmem_register(&lpc18xx_otp_nvmem_config);
+	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int lpc18xx_otp_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {
 	{ .compatible = "nxp,lpc1850-otp" },
 	{ },
@@ -110,7 +101,6 @@ MODULE_DEVICE_TABLE(of, lpc18xx_otp_dt_ids);
 
 static struct platform_driver lpc18xx_otp_driver = {
 	.probe	= lpc18xx_otp_probe,
-	.remove	= lpc18xx_otp_remove,
 	.driver = {
 		.name	= "lpc18xx_otp",
 		.of_match_table = lpc18xx_otp_dt_ids,
-- 
2.14.3

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

* [PATCH v4 14/22] nvmem: imx-iim: Convert to use devm_nvmem_register()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-iim.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index 52cfe91d9762..635561a441bd 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -138,25 +138,15 @@ static int imx_iim_probe(struct platform_device *pdev)
 	cfg.size = drvdata->nregs;
 	cfg.priv = iim;
 
-	nvmem = nvmem_register(&cfg);
+	nvmem = devm_nvmem_register(dev, &cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int imx_iim_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver imx_iim_driver = {
 	.probe	= imx_iim_probe,
-	.remove	= imx_iim_remove,
 	.driver = {
 		.name	= "imx-iim",
 		.of_match_table = imx_iim_dt_ids,
-- 
2.14.3

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

* [PATCH v4 14/22] nvmem: imx-iim: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-iim.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index 52cfe91d9762..635561a441bd 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -138,25 +138,15 @@ static int imx_iim_probe(struct platform_device *pdev)
 	cfg.size = drvdata->nregs;
 	cfg.priv = iim;
 
-	nvmem = nvmem_register(&cfg);
+	nvmem = devm_nvmem_register(dev, &cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int imx_iim_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver imx_iim_driver = {
 	.probe	= imx_iim_probe,
-	.remove	= imx_iim_remove,
 	.driver = {
 		.name	= "imx-iim",
 		.of_match_table = imx_iim_dt_ids,
-- 
2.14.3

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

* [PATCH v4 14/22] nvmem: imx-iim: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-iim.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index 52cfe91d9762..635561a441bd 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -138,25 +138,15 @@ static int imx_iim_probe(struct platform_device *pdev)
 	cfg.size = drvdata->nregs;
 	cfg.priv = iim;
 
-	nvmem = nvmem_register(&cfg);
+	nvmem = devm_nvmem_register(dev, &cfg);
 	if (IS_ERR(nvmem))
 		return PTR_ERR(nvmem);
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int imx_iim_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver imx_iim_driver = {
 	.probe	= imx_iim_probe,
-	.remove	= imx_iim_remove,
 	.driver = {
 		.name	= "imx-iim",
 		.of_match_table = imx_iim_dt_ids,
-- 
2.14.3

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

* [PATCH v4 15/22] nvmem: bcm-ocotp: Convert to use devm_nvmem_register()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:40   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/bcm-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c
index 5e9e324427f9..24c30fa475cc 100644
--- a/drivers/nvmem/bcm-ocotp.c
+++ b/drivers/nvmem/bcm-ocotp.c
@@ -302,27 +302,17 @@ static int bcm_otpc_probe(struct platform_device *pdev)
 
 	priv->config = &bcm_otpc_nvmem_config;
 
-	nvmem = nvmem_register(&bcm_otpc_nvmem_config);
+	nvmem = devm_nvmem_register(dev, &bcm_otpc_nvmem_config);
 	if (IS_ERR(nvmem)) {
 		dev_err(dev, "error registering nvmem config\n");
 		return PTR_ERR(nvmem);
 	}
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int bcm_otpc_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver bcm_otpc_driver = {
 	.probe	= bcm_otpc_probe,
-	.remove	= bcm_otpc_remove,
 	.driver = {
 		.name	= "brcm-otpc",
 		.of_match_table = bcm_otpc_dt_ids,
-- 
2.14.3

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

* [PATCH v4 15/22] nvmem: bcm-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linux-arm-kernel

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/bcm-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c
index 5e9e324427f9..24c30fa475cc 100644
--- a/drivers/nvmem/bcm-ocotp.c
+++ b/drivers/nvmem/bcm-ocotp.c
@@ -302,27 +302,17 @@ static int bcm_otpc_probe(struct platform_device *pdev)
 
 	priv->config = &bcm_otpc_nvmem_config;
 
-	nvmem = nvmem_register(&bcm_otpc_nvmem_config);
+	nvmem = devm_nvmem_register(dev, &bcm_otpc_nvmem_config);
 	if (IS_ERR(nvmem)) {
 		dev_err(dev, "error registering nvmem config\n");
 		return PTR_ERR(nvmem);
 	}
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int bcm_otpc_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver bcm_otpc_driver = {
 	.probe	= bcm_otpc_probe,
-	.remove	= bcm_otpc_remove,
 	.driver = {
 		.name	= "brcm-otpc",
 		.of_match_table = bcm_otpc_dt_ids,
-- 
2.14.3

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

* [PATCH v4 15/22] nvmem: bcm-ocotp: Convert to use devm_nvmem_register()
@ 2018-02-28 14:40   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:40 UTC (permalink / raw)
  To: linus-amlogic

Drop all of the code related to .remove hook and make use of
devm_nvmem_register() instead.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/bcm-ocotp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c
index 5e9e324427f9..24c30fa475cc 100644
--- a/drivers/nvmem/bcm-ocotp.c
+++ b/drivers/nvmem/bcm-ocotp.c
@@ -302,27 +302,17 @@ static int bcm_otpc_probe(struct platform_device *pdev)
 
 	priv->config = &bcm_otpc_nvmem_config;
 
-	nvmem = nvmem_register(&bcm_otpc_nvmem_config);
+	nvmem = devm_nvmem_register(dev, &bcm_otpc_nvmem_config);
 	if (IS_ERR(nvmem)) {
 		dev_err(dev, "error registering nvmem config\n");
 		return PTR_ERR(nvmem);
 	}
 
-	platform_set_drvdata(pdev, nvmem);
-
 	return 0;
 }
 
-static int bcm_otpc_remove(struct platform_device *pdev)
-{
-	struct nvmem_device *nvmem = platform_get_drvdata(pdev);
-
-	return nvmem_unregister(nvmem);
-}
-
 static struct platform_driver bcm_otpc_driver = {
 	.probe	= bcm_otpc_probe,
-	.remove	= bcm_otpc_remove,
 	.driver = {
 		.name	= "brcm-otpc",
 		.of_match_table = bcm_otpc_dt_ids,
-- 
2.14.3

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

* [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:41   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Being able to build this driver when COMPILE_TEST is selected is still
useful even when MESON_SM is not selected, since selecting this
driver as a module and doing "make modules" will result in successful
build and would detect trivial coding errors. For an example of type
of errors that could be prevented see [1] and [2]

[1] lkml.kernel.org/r/20171227225956.14442-12-andrew.smirnov@gmail.com
[2] https://marc.info/?l=linux-arm-kernel&m=151461599104358&w=2

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index ff505af064ba..42e84e1b2a26 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -147,7 +147,7 @@ config NVMEM_VF610_OCOTP
 
 config MESON_EFUSE
 	tristate "Amlogic Meson GX eFuse Support"
-	depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
+	depends on (ARCH_MESON && MESON_SM) || COMPILE_TEST
 	help
 	  This is a driver to retrieve specific values from the eFuse found on
 	  the Amlogic Meson GX SoCs.
-- 
2.14.3

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

* [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

Being able to build this driver when COMPILE_TEST is selected is still
useful even when MESON_SM is not selected, since selecting this
driver as a module and doing "make modules" will result in successful
build and would detect trivial coding errors. For an example of type
of errors that could be prevented see [1] and [2]

[1] lkml.kernel.org/r/20171227225956.14442-12-andrew.smirnov at gmail.com
[2] https://marc.info/?l=linux-arm-kernel&m=151461599104358&w=2

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index ff505af064ba..42e84e1b2a26 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -147,7 +147,7 @@ config NVMEM_VF610_OCOTP
 
 config MESON_EFUSE
 	tristate "Amlogic Meson GX eFuse Support"
-	depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
+	depends on (ARCH_MESON && MESON_SM) || COMPILE_TEST
 	help
 	  This is a driver to retrieve specific values from the eFuse found on
 	  the Amlogic Meson GX SoCs.
-- 
2.14.3

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

* [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linus-amlogic

Being able to build this driver when COMPILE_TEST is selected is still
useful even when MESON_SM is not selected, since selecting this
driver as a module and doing "make modules" will result in successful
build and would detect trivial coding errors. For an example of type
of errors that could be prevented see [1] and [2]

[1] lkml.kernel.org/r/20171227225956.14442-12-andrew.smirnov at gmail.com
[2] https://marc.info/?l=linux-arm-kernel&m=151461599104358&w=2

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index ff505af064ba..42e84e1b2a26 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -147,7 +147,7 @@ config NVMEM_VF610_OCOTP
 
 config MESON_EFUSE
 	tristate "Amlogic Meson GX eFuse Support"
-	depends on (ARCH_MESON || COMPILE_TEST) && MESON_SM
+	depends on (ARCH_MESON && MESON_SM) || COMPILE_TEST
 	help
 	  This is a driver to retrieve specific values from the eFuse found on
 	  the Amlogic Meson GX SoCs.
-- 
2.14.3

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

* [PATCH v4 17/22] nvmem: snvs_lpgpr: Convert commas to semicolons
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:41   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Looks like commas were accidentally used where semicolons were
supposed to be. Fix that.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/snvs_lpgpr.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index 6a2fdd09e74a..90aaf818563b 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -110,12 +110,12 @@ static int snvs_lpgpr_probe(struct platform_device *pdev)
 	cfg->priv = priv;
 	cfg->name = dev_name(dev);
 	cfg->dev = dev;
-	cfg->stride = 4,
-	cfg->word_size = 4,
-	cfg->size = 4,
-	cfg->owner = THIS_MODULE,
-	cfg->reg_read  = snvs_lpgpr_read,
-	cfg->reg_write = snvs_lpgpr_write,
+	cfg->stride = 4;
+	cfg->word_size = 4;
+	cfg->size = 4;
+	cfg->owner = THIS_MODULE;
+	cfg->reg_read  = snvs_lpgpr_read;
+	cfg->reg_write = snvs_lpgpr_write;
 
 	nvmem = devm_nvmem_register(dev, cfg);
 	if (IS_ERR(nvmem))
-- 
2.14.3

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

* [PATCH v4 17/22] nvmem: snvs_lpgpr: Convert commas to semicolons
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

Looks like commas were accidentally used where semicolons were
supposed to be. Fix that.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/snvs_lpgpr.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index 6a2fdd09e74a..90aaf818563b 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -110,12 +110,12 @@ static int snvs_lpgpr_probe(struct platform_device *pdev)
 	cfg->priv = priv;
 	cfg->name = dev_name(dev);
 	cfg->dev = dev;
-	cfg->stride = 4,
-	cfg->word_size = 4,
-	cfg->size = 4,
-	cfg->owner = THIS_MODULE,
-	cfg->reg_read  = snvs_lpgpr_read,
-	cfg->reg_write = snvs_lpgpr_write,
+	cfg->stride = 4;
+	cfg->word_size = 4;
+	cfg->size = 4;
+	cfg->owner = THIS_MODULE;
+	cfg->reg_read  = snvs_lpgpr_read;
+	cfg->reg_write = snvs_lpgpr_write;
 
 	nvmem = devm_nvmem_register(dev, cfg);
 	if (IS_ERR(nvmem))
-- 
2.14.3

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

* [PATCH v4 17/22] nvmem: snvs_lpgpr: Convert commas to semicolons
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linus-amlogic

Looks like commas were accidentally used where semicolons were
supposed to be. Fix that.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/snvs_lpgpr.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/nvmem/snvs_lpgpr.c b/drivers/nvmem/snvs_lpgpr.c
index 6a2fdd09e74a..90aaf818563b 100644
--- a/drivers/nvmem/snvs_lpgpr.c
+++ b/drivers/nvmem/snvs_lpgpr.c
@@ -110,12 +110,12 @@ static int snvs_lpgpr_probe(struct platform_device *pdev)
 	cfg->priv = priv;
 	cfg->name = dev_name(dev);
 	cfg->dev = dev;
-	cfg->stride = 4,
-	cfg->word_size = 4,
-	cfg->size = 4,
-	cfg->owner = THIS_MODULE,
-	cfg->reg_read  = snvs_lpgpr_read,
-	cfg->reg_write = snvs_lpgpr_write,
+	cfg->stride = 4;
+	cfg->word_size = 4;
+	cfg->size = 4;
+	cfg->owner = THIS_MODULE;
+	cfg->reg_read  = snvs_lpgpr_read;
+	cfg->reg_write = snvs_lpgpr_write;
 
 	nvmem = devm_nvmem_register(dev, cfg);
 	if (IS_ERR(nvmem))
-- 
2.14.3

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

* [PATCH v4 18/22] nvmem: rockchip-efuse: Make use of of_device_get_match_data()
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:41   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

Simplify code a bit by using of_device_get_match_data() instead of
of_match_device().

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index 8ebb103abe23..ca686f8f5166 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -259,11 +259,11 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct nvmem_device *nvmem;
 	struct rockchip_efuse_chip *efuse;
-	const struct of_device_id *match;
+	const void *data;
 	struct device *dev = &pdev->dev;
 
-	match = of_match_device(dev->driver->of_match_table, dev);
-	if (!match || !match->data) {
+	data = of_device_get_match_data(dev);
+	if (!data) {
 		dev_err(dev, "failed to get match data\n");
 		return -EINVAL;
 	}
@@ -286,7 +286,7 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	if (of_property_read_u32(dev->of_node, "rockchip,efuse-size",
 				 &econfig.size))
 		econfig.size = resource_size(res);
-	econfig.reg_read = match->data;
+	econfig.reg_read = data;
 	econfig.priv = efuse;
 	econfig.dev = efuse->dev;
 	nvmem = devm_nvmem_register(dev, &econfig);
-- 
2.14.3

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

* [PATCH v4 18/22] nvmem: rockchip-efuse: Make use of of_device_get_match_data()
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

Simplify code a bit by using of_device_get_match_data() instead of
of_match_device().

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index 8ebb103abe23..ca686f8f5166 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -259,11 +259,11 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct nvmem_device *nvmem;
 	struct rockchip_efuse_chip *efuse;
-	const struct of_device_id *match;
+	const void *data;
 	struct device *dev = &pdev->dev;
 
-	match = of_match_device(dev->driver->of_match_table, dev);
-	if (!match || !match->data) {
+	data = of_device_get_match_data(dev);
+	if (!data) {
 		dev_err(dev, "failed to get match data\n");
 		return -EINVAL;
 	}
@@ -286,7 +286,7 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	if (of_property_read_u32(dev->of_node, "rockchip,efuse-size",
 				 &econfig.size))
 		econfig.size = resource_size(res);
-	econfig.reg_read = match->data;
+	econfig.reg_read = data;
 	econfig.priv = efuse;
 	econfig.dev = efuse->dev;
 	nvmem = devm_nvmem_register(dev, &econfig);
-- 
2.14.3

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

* [PATCH v4 18/22] nvmem: rockchip-efuse: Make use of of_device_get_match_data()
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linus-amlogic

Simplify code a bit by using of_device_get_match_data() instead of
of_match_device().

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index 8ebb103abe23..ca686f8f5166 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -259,11 +259,11 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct nvmem_device *nvmem;
 	struct rockchip_efuse_chip *efuse;
-	const struct of_device_id *match;
+	const void *data;
 	struct device *dev = &pdev->dev;
 
-	match = of_match_device(dev->driver->of_match_table, dev);
-	if (!match || !match->data) {
+	data = of_device_get_match_data(dev);
+	if (!data) {
 		dev_err(dev, "failed to get match data\n");
 		return -EINVAL;
 	}
@@ -286,7 +286,7 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 	if (of_property_read_u32(dev->of_node, "rockchip,efuse-size",
 				 &econfig.size))
 		econfig.size = resource_size(res);
-	econfig.reg_read = match->data;
+	econfig.reg_read = data;
 	econfig.priv = efuse;
 	econfig.dev = efuse->dev;
 	nvmem = devm_nvmem_register(dev, &econfig);
-- 
2.14.3

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

* [PATCH v4 19/22] nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:41   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

There already a "dev" variable for that. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/vf610-ocotp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvmem/vf610-ocotp.c b/drivers/nvmem/vf610-ocotp.c
index 752a0983e7fb..6e6bf7987d9d 100644
--- a/drivers/nvmem/vf610-ocotp.c
+++ b/drivers/nvmem/vf610-ocotp.c
@@ -223,8 +223,7 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct vf610_ocotp *ocotp_dev;
 
-	ocotp_dev = devm_kzalloc(&pdev->dev,
-			sizeof(struct vf610_ocotp), GFP_KERNEL);
+	ocotp_dev = devm_kzalloc(dev, sizeof(struct vf610_ocotp), GFP_KERNEL);
 	if (!ocotp_dev)
 		return -ENOMEM;
 
-- 
2.14.3

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

* [PATCH v4 19/22] nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

There already a "dev" variable for that. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/vf610-ocotp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvmem/vf610-ocotp.c b/drivers/nvmem/vf610-ocotp.c
index 752a0983e7fb..6e6bf7987d9d 100644
--- a/drivers/nvmem/vf610-ocotp.c
+++ b/drivers/nvmem/vf610-ocotp.c
@@ -223,8 +223,7 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct vf610_ocotp *ocotp_dev;
 
-	ocotp_dev = devm_kzalloc(&pdev->dev,
-			sizeof(struct vf610_ocotp), GFP_KERNEL);
+	ocotp_dev = devm_kzalloc(dev, sizeof(struct vf610_ocotp), GFP_KERNEL);
 	if (!ocotp_dev)
 		return -ENOMEM;
 
-- 
2.14.3

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

* [PATCH v4 19/22] nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linus-amlogic

There already a "dev" variable for that. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/vf610-ocotp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvmem/vf610-ocotp.c b/drivers/nvmem/vf610-ocotp.c
index 752a0983e7fb..6e6bf7987d9d 100644
--- a/drivers/nvmem/vf610-ocotp.c
+++ b/drivers/nvmem/vf610-ocotp.c
@@ -223,8 +223,7 @@ static int vf610_ocotp_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct vf610_ocotp *ocotp_dev;
 
-	ocotp_dev = devm_kzalloc(&pdev->dev,
-			sizeof(struct vf610_ocotp), GFP_KERNEL);
+	ocotp_dev = devm_kzalloc(dev, sizeof(struct vf610_ocotp), GFP_KERNEL);
 	if (!ocotp_dev)
 		return -ENOMEM;
 
-- 
2.14.3

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

* [PATCH v4 20/22] nvmem: rockchip-efuse: Do not use "&pdev->dev" explicitly
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:41   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

There's "dev" variable for this already. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index ca686f8f5166..593d9b0b5506 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -268,21 +268,21 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	efuse = devm_kzalloc(&pdev->dev, sizeof(struct rockchip_efuse_chip),
+	efuse = devm_kzalloc(dev, sizeof(struct rockchip_efuse_chip),
 			     GFP_KERNEL);
 	if (!efuse)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	efuse->base = devm_ioremap_resource(&pdev->dev, res);
+	efuse->base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(efuse->base))
 		return PTR_ERR(efuse->base);
 
-	efuse->clk = devm_clk_get(&pdev->dev, "pclk_efuse");
+	efuse->clk = devm_clk_get(dev, "pclk_efuse");
 	if (IS_ERR(efuse->clk))
 		return PTR_ERR(efuse->clk);
 
-	efuse->dev = &pdev->dev;
+	efuse->dev = dev;
 	if (of_property_read_u32(dev->of_node, "rockchip,efuse-size",
 				 &econfig.size))
 		econfig.size = resource_size(res);
-- 
2.14.3

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

* [PATCH v4 20/22] nvmem: rockchip-efuse: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

There's "dev" variable for this already. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index ca686f8f5166..593d9b0b5506 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -268,21 +268,21 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	efuse = devm_kzalloc(&pdev->dev, sizeof(struct rockchip_efuse_chip),
+	efuse = devm_kzalloc(dev, sizeof(struct rockchip_efuse_chip),
 			     GFP_KERNEL);
 	if (!efuse)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	efuse->base = devm_ioremap_resource(&pdev->dev, res);
+	efuse->base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(efuse->base))
 		return PTR_ERR(efuse->base);
 
-	efuse->clk = devm_clk_get(&pdev->dev, "pclk_efuse");
+	efuse->clk = devm_clk_get(dev, "pclk_efuse");
 	if (IS_ERR(efuse->clk))
 		return PTR_ERR(efuse->clk);
 
-	efuse->dev = &pdev->dev;
+	efuse->dev = dev;
 	if (of_property_read_u32(dev->of_node, "rockchip,efuse-size",
 				 &econfig.size))
 		econfig.size = resource_size(res);
-- 
2.14.3

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

* [PATCH v4 20/22] nvmem: rockchip-efuse: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linus-amlogic

There's "dev" variable for this already. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/rockchip-efuse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
index ca686f8f5166..593d9b0b5506 100644
--- a/drivers/nvmem/rockchip-efuse.c
+++ b/drivers/nvmem/rockchip-efuse.c
@@ -268,21 +268,21 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	efuse = devm_kzalloc(&pdev->dev, sizeof(struct rockchip_efuse_chip),
+	efuse = devm_kzalloc(dev, sizeof(struct rockchip_efuse_chip),
 			     GFP_KERNEL);
 	if (!efuse)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	efuse->base = devm_ioremap_resource(&pdev->dev, res);
+	efuse->base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(efuse->base))
 		return PTR_ERR(efuse->base);
 
-	efuse->clk = devm_clk_get(&pdev->dev, "pclk_efuse");
+	efuse->clk = devm_clk_get(dev, "pclk_efuse");
 	if (IS_ERR(efuse->clk))
 		return PTR_ERR(efuse->clk);
 
-	efuse->dev = &pdev->dev;
+	efuse->dev = dev;
 	if (of_property_read_u32(dev->of_node, "rockchip,efuse-size",
 				 &econfig.size))
 		econfig.size = resource_size(res);
-- 
2.14.3

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

* [PATCH v4 21/22] nvmem: imx-iim: Do not use "&pdev->dev" explicitly
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:41   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

There's already "dev" variable for that. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-iim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index 635561a441bd..3022bd96bd7e 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -125,7 +125,7 @@ static int imx_iim_probe(struct platform_device *pdev)
 
 	drvdata = of_id->data;
 
-	iim->clk = devm_clk_get(&pdev->dev, NULL);
+	iim->clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(iim->clk))
 		return PTR_ERR(iim->clk);
 
-- 
2.14.3

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

* [PATCH v4 21/22] nvmem: imx-iim: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

There's already "dev" variable for that. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-iim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index 635561a441bd..3022bd96bd7e 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -125,7 +125,7 @@ static int imx_iim_probe(struct platform_device *pdev)
 
 	drvdata = of_id->data;
 
-	iim->clk = devm_clk_get(&pdev->dev, NULL);
+	iim->clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(iim->clk))
 		return PTR_ERR(iim->clk);
 
-- 
2.14.3

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

* [PATCH v4 21/22] nvmem: imx-iim: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linus-amlogic

There's already "dev" variable for that. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/imx-iim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/imx-iim.c b/drivers/nvmem/imx-iim.c
index 635561a441bd..3022bd96bd7e 100644
--- a/drivers/nvmem/imx-iim.c
+++ b/drivers/nvmem/imx-iim.c
@@ -125,7 +125,7 @@ static int imx_iim_probe(struct platform_device *pdev)
 
 	drvdata = of_id->data;
 
-	iim->clk = devm_clk_get(&pdev->dev, NULL);
+	iim->clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(iim->clk))
 		return PTR_ERR(iim->clk);
 
-- 
2.14.3

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

* [PATCH v4 22/22] nvmem: bcm-ocotp: Do not use "&pdev->dev" explicitly
  2018-02-28 14:40 ` Andrey Smirnov
  (?)
@ 2018-02-28 14:41   ` Andrey Smirnov
  -1 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Andrey Smirnov, Heiko Stuebner, Masahiro Yamada, Carlo Caione,
	Kevin Hilman, Matthias Brugger, cphealy, linux-kernel,
	linux-mediatek, linux-rockchip, linux-amlogic, linux-arm-kernel

There's "dev" variable for this already. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy@gmail.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/bcm-ocotp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c
index 24c30fa475cc..4159b3f41d79 100644
--- a/drivers/nvmem/bcm-ocotp.c
+++ b/drivers/nvmem/bcm-ocotp.c
@@ -262,8 +262,7 @@ static int bcm_otpc_probe(struct platform_device *pdev)
 	else if (of_device_is_compatible(dev->of_node, "brcm,ocotp-v2"))
 		priv->map = &otp_map_v2;
 	else {
-		dev_err(&pdev->dev,
-			"%s otpc config map not defined\n", __func__);
+		dev_err(dev, "%s otpc config map not defined\n", __func__);
 		return -EINVAL;
 	}
 
-- 
2.14.3

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

* [PATCH v4 22/22] nvmem: bcm-ocotp: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linux-arm-kernel

There's "dev" variable for this already. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/bcm-ocotp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c
index 24c30fa475cc..4159b3f41d79 100644
--- a/drivers/nvmem/bcm-ocotp.c
+++ b/drivers/nvmem/bcm-ocotp.c
@@ -262,8 +262,7 @@ static int bcm_otpc_probe(struct platform_device *pdev)
 	else if (of_device_is_compatible(dev->of_node, "brcm,ocotp-v2"))
 		priv->map = &otp_map_v2;
 	else {
-		dev_err(&pdev->dev,
-			"%s otpc config map not defined\n", __func__);
+		dev_err(dev, "%s otpc config map not defined\n", __func__);
 		return -EINVAL;
 	}
 
-- 
2.14.3

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

* [PATCH v4 22/22] nvmem: bcm-ocotp: Do not use "&pdev->dev" explicitly
@ 2018-02-28 14:41   ` Andrey Smirnov
  0 siblings, 0 replies; 115+ messages in thread
From: Andrey Smirnov @ 2018-02-28 14:41 UTC (permalink / raw)
  To: linus-amlogic

There's "dev" variable for this already. Use it.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: cphealy at gmail.com
Cc: linux-kernel at vger.kernel.org
Cc: linux-mediatek at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: linux-amlogic at lists.infradead.org
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/nvmem/bcm-ocotp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvmem/bcm-ocotp.c b/drivers/nvmem/bcm-ocotp.c
index 24c30fa475cc..4159b3f41d79 100644
--- a/drivers/nvmem/bcm-ocotp.c
+++ b/drivers/nvmem/bcm-ocotp.c
@@ -262,8 +262,7 @@ static int bcm_otpc_probe(struct platform_device *pdev)
 	else if (of_device_is_compatible(dev->of_node, "brcm,ocotp-v2"))
 		priv->map = &otp_map_v2;
 	else {
-		dev_err(&pdev->dev,
-			"%s otpc config map not defined\n", __func__);
+		dev_err(dev, "%s otpc config map not defined\n", __func__);
 		return -EINVAL;
 	}
 
-- 
2.14.3

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

* [PATCH] nvmem: uniphier-efuse: fix ptr_ret.cocci warnings
  2018-02-28 14:40   ` Andrey Smirnov
  (?)
  (?)
@ 2018-03-04  0:46     ` kbuild test robot
  -1 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: d562efb89f70 ("nvmem: uniphier-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 uniphier-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -61,10 +61,7 @@ static int uniphier_efuse_probe(struct p
 	econfig.priv = priv;
 	econfig.dev = dev;
 	nvmem = devm_nvmem_register(dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id uniphier_efuse_of_match[] = {

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

* Re: [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-03-04  0:46     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] nvmem: uniphier-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04  0:46     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: d562efb89f70 ("nvmem: uniphier-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 uniphier-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -61,10 +61,7 @@ static int uniphier_efuse_probe(struct p
 	econfig.priv = priv;
 	econfig.dev = dev;
 	nvmem = devm_nvmem_register(dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id uniphier_efuse_of_match[] = {

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

* Re: [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-03-04  0:46     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	Srinivas Kandagatla, kbuild-all-JC7UmRfGjtg,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Carlo Caione,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	cphealy-Re5JQEeQqe8AvxtiuMwx3w, Matthias Brugger

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] nvmem: uniphier-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04  0:46     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: d562efb89f70 ("nvmem: uniphier-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 uniphier-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -61,10 +61,7 @@ static int uniphier_efuse_probe(struct p
 	econfig.priv = priv;
 	econfig.dev = dev;
 	nvmem = devm_nvmem_register(dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id uniphier_efuse_of_match[] = {

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

* [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-03-04  0:46     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] nvmem: uniphier-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04  0:46     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  To: linus-amlogic

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: d562efb89f70 ("nvmem: uniphier-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 uniphier-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/uniphier-efuse.c
+++ b/drivers/nvmem/uniphier-efuse.c
@@ -61,10 +61,7 @@ static int uniphier_efuse_probe(struct p
 	econfig.priv = priv;
 	econfig.dev = dev;
 	nvmem = devm_nvmem_register(dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id uniphier_efuse_of_match[] = {

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

* [PATCH v4 06/22] nvmem: uniphier-efuse: Convert to use devm_nvmem_register()
@ 2018-03-04  0:46     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  0:46 UTC (permalink / raw)
  To: linus-amlogic

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/uniphier-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* Re: [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04  3:47     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  3:47 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_read':
>> meson-efuse.c:(.text+0x28): undefined reference to `meson_sm_call_read'
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_probe':
>> meson-efuse.c:(.text+0x64): undefined reference to `meson_sm_call'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53476 bytes --]

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

* Re: [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04  3:47     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  3:47 UTC (permalink / raw)
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	Srinivas Kandagatla, kbuild-all-JC7UmRfGjtg,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Carlo Caione,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	cphealy-Re5JQEeQqe8AvxtiuMwx3w, Matthias Brugger

[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_read':
>> meson-efuse.c:(.text+0x28): undefined reference to `meson_sm_call_read'
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_probe':
>> meson-efuse.c:(.text+0x64): undefined reference to `meson_sm_call'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53476 bytes --]

[-- Attachment #3: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04  3:47     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  3:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_read':
>> meson-efuse.c:(.text+0x28): undefined reference to `meson_sm_call_read'
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_probe':
>> meson-efuse.c:(.text+0x64): undefined reference to `meson_sm_call'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 53476 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180304/23adb6c9/attachment-0001.gz>

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

* [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04  3:47     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04  3:47 UTC (permalink / raw)
  To: linus-amlogic

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_read':
>> meson-efuse.c:(.text+0x28): undefined reference to `meson_sm_call_read'
   drivers/nvmem/meson-efuse.o: In function `meson_efuse_probe':
>> meson-efuse.c:(.text+0x64): undefined reference to `meson_sm_call'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 53476 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20180304/23adb6c9/attachment.gz>

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

* Re: [PATCH v4 11/22] nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
  2018-02-28 14:40   ` Andrey Smirnov
  (?)
  (?)
@ 2018-03-04 11:13     ` kbuild test robot
  -1 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] nvmem: meson-mx-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 11:13     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 37ef5352c0f7 ("nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 meson-mx-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -234,10 +234,7 @@ static int meson_mx_efuse_probe(struct p
 	}
 
 	efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
-	if (IS_ERR(efuse->nvmem))
-		return PTR_ERR(efuse->nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(efuse->nvmem);
 }
 
 static struct platform_driver meson_mx_efuse_driver = {

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

* Re: [PATCH v4 11/22] nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
@ 2018-03-04 11:13     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] nvmem: meson-mx-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 11:13     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	Srinivas Kandagatla, kbuild-all-JC7UmRfGjtg,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Carlo Caione,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	cphealy-Re5JQEeQqe8AvxtiuMwx3w, Matthias Brugger

From: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 37ef5352c0f7 ("nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

 meson-mx-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -234,10 +234,7 @@ static int meson_mx_efuse_probe(struct p
 	}
 
 	efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
-	if (IS_ERR(efuse->nvmem))
-		return PTR_ERR(efuse->nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(efuse->nvmem);
 }
 
 static struct platform_driver meson_mx_efuse_driver = {

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

* [PATCH] nvmem: meson-mx-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 11:13     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 37ef5352c0f7 ("nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 meson-mx-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -234,10 +234,7 @@ static int meson_mx_efuse_probe(struct p
 	}
 
 	efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
-	if (IS_ERR(efuse->nvmem))
-		return PTR_ERR(efuse->nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(efuse->nvmem);
 }
 
 static struct platform_driver meson_mx_efuse_driver = {

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

* [PATCH v4 11/22] nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
@ 2018-03-04 11:13     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] nvmem: meson-mx-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 11:13     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  To: linus-amlogic

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 37ef5352c0f7 ("nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 meson-mx-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -234,10 +234,7 @@ static int meson_mx_efuse_probe(struct p
 	}
 
 	efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
-	if (IS_ERR(efuse->nvmem))
-		return PTR_ERR(efuse->nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(efuse->nvmem);
 }
 
 static struct platform_driver meson_mx_efuse_driver = {

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

* [PATCH v4 11/22] nvmem: meson-mx-efuse: Convert to use devm_nvmem_register()
@ 2018-03-04 11:13     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 11:13 UTC (permalink / raw)
  To: linus-amlogic

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-mx-efuse.c:237:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* Re: [PATCH v4 13/22] nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
@ 2018-03-04 13:04     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* Re: [PATCH v4 13/22] nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
@ 2018-03-04 13:04     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	Srinivas Kandagatla, kbuild-all-JC7UmRfGjtg,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Carlo Caione,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	cphealy-Re5JQEeQqe8AvxtiuMwx3w, Matthias Brugger

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH v4 13/22] nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
@ 2018-03-04 13:04     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH v4 13/22] nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()
@ 2018-03-04 13:04     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  To: linus-amlogic

Hi Andrey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801


coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] nvmem: lpc18xx_otp: fix ptr_ret.cocci warnings
  2018-02-28 14:40   ` Andrey Smirnov
  (?)
  (?)
@ 2018-03-04 13:04     ` kbuild test robot
  -1 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: e738282235ec ("nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 lpc18xx_otp.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -87,10 +87,7 @@ static int lpc18xx_otp_probe(struct plat
 	lpc18xx_otp_nvmem_config.priv = otp;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {

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

* [PATCH] nvmem: lpc18xx_otp: fix ptr_ret.cocci warnings
@ 2018-03-04 13:04     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: e738282235ec ("nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 lpc18xx_otp.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -87,10 +87,7 @@ static int lpc18xx_otp_probe(struct plat
 	lpc18xx_otp_nvmem_config.priv = otp;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {

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

* [PATCH] nvmem: lpc18xx_otp: fix ptr_ret.cocci warnings
@ 2018-03-04 13:04     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  To: linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: e738282235ec ("nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 lpc18xx_otp.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -87,10 +87,7 @@ static int lpc18xx_otp_probe(struct plat
 	lpc18xx_otp_nvmem_config.priv = otp;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {

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

* [PATCH] nvmem: lpc18xx_otp: fix ptr_ret.cocci warnings
@ 2018-03-04 13:04     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 13:04 UTC (permalink / raw)
  To: linus-amlogic

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/lpc18xx_otp.c:90:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: e738282235ec ("nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 lpc18xx_otp.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -87,10 +87,7 @@ static int lpc18xx_otp_probe(struct plat
 	lpc18xx_otp_nvmem_config.priv = otp;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {

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

* [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 meson-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
 	econfig.size = size;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static struct platform_driver meson_efuse_driver = {

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

* Re: [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  To: Andrey Smirnov
  Cc: kbuild-all, Srinivas Kandagatla, Andrey Smirnov, Heiko Stuebner,
	Masahiro Yamada, Carlo Caione, Kevin Hilman, Matthias Brugger,
	cphealy, linux-kernel, linux-mediatek, linux-rockchip,
	linux-amlogic, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> ERROR: "meson_sm_call" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!
>> ERROR: "meson_sm_call_read" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!

coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 63100 bytes --]

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

* [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	Srinivas Kandagatla, kbuild-all-JC7UmRfGjtg,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Carlo Caione,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	cphealy-Re5JQEeQqe8AvxtiuMwx3w, Matthias Brugger

From: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")
CC: Andrey Smirnov <andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

 meson-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
 	econfig.size = size;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static struct platform_driver meson_efuse_driver = {

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

* Re: [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Andrey Smirnov, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Masahiro Yamada,
	Srinivas Kandagatla, kbuild-all-JC7UmRfGjtg,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Carlo Caione,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	cphealy-Re5JQEeQqe8AvxtiuMwx3w, Matthias Brugger

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> ERROR: "meson_sm_call" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!
>> ERROR: "meson_sm_call_read" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!

coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 63100 bytes --]

[-- Attachment #3: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 meson-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
 	econfig.size = size;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static struct platform_driver meson_efuse_driver = {

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

* [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> ERROR: "meson_sm_call" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!
>> ERROR: "meson_sm_call_read" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!

coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 63100 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180305/2de1536b/attachment-0001.gz>

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

* [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  To: linus-amlogic

From: Fengguang Wu <fengguang.wu@intel.com>

drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")
CC: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 meson-efuse.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/meson-efuse.c
+++ b/drivers/nvmem/meson-efuse.c
@@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
 	econfig.size = size;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static struct platform_driver meson_efuse_driver = {

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

* [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM
@ 2018-03-04 17:56     ` kbuild test robot
  0 siblings, 0 replies; 115+ messages in thread
From: kbuild test robot @ 2018-03-04 17:56 UTC (permalink / raw)
  To: linus-amlogic

Hi Andrey,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc3 next-20180302]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrey-Smirnov/Verbatim-device-names-and-devm_nvmem_-un-register/20180303-220801
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> ERROR: "meson_sm_call" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!
>> ERROR: "meson_sm_call_read" [drivers/nvmem/nvmem_meson_efuse.ko] undefined!

coccinelle warnings: (new ones prefixed by >>)

>> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 63100 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20180305/2de1536b/attachment.gz>

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

* Re: [kbuild-all] [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
  2018-03-04 17:56     ` kbuild test robot
  (?)
@ 2018-03-04 18:00       ` Fabio Estevam
  -1 siblings, 0 replies; 115+ messages in thread
From: Fabio Estevam @ 2018-03-04 18:00 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Andrey Smirnov,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Heiko Stuebner, linux-rockchip, Kevin Hilman, linux-kernel,
	Masahiro Yamada, Srinivas Kandagatla, kbuild-all, linux-amlogic,
	Carlo Caione, linux-mediatek, Chris Healy, Matthias Brugger

On Sun, Mar 4, 2018 at 2:56 PM, kbuild test robot <lkp@intel.com> wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
>
> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used
>
>
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
> Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")

Original code was fine.

This is more of a style preference, so I don't think it deserves a Fixes tag.

> CC: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
>  meson-efuse.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> --- a/drivers/nvmem/meson-efuse.c
> +++ b/drivers/nvmem/meson-efuse.c
> @@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
>         econfig.size = size;
>
>         nvmem = devm_nvmem_register(&pdev->dev, &econfig);
> -       if (IS_ERR(nvmem))
> -               return PTR_ERR(nvmem);
> -
> -       return 0;
> +       return PTR_ERR_OR_ZERO(nvmem);
>  }
>
>  static struct platform_driver meson_efuse_driver = {
> _______________________________________________
> kbuild-all mailing list
> kbuild-all@lists.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all

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

* [kbuild-all] [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 18:00       ` Fabio Estevam
  0 siblings, 0 replies; 115+ messages in thread
From: Fabio Estevam @ 2018-03-04 18:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 4, 2018 at 2:56 PM, kbuild test robot <lkp@intel.com> wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
>
> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used
>
>
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
> Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")

Original code was fine.

This is more of a style preference, so I don't think it deserves a Fixes tag.

> CC: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
>  meson-efuse.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> --- a/drivers/nvmem/meson-efuse.c
> +++ b/drivers/nvmem/meson-efuse.c
> @@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
>         econfig.size = size;
>
>         nvmem = devm_nvmem_register(&pdev->dev, &econfig);
> -       if (IS_ERR(nvmem))
> -               return PTR_ERR(nvmem);
> -
> -       return 0;
> +       return PTR_ERR_OR_ZERO(nvmem);
>  }
>
>  static struct platform_driver meson_efuse_driver = {
> _______________________________________________
> kbuild-all mailing list
> kbuild-all at lists.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all

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

* [kbuild-all] [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
@ 2018-03-04 18:00       ` Fabio Estevam
  0 siblings, 0 replies; 115+ messages in thread
From: Fabio Estevam @ 2018-03-04 18:00 UTC (permalink / raw)
  To: linus-amlogic

On Sun, Mar 4, 2018 at 2:56 PM, kbuild test robot <lkp@intel.com> wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
>
> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used
>
>
>  Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
> Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")

Original code was fine.

This is more of a style preference, so I don't think it deserves a Fixes tag.

> CC: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
>  meson-efuse.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> --- a/drivers/nvmem/meson-efuse.c
> +++ b/drivers/nvmem/meson-efuse.c
> @@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
>         econfig.size = size;
>
>         nvmem = devm_nvmem_register(&pdev->dev, &econfig);
> -       if (IS_ERR(nvmem))
> -               return PTR_ERR(nvmem);
> -
> -       return 0;
> +       return PTR_ERR_OR_ZERO(nvmem);
>  }
>
>  static struct platform_driver meson_efuse_driver = {
> _______________________________________________
> kbuild-all mailing list
> kbuild-all at lists.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all

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

end of thread, other threads:[~2018-03-04 18:00 UTC | newest]

Thread overview: 115+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 14:40 [PATCH v4 00/22] Verbatim device names and devm_nvmem_(un)register() Andrey Smirnov
2018-02-28 14:40 ` Andrey Smirnov
2018-02-28 14:40 ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 01/22] nvmem: Document struct nvmem_config Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 02/22] nvmem: core: Allow specifying device name verbatim Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 03/22] nvmem: Introduce devm_nvmem_(un)register() Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 04/22] nvmem: vf610-ocotp: Convert to use devm_nvmem_register() Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 05/22] nvmem: imx-ocotp: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 06/22] nvmem: uniphier-efuse: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-03-04  0:46   ` kbuild test robot
2018-03-04  0:46     ` kbuild test robot
2018-03-04  0:46     ` kbuild test robot
2018-03-04  0:46     ` kbuild test robot
2018-03-04  0:46   ` [PATCH] nvmem: uniphier-efuse: fix ptr_ret.cocci warnings kbuild test robot
2018-03-04  0:46     ` kbuild test robot
2018-03-04  0:46     ` kbuild test robot
2018-03-04  0:46     ` kbuild test robot
2018-02-28 14:40 ` [PATCH v4 07/22] nvmem: snvs_lgpr: Convert to use devm_nvmem_register() Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 08/22] nvmem: qfprom: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 09/22] nvmem: rockchip-efuse: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 10/22] nvmem: mtk-efuse: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 11/22] nvmem: meson-mx-efuse: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-03-04 11:13   ` kbuild test robot
2018-03-04 11:13     ` kbuild test robot
2018-03-04 11:13     ` kbuild test robot
2018-03-04 11:13     ` kbuild test robot
2018-03-04 11:13   ` [PATCH] nvmem: meson-mx-efuse: fix ptr_ret.cocci warnings kbuild test robot
2018-03-04 11:13     ` kbuild test robot
2018-03-04 11:13     ` kbuild test robot
2018-03-04 11:13     ` kbuild test robot
2018-02-28 14:40 ` [PATCH v4 12/22] nvmem: meson-efuse: Convert to use devm_nvmem_register() Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 13/22] nvmem: lpc18xx_otp: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-03-04 13:04   ` kbuild test robot
2018-03-04 13:04     ` kbuild test robot
2018-03-04 13:04     ` kbuild test robot
2018-03-04 13:04     ` kbuild test robot
2018-03-04 13:04   ` [PATCH] nvmem: lpc18xx_otp: fix ptr_ret.cocci warnings kbuild test robot
2018-03-04 13:04     ` kbuild test robot
2018-03-04 13:04     ` kbuild test robot
2018-03-04 13:04     ` kbuild test robot
2018-02-28 14:40 ` [PATCH v4 14/22] nvmem: imx-iim: Convert to use devm_nvmem_register() Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40 ` [PATCH v4 15/22] nvmem: bcm-ocotp: " Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:40   ` Andrey Smirnov
2018-02-28 14:41 ` [PATCH v4 16/22] nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-03-04  3:47   ` kbuild test robot
2018-03-04  3:47     ` kbuild test robot
2018-03-04  3:47     ` kbuild test robot
2018-03-04  3:47     ` kbuild test robot
2018-03-04 17:56   ` kbuild test robot
2018-03-04 17:56     ` kbuild test robot
2018-03-04 17:56     ` kbuild test robot
2018-03-04 17:56     ` kbuild test robot
2018-03-04 17:56   ` [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings kbuild test robot
2018-03-04 17:56     ` kbuild test robot
2018-03-04 17:56     ` kbuild test robot
2018-03-04 17:56     ` kbuild test robot
2018-03-04 18:00     ` [kbuild-all] " Fabio Estevam
2018-03-04 18:00       ` Fabio Estevam
2018-03-04 18:00       ` Fabio Estevam
2018-02-28 14:41 ` [PATCH v4 17/22] nvmem: snvs_lpgpr: Convert commas to semicolons Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41 ` [PATCH v4 18/22] nvmem: rockchip-efuse: Make use of of_device_get_match_data() Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41 ` [PATCH v4 19/22] nvmem: vf610-ocotp: Do not use "&pdev->dev" explicitly Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41 ` [PATCH v4 20/22] nvmem: rockchip-efuse: " Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41 ` [PATCH v4 21/22] nvmem: imx-iim: " Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41 ` [PATCH v4 22/22] nvmem: bcm-ocotp: " Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov
2018-02-28 14:41   ` Andrey Smirnov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.