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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56A5B7CE.8040300@nvidia.com>
Date:	Mon, 25 Jan 2016 13:51:10 +0800
From:	Wei Ni <wni@...dia.com>
To:	Thierry Reding <thierry.reding@...il.com>
CC:	<rui.zhang@...el.com>, <MLongnecker@...dia.com>,
	<swarren@...dotorg.org>, <mikko.perttunen@...si.fi>,
	<linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers



On 2016年01月21日 22:50, Thierry Reding wrote:
> * PGP Signed by an unknown key
> 
> On Mon, Jan 18, 2016 at 06:03:57PM +0800, Wei Ni wrote:
> [...]
>> diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
> [...]
>> +static void soctherm_debug_init(struct platform_device *pdev)
>> +{
>> +	struct tegra_soctherm *tegra = platform_get_drvdata(pdev);
>> +	struct dentry *root, *file;
>> +
>> +	root = debugfs_create_dir("tegra_soctherm", NULL);
> 
> Perhaps leave away the tegra_ prefix here? It's kind of redundant.

Ok, will remove the prefix.

> 
>> +	if (!root) {
>> +		dev_err(&pdev->dev, "failed to create debugfs directory\n");
>> +		return;
>> +	}
>> +
>> +	tegra->debugfs_dir = root;
>> +
>> +	file = debugfs_create_file("regs", 0644, root, pdev, &regs_fops);
> 
> Can we call this something different, please? "summary" would be a
> better name, in my opinion.

How about to change to "reg_contents"

> 
>> +	if (!file)
>> +		dev_err(&pdev->dev, "failed to create debugfs file\n");
>> +}
>> +#else
>> +static inline void soctherm_debug_init(struct platform_device *pdev)
>> +{ return 0; }
> 
> Please follow the regular CodingStyle here, too:

Got it, will fix it.

> 
> 	...
> 	{
> 		return 0;
> 	}
> 
>> @@ -178,6 +309,10 @@ static int tegra_soctherm_probe(struct platform_device *pdev)
>>  	if (!tegra)
>>  		return -ENOMEM;
>>  
>> +	dev_set_drvdata(&pdev->dev, tegra);
>> +
>> +	tegra->soc = soc;
> 
> This looks odd here. Does this perhaps belong in one of the previous
> patches?

Sorry, I made a mistake when I rebased these patches.
Will fix it.

> 
> Thierry
> 
> * Unknown Key
> * 0x7F3EB3A1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ