* [PATCH v2] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
@ 2023-07-13 2:56 Minjie Du
2023-07-13 6:51 ` Thierry Reding
0 siblings, 1 reply; 3+ messages in thread
From: Minjie Du @ 2023-07-13 2:56 UTC (permalink / raw)
To: Thierry Reding, Krishna Reddy, Joerg Roedel, Will Deacon,
Robin Murphy, Jonathan Hunter, open list:TEGRA IOMMU DRIVERS,
open list:IOMMU SUBSYSTEM, open list
Cc: opensource.kernel, Minjie Du
debugfs_create_file() will simply return early if
smmu->debugfs is an error pointer.
Make smmu->debugfs check delete in tegra_smmu_debugfs_init().
Signed-off-by: Minjie Du <duminjie@vivo.com>
---
drivers/iommu/tegra-smmu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 1cbf063cc..2137040b7 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1056,8 +1056,6 @@ DEFINE_SHOW_ATTRIBUTE(tegra_smmu_clients);
static void tegra_smmu_debugfs_init(struct tegra_smmu *smmu)
{
smmu->debugfs = debugfs_create_dir("smmu", NULL);
- if (!smmu->debugfs)
- return;
debugfs_create_file("swgroups", S_IRUGO, smmu->debugfs, smmu,
&tegra_smmu_swgroups_fops);
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
2023-07-13 2:56 [PATCH v2] iommu: remove redundant parameter check in tegra_smmu_debugfs_init() Minjie Du
@ 2023-07-13 6:51 ` Thierry Reding
2023-07-13 9:20 ` Markus Elfring
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2023-07-13 6:51 UTC (permalink / raw)
To: Minjie Du
Cc: Krishna Reddy, Joerg Roedel, Will Deacon, Robin Murphy,
Jonathan Hunter, open list:TEGRA IOMMU DRIVERS,
open list:IOMMU SUBSYSTEM, open list, opensource.kernel
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
On Thu, Jul 13, 2023 at 10:56:53AM +0800, Minjie Du wrote:
> debugfs_create_file() will simply return early if
> smmu->debugfs is an error pointer.
The formatting is a little weird here.
> Make smmu->debugfs check delete in tegra_smmu_debugfs_init().
I think something like this is better:
Delete smmu->debugfs check in ...
Or perhaps combine both sentences:
debugfs_create_file() will return early if smmu->debugfs is an error
pointer, so an extra error check is not needed.
With that fixed:
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
2023-07-13 6:51 ` Thierry Reding
@ 2023-07-13 9:20 ` Markus Elfring
0 siblings, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2023-07-13 9:20 UTC (permalink / raw)
To: Thierry Reding, Minjie Du, linux-tegra, kernel-janitors, iommu,
Jörg Rödel, Jonathan Hunter, Krishna Reddy,
Robin Murphy, Will Deacon
Cc: opensource.kernel, LKML
> debugfs_create_file() will return early if smmu->debugfs is an error
> pointer, so an extra error check is not needed.
>
> With that fixed:
>
> Acked-by: Thierry Reding <treding@nvidia.com>
Are there any risks to consider with your presentation of this tag “in advance”?
I would also appreciate another improved imperative change description.
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n94
Would a subject like “[PATCH v3] iommu: Remove redundant error check in tegra_smmu_debugfs_init()”
be more appropriate?
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-13 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 2:56 [PATCH v2] iommu: remove redundant parameter check in tegra_smmu_debugfs_init() Minjie Du
2023-07-13 6:51 ` Thierry Reding
2023-07-13 9:20 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox