diff mbox

memory: samsung: exynos-srom: fix wrong count of registers

Message ID 1467718817-19239-1-git-send-email-sw0312.kim@samsung.com (mailing list archive)
State Accepted
Headers show

Commit Message

Seung-Woo Kim July 5, 2016, 11:40 a.m. UTC
This patch fixes wrong count of array for srom registers from probe
function.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
---
 drivers/memory/samsung/exynos-srom.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chanwoo Choi July 6, 2016, 12:12 a.m. UTC | #1
On 2016년 07월 05일 20:40, Seung-Woo Kim wrote:
> This patch fixes wrong count of array for srom registers from probe
> function.
> 
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> ---
>  drivers/memory/samsung/exynos-srom.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/memory/samsung/exynos-srom.c b/drivers/memory/samsung/exynos-srom.c
> index 96756fb..c66d2bd 100644
> --- a/drivers/memory/samsung/exynos-srom.c
> +++ b/drivers/memory/samsung/exynos-srom.c
> @@ -134,7 +134,7 @@ static int exynos_srom_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, srom);
>  
>  	srom->reg_offset = exynos_srom_alloc_reg_dump(exynos_srom_offsets,
> -			sizeof(exynos_srom_offsets));
> +			ARRAY_SIZE(exynos_srom_offsets));
>  	if (!srom->reg_offset) {
>  		iounmap(srom->reg_base);
>  		return -ENOMEM;
> 

On the exynos-srom.c, use the ARRAY_SIZE to get the number of array entry.
Looks good to me.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

Thanks,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krzysztof Kozlowski July 6, 2016, 6:17 a.m. UTC | #2
On 07/05/2016 01:40 PM, Seung-Woo Kim wrote:
> This patch fixes wrong count of array for srom registers from probe
> function.
> 
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> ---
>  drivers/memory/samsung/exynos-srom.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/memory/samsung/exynos-srom.c b/drivers/memory/samsung/exynos-srom.c
index 96756fb..c66d2bd 100644
--- a/drivers/memory/samsung/exynos-srom.c
+++ b/drivers/memory/samsung/exynos-srom.c
@@ -134,7 +134,7 @@  static int exynos_srom_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, srom);
 
 	srom->reg_offset = exynos_srom_alloc_reg_dump(exynos_srom_offsets,
-			sizeof(exynos_srom_offsets));
+			ARRAY_SIZE(exynos_srom_offsets));
 	if (!srom->reg_offset) {
 		iounmap(srom->reg_base);
 		return -ENOMEM;