Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1412137 > unrolled thread

[PATCH 1/2] nvmem: imx-ocotp: add COMPILE_TEST for proper test coverage

Started bySrinivas Kandagatla <srinivas.kandagatla@linaro.org>
First post2016-06-02 13:20 +0200
Last post2016-06-02 14:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] nvmem: imx-ocotp: add COMPILE_TEST for proper test coverage Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2016-06-02 13:20 +0200
    [PATCH 2/2] nvmem: imx-ocotp: Fix assignment warning. Srinivas Kandagatla <srinivas.kandagatla@linaro.org> - 2016-06-02 13:30 +0200
      Re: [PATCH 2/2] nvmem: imx-ocotp: Fix assignment warning. Philipp Zabel <p.zabel@pengutronix.de> - 2016-06-02 14:50 +0200

#1412137 — [PATCH 1/2] nvmem: imx-ocotp: add COMPILE_TEST for proper test coverage

FromSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date2016-06-02 13:20 +0200
Subject[PATCH 1/2] nvmem: imx-ocotp: add COMPILE_TEST for proper test coverage
Message-ID<rFyPo-5f5-11@gated-at.bofh.it>
This patch add COMPILE_TEST to imx-ocotp driver so that it can be
compile tested on other platforms with zero day testing.
Also adds HAS_IOMEM dependancy as the users of devm_ioremap_resource()
which are compile-testable should depend on HAS_IOMEM.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 3041d48..8148a04 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -15,7 +15,8 @@ if NVMEM
 
 config NVMEM_IMX_OCOTP
 	tristate "i.MX6 On-Chip OTP Controller support"
-	depends on SOC_IMX6
+	depends on SOC_IMX6 || COMPILE_TEST
+	depends on HAS_IOMEM
 	help
 	  This is a driver for the On-Chip OTP Controller (OCOTP) available on
 	  i.MX6 SoCs, providing access to 4 Kbits of one-time programmable
-- 
2.8.2

[toc] | [next] | [standalone]


#1412139 — [PATCH 2/2] nvmem: imx-ocotp: Fix assignment warning.

FromSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Date2016-06-02 13:30 +0200
Subject[PATCH 2/2] nvmem: imx-ocotp: Fix assignment warning.
Message-ID<rFyZ3-5ib-3@gated-at.bofh.it>
In reply to#1412137
This patch fixes below error if the driver is compiled with 64 bit
machine configuration.

"drivers/nvmem/imx-ocotp.c:102:14: warning: assignment makes integer
from pointer without a cast"

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/imx-ocotp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index a340390..ac27b9b 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -99,7 +99,7 @@ static int imx_ocotp_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->clk);
 
 	of_id = of_match_device(imx_ocotp_dt_ids, dev);
-	priv->nregs = (unsigned int)of_id->data;
+	priv->nregs = (unsigned long)of_id->data;
 	imx_ocotp_nvmem_config.size = 4 * priv->nregs;
 	imx_ocotp_nvmem_config.dev = dev;
 	imx_ocotp_nvmem_config.priv = priv;
-- 
2.8.2

[toc] | [prev] | [next] | [standalone]


#1412204 — Re: [PATCH 2/2] nvmem: imx-ocotp: Fix assignment warning.

FromPhilipp Zabel <p.zabel@pengutronix.de>
Date2016-06-02 14:50 +0200
SubjectRe: [PATCH 2/2] nvmem: imx-ocotp: Fix assignment warning.
Message-ID<rFAeu-5Zh-23@gated-at.bofh.it>
In reply to#1412139
Am Donnerstag, den 02.06.2016, 12:19 +0100 schrieb Srinivas Kandagatla:
> This patch fixes below error if the driver is compiled with 64 bit
> machine configuration.
> 
> "drivers/nvmem/imx-ocotp.c:102:14: warning: assignment makes integer
> from pointer without a cast"
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  drivers/nvmem/imx-ocotp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
> index a340390..ac27b9b 100644
> --- a/drivers/nvmem/imx-ocotp.c
> +++ b/drivers/nvmem/imx-ocotp.c
> @@ -99,7 +99,7 @@ static int imx_ocotp_probe(struct platform_device *pdev)
>  		return PTR_ERR(priv->clk);
>  
>  	of_id = of_match_device(imx_ocotp_dt_ids, dev);
> -	priv->nregs = (unsigned int)of_id->data;
> +	priv->nregs = (unsigned long)of_id->data;
>  	imx_ocotp_nvmem_config.size = 4 * priv->nregs;
>  	imx_ocotp_nvmem_config.dev = dev;
>  	imx_ocotp_nvmem_config.priv = priv;

Thanks you, both
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web