LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Hook, Gary" <ghook@amd.com>
To: Robin Murphy <robin.murphy@arm.com>,
	"Mehta, Sohil" <sohil.mehta@intel.com>,
	"gary.hook@amd.com" <gary.hook@amd.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU
Date: Tue, 17 Apr 2018 14:06:47 -0400	[thread overview]
Message-ID: <e5e8c59f-ebaa-1b87-713a-ee9ab9c3b5d1@amd.com> (raw)
In-Reply-To: <80b1e9e5-3048-391a-6d7d-adeeece1bf46@arm.com>

On 4/17/2018 1:55 PM, Robin Murphy wrote:
> On 17/04/18 18:36, Hook, Gary wrote:
>> On 4/13/2018 7:55 PM, Mehta, Sohil wrote:
>>> On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote:
>>>> +struct dentry *iommu_debugfs_setup(void)
>>>> +{
>>>> +    if (!debugfs_initialized())
>>>
>>> This check is probably not needed.
>>
>> Ah, so it isn't. Thank you.
>>
>>>
>>>> +        return NULL;
>>>> +
>>>> +    if (!iommu_debugfs_dir)
>>>> +        iommu_debugfs_dir = debugfs_create_dir("iommu",
>>>> NULL);
>>>> +
>>>> +    if (iommu_debugfs_dir)
>>>> +        pr_warn("WARNING: IOMMU DEBUGFS SUPPORT HAS BEEN
>>>> ENABLED IN THIS KERNEL\n");
>>>> +
>>>
>>> As this gets called for each IOMMU, do you want to use pr_warn_once?
>>
>> That works, yes.
> 
> Or I guess you could just roll the pr_warn() into the previous if() 
> condition, i.e. only warn when the singleton debugfs_dir is actually 
> created.

That makes more sense for a code path this isn't going to be hit more 
than a few times at most.

> 
> Robin.
> 
>>
>>>
>>>> +    return iommu_debugfs_dir;
>>>> +}
>>>> +EXPORT_SYMBOL_GPL(iommu_debugfs_setup);
>>>
>>> -Sohil
>>>
>>
>> _______________________________________________
>> iommu mailing list
>> iommu@lists.linux-foundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2018-04-17 18:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-06 13:17 [PATCH v3 0/2] Base enablement of IOMMU debugfs support Gary R Hook
2018-04-06 13:17 ` [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU Gary R Hook
2018-04-13 23:55   ` Mehta, Sohil
2018-04-17 17:36     ` Hook, Gary
2018-04-17 17:55       ` Robin Murphy
2018-04-17 18:06         ` Hook, Gary [this message]
2018-04-17 17:46   ` Hook, Gary
2018-04-17 18:13     ` Robin Murphy
2018-04-06 13:17 ` [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU Gary R Hook
2018-04-14  0:08   ` Mehta, Sohil
2018-04-17 17:38     ` Hook, Gary
2018-04-18  5:58       ` Yang, Shunyong
2018-04-18  7:27         ` Mehta, Sohil
2018-04-18  8:31           ` Yang, Shunyong
2018-04-18 20:16             ` Mehta, Sohil
2018-04-18 20:51               ` Hook, Gary
2018-04-19  1:52                 ` Yang, Shunyong
2018-04-30 19:57       ` Gary R Hook
2018-04-17  0:52   ` Mehta, Sohil
2018-04-17 17:42     ` Hook, Gary
2018-04-17 18:05       ` Robin Murphy

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=e5e8c59f-ebaa-1b87-713a-ee9ab9c3b5d1@amd.com \
    --to=ghook@amd.com \
    --cc=gary.hook@amd.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sohil.mehta@intel.com \
    --subject='Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).