Re: [PATCH 3/7] crypto: caam - convert top level drivers to libraries

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

 



On 5/3/2019 4:08 PM, Herbert Xu wrote:
> On Thu, Apr 25, 2019 at 07:24:57PM +0300, Horia Geantă wrote:
>>
>> @@ -3511,43 +3511,17 @@ static void caam_aead_alg_init(struct caam_aead_alg *t_alg)
>>  	alg->exit = caam_aead_exit;
>>  }
>>  
>> -static int __init caam_algapi_init(void)
>> +int caam_algapi_init(struct device *ctrldev)
>>  {
>>  	struct device_node *dev_node;
>>  	struct platform_device *pdev;
>> -	struct caam_drv_private *priv;
>> +	struct caam_drv_private *priv = dev_get_drvdata(ctrldev);
>>  	int i = 0, err = 0;
>>  	u32 aes_vid, aes_inst, des_inst, md_vid, md_inst, ccha_inst, ptha_inst;
>>  	u32 arc4_inst;
>>  	unsigned int md_limit = SHA512_DIGEST_SIZE;
>>  	bool registered = false, gcm_support;
>>  
>> -	dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec-v4.0");
>> -	if (!dev_node) {
>> -		dev_node = of_find_compatible_node(NULL, NULL, "fsl,sec4.0");
>> -		if (!dev_node)
>> -			return -ENODEV;
>> -	}
>> -
>> -	pdev = of_find_device_by_node(dev_node);
>> -	if (!pdev) {
>> -		of_node_put(dev_node);
>> -		return -ENODEV;
>> -	}
>> -
>> -	priv = dev_get_drvdata(&pdev->dev);
>> -	of_node_put(dev_node);
>> -
>> -	/*
>> -	 * If priv is NULL, it's probably because the caam driver wasn't
>> -	 * properly initialized (e.g. RNG4 init failed). Thus, bail out here.
>> -	 */
>> -	if (!priv) {
>> -		err = -ENODEV;
>> -		goto out_put_dev;
>> -	}
>> -
>> -
>>  	/*
>>  	 * Register crypto algorithms the device supports.
>>  	 * First, detect presence and attributes of DES, AES, and MD blocks.
> 
> This introduces two new warnings regarding unused variables.  Please
> fix and resubmit.
> 
Ouch.
This is due to developing on linux-next followed by incorrect merge conflict
resolution when moving to cryptodev-2.6 tree.
Will resubmit.

Thanks,
Horia




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux