From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754545AbcAYFuP (ORCPT ); Mon, 25 Jan 2016 00:50:15 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:15376 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbcAYFuM convert rfc822-to-8bit (ORCPT ); Mon, 25 Jan 2016 00:50:12 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Sun, 24 Jan 2016 21:51:11 -0800 Message-ID: <56A5B7CE.8040300@nvidia.com> Date: Mon, 25 Jan 2016 13:51:10 +0800 From: Wei Ni User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Thierry Reding CC: , , , , , Subject: Re: [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers References: <1453111437-12401-1-git-send-email-wni@nvidia.com> <20160121145033.GC32301@ulmo> In-Reply-To: <20160121145033.GC32301@ulmo> X-Originating-IP: [10.19.224.146] X-ClientProxiedBy: HKMAIL103.nvidia.com (10.18.16.12) To HKMAIL101.nvidia.com (10.18.16.10) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, ®s_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 >