Re: [PATCH v4 5/5] soc: qcom: socinfo: Expose image information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux