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

Reply via email to