All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Sohil Mehta <sohil.mehta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>,
	Alex Williamson
	<alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Ravi V Shankar
	<ravi.v.shankar-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Fenghua Yu <fenghua.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Gayatri Kammela
	<gayatri.kammela-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents
Date: Wed, 22 Nov 2017 23:19:19 +0200	[thread overview]
Message-ID: <1511385559.25007.415.camel@linux.intel.com> (raw)
In-Reply-To: <1511378746-109275-5-git-send-email-sohil.mehta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

On Wed, 2017-11-22 at 11:25 -0800, Sohil Mehta wrote:
> From: Gayatri Kammela <gayatri.kammela-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>


> +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-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Intel Finland Oy

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Sohil Mehta <sohil.mehta@intel.com>,
	Joerg Roedel <joro@8bytes.org>,
	Alex Williamson <alex.williamson@redhat.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Ashok Raj <ashok.raj@intel.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Jacob Pan <jacob.jun.pan@linux.intel.com>,
	Gayatri Kammela <gayatri.kammela@intel.com>,
	Ravi V Shankar <ravi.v.shankar@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>
Subject: Re: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents
Date: Wed, 22 Nov 2017 23:19:19 +0200	[thread overview]
Message-ID: <1511385559.25007.415.camel@linux.intel.com> (raw)
In-Reply-To: <1511378746-109275-5-git-send-email-sohil.mehta@intel.com>

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

  parent reply	other threads:[~2017-11-22 21:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 19:25 [PATCH v2 0/6] Intel IOMMU debugfs support Sohil Mehta
     [not found] ` <1511378746-109275-1-git-send-email-sohil.mehta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-11-22 18:47   ` Raj, Ashok
2017-11-22 18:47     ` Raj, Ashok
2017-11-22 19:25   ` [PATCH v2 1/6] iommu/vt-d: Add debugfs support for Intel IOMMU internals Sohil Mehta
2017-11-22 19:25     ` Sohil Mehta
2017-11-22 19:25   ` [PATCH v2 2/6] iommu/vt-d: Add Intel IOMMU debugfs to show context internals Sohil Mehta
2017-11-22 19:25     ` Sohil Mehta
2017-11-22 19:25   ` [PATCH v2 3/6] iommu/vt-d: Add Intel IOMMU debugfs to show extended " Sohil Mehta
2017-11-22 19:25     ` Sohil Mehta
2017-11-22 19:25   ` [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents Sohil Mehta
2017-11-22 19:25     ` Sohil Mehta
     [not found]     ` <1511378746-109275-5-git-send-email-sohil.mehta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-11-22 21:19       ` Andy Shevchenko [this message]
2017-11-22 21:19         ` Andy Shevchenko
2017-11-27 20:52         ` Kammela, Gayatri
2017-11-28  0:02           ` Mehta, Sohil
2017-11-28 12:15             ` Andy Shevchenko
     [not found]           ` <2824B99DC70CE746926327C52CA42F76378EA17D-8oqHQFITsIGkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-11-28 13:55             ` Andy Shevchenko
2017-11-28 13:55               ` Andy Shevchenko
2017-11-22 19:25   ` [PATCH v2 5/6] iommu/vt-d: Add debugfs extension to show Pasid table contents Sohil Mehta
2017-11-22 19:25     ` Sohil Mehta
2017-11-22 19:25   ` [PATCH v2 6/6] iommu/vt-d: Add debugfs support for Intel IOMMU Interrupt remapping Sohil Mehta
2017-11-22 19:25     ` Sohil Mehta
     [not found]     ` <1511378746-109275-7-git-send-email-sohil.mehta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-11-22 21:18       ` Andy Shevchenko
2017-11-22 21:18         ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1511385559.25007.415.camel@linux.intel.com \
    --to=andriy.shevchenko-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=fenghua.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=gayatri.kammela-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ravi.v.shankar-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=sohil.mehta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.