From: Greg KH Subject: Re: [PATCH 3/5] soc: qcom: socinfo: Expose custom attributes Date: Thu, 14 Feb 2019 10:41:06 +0100 Message-ID: <20190214094106.GA10895@kroah.com> References: <297ee5e7840077f0330d4ae02dcd13c2ad97f910.1550114271.git.vaishali.thakkar@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <297ee5e7840077f0330d4ae02dcd13c2ad97f910.1550114271.git.vaishali.thakkar@linaro.org> Sender: linux-kernel-owner@vger.kernel.org To: Vaishali Thakkar Cc: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, bjorn.andersson@linaro.org, vkoul@kernel.org List-Id: linux-arm-msm@vger.kernel.org On Thu, Feb 14, 2019 at 09:11:49AM +0530, Vaishali Thakkar wrote: > +static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo) > +{ > + qcom_socinfo->dbg_root = debugfs_create_dir("qcom_socinfo", NULL); > + > + if (!qcom_socinfo->dbg_root) { > + pr_err("Cannot create debugfs directory\n"); > + return; > + } No need to check this at all, just call debugfs_create_dir() and be done with it. > + > + DEBUGFS_UINT_ADD(raw_version); > + DEBUGFS_UINT_ADD(hardware_platform); > + DEBUGFS_UINT_ADD(platform_version); > + DEBUGFS_UINT_ADD(foundry_id); > + DEBUGFS_HEX_ADD(chip_family); > + DEBUGFS_HEX_ADD(raw_device_family); > + DEBUGFS_HEX_ADD(raw_device_number); > + DEBUGFS_ADD(build_id); > + DEBUGFS_ADD(accessory_chip); > + DEBUGFS_ADD(pmic_model); > + DEBUGFS_ADD(platform_subtype); > + DEBUGFS_ADD(pmic_die_revision); > +} > + > +static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) > +{ > + debugfs_remove_recursive(qcom_socinfo->dbg_root); > +} > +#else > +socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo) { return 0; } > +socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo) { return 0; } These function signatures do not match the ones above :( thanks, greg k-h