[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <155138966250.16805.8149986906489473683@swboyd.mtv.corp.google.com>
Date: Thu, 28 Feb 2019 13:34:22 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Vaishali Thakkar <vaishali.thakkar@...aro.org>,
andy.gross@...aro.org
Cc: david.brown@...aro.org, gregkh@...uxfoundation.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
rafael@...nel.org, bjorn.andersson@...aro.org, vkoul@...nel.org,
Vaishali Thakkar <vaishali.thakkar@...aro.org>
Subject: Re: [PATCH v4 5/5] soc: qcom: socinfo: Expose image information
Quoting Vaishali Thakkar (2019-02-24 22:50:44)
> + qcom_socinfo->dbg_root);
> +
> + DEBUGFS_IMAGE_NAME(name, apps, SMEM_IMAGE_TABLE_APPS_INDEX);
> + DEBUGFS_IMAGE_VARIANT(variant, apps, SMEM_IMAGE_TABLE_APPS_INDEX);
> + DEBUGFS_IMAGE_OEM(oem, apps, SMEM_IMAGE_TABLE_APPS_INDEX);
> +
> + qcom_socinfo->mpss = debugfs_create_dir("mpss",
> + qcom_socinfo->dbg_root);
> +
> + DEBUGFS_IMAGE_NAME(name, mpss, SMEM_IMAGE_TABLE_MPSS_INDEX);
> + DEBUGFS_IMAGE_VARIANT(variant, mpss, SMEM_IMAGE_TABLE_MPSS_INDEX);
> + DEBUGFS_IMAGE_OEM(oem, mpss, SMEM_IMAGE_TABLE_MPSS_INDEX);
> +
> + qcom_socinfo->adsp = debugfs_create_dir("adsp",
> + qcom_socinfo->dbg_root);
> +
> + DEBUGFS_IMAGE_NAME(name, adsp, SMEM_IMAGE_TABLE_ADSP_INDEX);
> + DEBUGFS_IMAGE_VARIANT(variant, adsp, SMEM_IMAGE_TABLE_ADSP_INDEX);
> + DEBUGFS_IMAGE_OEM(oem, adsp, SMEM_IMAGE_TABLE_ADSP_INDEX);
> +
> + qcom_socinfo->cnss = debugfs_create_dir("cnss",
> + qcom_socinfo->dbg_root);
> +
> + DEBUGFS_IMAGE_NAME(name, cnss, SMEM_IMAGE_TABLE_CNSS_INDEX);
> + DEBUGFS_IMAGE_VARIANT(variant, cnss, SMEM_IMAGE_TABLE_CNSS_INDEX);
> + DEBUGFS_IMAGE_OEM(oem, cnss, SMEM_IMAGE_TABLE_CNSS_INDEX);
> +
> + qcom_socinfo->video = debugfs_create_dir("video",
> + qcom_socinfo->dbg_root);
> +
> + DEBUGFS_IMAGE_NAME(name, video, SMEM_IMAGE_TABLE_VIDEO_INDEX);
> + DEBUGFS_IMAGE_VARIANT(variant, video, SMEM_IMAGE_TABLE_VIDEO_INDEX);
> + DEBUGFS_IMAGE_OEM(oem, video, SMEM_IMAGE_TABLE_VIDEO_INDEX);
Couldn't these four lines be a function itself that takes the name,
dbg_root, index, etc and create a directory? Looks like a lot of copy
paste right now.
> }
>
> static void socinfo_debugfs_exit(struct qcom_socinfo *qcom_socinfo)
> --
> 2.17.1
>
Powered by blists - more mailing lists