Re: [PATCH 2/2] crypto: omap: Improve a size determination in three functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> @@ -1032,14 +1032,13 @@ static int omap_aes_get_res_pdev(struct omap_aes_dev *dd,
>>  static int omap_aes_probe(struct platform_device *pdev)
>>  {
>>  	struct device *dev = &pdev->dev;
>> -	struct omap_aes_dev *dd;
>>  	struct crypto_alg *algp;
>>  	struct aead_alg *aalg;
>>  	struct resource res;
>>  	int err = -ENOMEM, i, j, irq = -1;
>>  	u32 reg;
>> +	struct omap_aes_dev *dd = devm_kzalloc(dev, sizeof(*dd), GFP_KERNEL);
>>  
>> -	dd = devm_kzalloc(dev, sizeof(struct omap_aes_dev), GFP_KERNEL);
> 
> I'm fine with sizeof(*dd)

Thanks for your feedback.


> but please don't combine the allocation with the declaration.

Why do you not like such an implementation detail?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux