From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
mikko.perttunen-/1wQRMveznE@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers
Date: Thu, 21 Jan 2016 15:50:33 +0100 [thread overview]
Message-ID: <20160121145033.GC32301@ulmo> (raw)
In-Reply-To: <1453111437-12401-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-01-21 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 10:03 [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers Wei Ni
[not found] ` <1453111437-12401-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-01-21 14:50 ` Thierry Reding [this message]
2016-01-25 5:51 ` Wei Ni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160121145033.GC32301@ulmo \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mikko.perttunen-/1wQRMveznE@public.gmane.org \
--cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).