Subject: Re: [PATCH] sh_eth: replace devm_kzalloc() with devm_kmalloc()

From: Sergei Shtylyov <[email-masked]>
Date: Mon, 12 May 2014 15:52:20 +0400

Hello.

On 05/12/2014 04:10 AM, Joe Perches wrote:

>> Now that devm_kmalloc() has become available, we can avoid the needless
>> zeroing out of the PHY IRQ array.
> []
>> net-next/drivers/net/ethernet/renesas/sh_eth.c
> []
>> @@ -2627,7 +2627,7 @@ static int sh_mdio_init(struct sh_eth_pr
> []
>> -	mdp->mii_bus->irq = devm_kzalloc(dev, sizeof(int) * PHY_MAX_ADDR,
>> +	mdp->mii_bus->irq = devm_kmalloc(dev, sizeof(int) * PHY_MAX_ADDR,

> perhaps

> 	mdp->mii_bus->irq = devm_kmalloc_array(dev, PHY_MAX_ADDR, sizeof(int),

    Yes, that has occurred to me after I sent the patch...

WBR, Sergei