From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965413AbcAUOui (ORCPT ); Thu, 21 Jan 2016 09:50:38 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32849 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965221AbcAUOuf (ORCPT ); Thu, 21 Jan 2016 09:50:35 -0500 Date: Thu, 21 Jan 2016 15:50:33 +0100 From: Thierry Reding To: Wei Ni 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 Subject: Re: [PATCH V3 06/11] thermal: tegra: add a debugfs to show registers Message-ID: <20160121145033.GC32301@ulmo> References: <1453111437-12401-1-git-send-email-wni@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: <1453111437-12401-1-git-send-email-wni@nvidia.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/soc= therm.c [...] > +static void soctherm_debug_init(struct platform_device *pdev) > +{ > + struct tegra_soctherm *tegra =3D platform_get_drvdata(pdev); > + struct dentry *root, *file; > + > + root =3D 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 =3D root; > + > + file =3D 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_devi= ce *pdev) > if (!tegra) > return -ENOMEM; > =20 > + dev_set_drvdata(&pdev->dev, tegra); > + > + tegra->soc =3D soc; This looks odd here. Does this perhaps belong in one of the previous patches? Thierry --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWoPA5AAoJEN0jrNd/PrOhSX4QAJiVg/riFnVmMO7WjpswhKWu TZFWqLMZfk0MLtSRCU3E82l5qZ92RrHPLJkTfCXwhmk4wkWBO8byr0Vjq91Q17vW cb9RrpAz0PHpzieoY2mQhvAqIobtl/BLkPB/sQF5hd+L/5JsVrTZDhmq3+Ekd0T3 k7BIPxPu8scb6a6ImWsAS4GPBPoY2fTmsgTJsOviajywhHHSO5cCqJIwL+AJq44U RzqbOAx2Hai1Yay2F2oWdOwmH3SWhM4hKbsXci7pCZKG0uGo6lGGG5NeANGfB97N 9KPNWfenbl3Q3PnpDy/VGIQotvumuHO2TXH+79bb35bPqUKZSxTwLXDJpSb02x5k 0hpqfrh7HR5e3NjwDdpKEfcJD5OSi5bnXVruvY2KyRXe5zKaxRibeY81TZXWMeZE lZtCDsI7mJmiS/3ub/uTBFpf0Mak49M1aURvlux+5Ke+BpBLvNOQjqjfl1cmKiz0 Fm1jMatXxWAVrshwvvGZR3UpPN9/1u8du8Br+Z7kg9pLHK50Xrv55fEbVUeC4xGL xay+rsodlfFN+z6KeNf1EVoEGfoSpfbQ1CZXp+LUOSJczjW+juQnbyf32x7BuVSB iygJbIX5MtbyQW2/kuLTFt876AHuY73hSoTL1x+aoa6esZiqXqVy46Z/xluwL1yF Ji+U31ojiuLUUhsyQfZQ =R3VW -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu--