lkml.org 
[lkml]   [2017]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents
From
Date
On Wed, 2017-11-22 at 11:25 -0800, Sohil Mehta wrote:
> From: Gayatri Kammela <gayatri.kammela@intel.com>


> +static int intel_iommu_regs_open(struct inode *inode, struct file
> *file)
> +{
> + return single_open(file, intel_iommu_debugfs_regs_show,
> + inode->i_private);
> +}
> +
> +static const struct file_operations intel_iommu_regs_fops = {
> + .open = intel_iommu_regs_open,
> + .read = seq_read,
> + .llseek = seq_lseek,
> + .release = single_release,
> +};

Please, be consistent with file name and functions, i.e.

intel_iommu_debugfs_regs_show -> intel_iommu_regset_show

and so on.

Moreover, see the patch I have just sent [1] and use same
DEFINE_SHOW_ATTRIBUTE() macro here. In that case we would easily move it
to seq_file.h for everyone to use in the future.

> + if (!debugfs_create_file("intel_iommu_regset", S_IRUGO,
> + iommu_debug_root, NULL,
> &intel_iommu_regs_fops

[1]: https://marc.info/?l=linux-bluetooth&m=151138535801354&w=2


--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2017-11-22 22:32    [W:0.093 / U:1.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site