lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Mar 2018 10:59:41 -0400
From:   Murali Karicheri <m-karicheri2@...com>
To:     Grygorii Strashko <grygorii.strashko@...com>, <robh+dt@...nel.org>,
        <ssantosh@...nel.org>, <malat@...ian.org>, <w-kwok2@...com>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <davem@...emloft.net>,
        <netdev@...r.kernel.org>
CC:     <mark.rutland@....com>
Subject: Re: [net-next,v2,01/10] soc: ti: K2G: enhancement to support QMSS in
 NSS

On 03/28/2018 03:01 PM, Grygorii Strashko wrote:
> Hi Murali,
> 

>>   
>> +enum qmss_version {
>> +	QMSS,
>> +	QMSS_LITE,
> 
> QMSS_66AK2G
> 

OK.

>> +};
>> +
>>   struct knav_device {
>>   	struct device				*dev;
>>   	unsigned				base_id;
>> @@ -305,6 +310,7 @@ struct knav_device {
>>   	struct list_head			pools;
>>   	struct list_head			pdsps;
>>   	struct list_head			qmgrs;
>> +	enum qmss_version			version;
>>   };
>>   
> 
> [...]
> 
>>   }
>>   
>> +/* Match table for of_platform binding */
>> +static const struct of_device_id keystone_qmss_of_match[] = {
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss",
> 
> 		.data	= (void *)QMSS,

This seems to be unnecessary as QMSS is actually defined as zero. Also 
this static. So that value is zero already in memory.
> 
>> +	},
>> +	{
>> +		.compatible = "ti,keystone-navigator-qmss-l",
>> +		.data	= (void *)QMSS_LITE,
>> +	},
>> +	{},
>> +};
>> +MODULE_DEVICE_TABLE(of, keystone_qmss_of_match);
>> +
>>   static int knav_queue_probe(struct platform_device *pdev)
>>   {
>>   	struct device_node *node = pdev->dev.of_node;
>>   	struct device_node *qmgrs, *queue_pools, *regions, *pdsps;
>> +	const struct of_device_id *match;
>>   	struct device *dev = &pdev->dev;
>>   	u32 temp[2];
>>   	int ret;
>> @@ -1700,6 +1749,10 @@ static int knav_queue_probe(struct platform_device *pdev)
>>   		return -ENOMEM;
>>   	}
>>   
>> +	match = of_match_device(of_match_ptr(keystone_qmss_of_match), dev);
>> +	if (match && match->data)
>> +		kdev->version = QMSS_LITE;
> 
> 	if (match)
> 		kdev->version = match->data;
> 	else
> 		error?

Similar to above. This private memory is allocated using kzalloc which initializes
everything to zero. So the else part is unnecessary.

Murali

> [...]
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ