Re: [PATCH] phy: berlin-sata: Use devm_kcalloc at appropriate place

2015-03-09 Thread Antoine Tenart
On Thu, Mar 05, 2015 at 09:40:41AM +0800, Axel Lin wrote:
> Prefer devm_kcalloc over devm_kzalloc with multiply.
> 
> Signed-off-by: Axel Lin 

Acked-by: Antoine Tenart 

> ---
>  drivers/phy/phy-berlin-sata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
> index 099eee8..6f3e06d 100644
> --- a/drivers/phy/phy-berlin-sata.c
> +++ b/drivers/phy/phy-berlin-sata.c
> @@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device 
> *pdev)
>   if (priv->nphys == 0)
>   return -ENODEV;
>  
> - priv->phys = devm_kzalloc(dev, priv->nphys * sizeof(*priv->phys),
> + priv->phys = devm_kcalloc(dev, priv->nphys, sizeof(*priv->phys),
> GFP_KERNEL);
>   if (!priv->phys)
>   return -ENOMEM;
> -- 
> 1.9.1
> 
> 
> 

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] phy: berlin-sata: Use devm_kcalloc at appropriate place

2015-03-09 Thread Antoine Tenart
On Thu, Mar 05, 2015 at 09:40:41AM +0800, Axel Lin wrote:
 Prefer devm_kcalloc over devm_kzalloc with multiply.
 
 Signed-off-by: Axel Lin axel@ingics.com

Acked-by: Antoine Tenart antoine.ten...@free-electrons.com

 ---
  drivers/phy/phy-berlin-sata.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
 index 099eee8..6f3e06d 100644
 --- a/drivers/phy/phy-berlin-sata.c
 +++ b/drivers/phy/phy-berlin-sata.c
 @@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device 
 *pdev)
   if (priv-nphys == 0)
   return -ENODEV;
  
 - priv-phys = devm_kzalloc(dev, priv-nphys * sizeof(*priv-phys),
 + priv-phys = devm_kcalloc(dev, priv-nphys, sizeof(*priv-phys),
 GFP_KERNEL);
   if (!priv-phys)
   return -ENOMEM;
 -- 
 1.9.1
 
 
 

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] phy: berlin-sata: Use devm_kcalloc at appropriate place

2015-03-04 Thread Axel Lin
Prefer devm_kcalloc over devm_kzalloc with multiply.

Signed-off-by: Axel Lin 
---
 drivers/phy/phy-berlin-sata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
index 099eee8..6f3e06d 100644
--- a/drivers/phy/phy-berlin-sata.c
+++ b/drivers/phy/phy-berlin-sata.c
@@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device 
*pdev)
if (priv->nphys == 0)
return -ENODEV;
 
-   priv->phys = devm_kzalloc(dev, priv->nphys * sizeof(*priv->phys),
+   priv->phys = devm_kcalloc(dev, priv->nphys, sizeof(*priv->phys),
  GFP_KERNEL);
if (!priv->phys)
return -ENOMEM;
-- 
1.9.1



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] phy: berlin-sata: Use devm_kcalloc at appropriate place

2015-03-04 Thread Axel Lin
Prefer devm_kcalloc over devm_kzalloc with multiply.

Signed-off-by: Axel Lin axel@ingics.com
---
 drivers/phy/phy-berlin-sata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
index 099eee8..6f3e06d 100644
--- a/drivers/phy/phy-berlin-sata.c
+++ b/drivers/phy/phy-berlin-sata.c
@@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device 
*pdev)
if (priv-nphys == 0)
return -ENODEV;
 
-   priv-phys = devm_kzalloc(dev, priv-nphys * sizeof(*priv-phys),
+   priv-phys = devm_kcalloc(dev, priv-nphys, sizeof(*priv-phys),
  GFP_KERNEL);
if (!priv-phys)
return -ENOMEM;
-- 
1.9.1



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/