Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1314247
| Path | csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Thierry Reding <thierry.reding@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers |
| Date | Thu, 21 Jan 2016 16:00:03 +0100 |
| Message-ID | <qToSn-6CC-35@gated-at.bofh.it> (permalink) |
| References | <qSeV4-7C5-23@gated-at.bofh.it> |
| X-Original-To | Wei Ni <wni@nvidia.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=b1xvqSx0x+2W5HsdEVmclFo4RBR4MmCxjMD2oNWKU6w=; b=yVZhNRKyHYbpnanHFcWE1h6NZfRS/4RwBqKSu1fJAgyEynWL4Np96muLScIRo6uaCY IfvfKlsHFCRK7kjPeUP41IiT4C6fdTKCJy/fkMz3uaA8HzUUzaR2hFm3TUgobIxfHacK u9avVn0jegPPFFb+UaMNP+OHV+RasLo4y/g0kXE7tZZFYekJWjqXg5IpElQzE1px4hQ9 xVRHDexl+aRUL1ceIMl7IyGlhZW4Ve8HKBIOTVnGUz6zkTeGMVjGA+fZ5KBH8P5kKCdA yySNLXX0/IeagGuBVpx0CdXhd+8PgPm6Xx0pqKYKF8JMpOhb1Z1dkyDJulfM2glf3esd oSNw== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=b1xvqSx0x+2W5HsdEVmclFo4RBR4MmCxjMD2oNWKU6w=; b=co1o1cAKP9/gUiOBF/JzK+/33q7Kz9Um0PcEXn07e2/48bX78DAyE9sYFIfU7kV8VM Z1B9g8kkBVmWP+za72Hlb4esbWilbRuZuH3YBhIsmYO54tdgyYBOXc1uz2/3G36Abx++ 5wyXGFg+Rc8aaV53vkJuNzEB56QKnI1yHm9dhFhF8y+UXf4WKSS5wlFRbP/MPzcVpmiX E82gbHN0PIoBfJPBagEBfHTgL8ix8vkQXGq8wICTR4W2BFa+pcJdGBF6k+UU4QliE5Jh A7CXi9M5mYQRuF0sTNBYQOdOiK2Zjn8Y2Eq99UngFYAaDG1eFoCcYfVnGsziFx12VmF2 IssA== |
| X-Gm-Message-State | AG10YOSdlOB7/my+ySthqdYnQ//MY/WHji6SJbgyq/aohpeG1U9IhInJqu9muC8fDPn80A== |
| X-Received | by 10.28.210.143 with SMTP id j137mr10579446wmg.13.1453387834604; Thu, 21 Jan 2016 06:50:34 -0800 (PST) |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 82 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | rui.zhang@intel.com, MLongnecker@nvidia.com, swarren@wwwdotorg.org, mikko.perttunen@kapsi.fi, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Thu, 21 Jan 2016 15:50:33 +0100 |
| X-Original-Message-ID | <20160121145033.GC32301@ulmo> |
| X-Original-References | <1453111437-12401-1-git-send-email-wni@nvidia.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1314247 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
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.
> + 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.
> + 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:
...
{
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?
Thierry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V3 06/11] thermal: tegra: add a debugfs to show registers Wei Ni <wni@nvidia.com> - 2016-01-18 11:10 +0100
Re: [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers Thierry Reding <thierry.reding@gmail.com> - 2016-01-21 16:00 +0100
Re: [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers Wei Ni <wni@nvidia.com> - 2016-01-25 07:00 +0100
csiph-web