iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
Subsystems (3)
PATCH v4 1/1 iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
debugfs_create_file() will return early if smmu->debugfs is an error pointer, so an extra error check is not needed.
--- drivers/iommu/tegra-smmu.c | 2 -- 1 file changed, 2 deletions(-)
drivers/iommu/tegra-smmu.c +0 -2
@@ -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);
Signature · 1 line
2.39.0
Quoted 8 lines · Minjie Du
debugfs_create_file()will return early ifsmmu->debugfsis an error pointer, so an extra error check is not needed.Signed-off-by Minjie Du <[email protected]>Acked-by Thierry Reding <[email protected]>--- drivers/iommu/tegra-smmu.c | 2 -- 1 file changed, 2 deletions(-)
Next time when you send a new version of a patch, please don't forget to add the change log after the tear line. This way, people can know how the patch evolved into this way.
Best regards,
baolu
Quoted 14 lines
drivers/iommu/tegra-smmu.c +0
-2@@ -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);
Hi baolu!
Thanks for your suggestion!
You say:
Quoted 1 line
Next time when you send a new version of a patch, please don't forget to add the change log after the tear line. This way, people can know how the patch evolved into this way.
Do I need to submit a new patch?
Regards,
Minjie
-----邮件原件-----
发件人: Baolu Lu <[email protected]>
发送时间: 2023年7月14日 10:31
收件人: 杜敏杰 <[email protected]>; Thierry Reding <[email protected]>; Krishna Reddy <[email protected]>; Joerg Roedel <[email protected]>; Will Deacon <[email protected]>; Robin Murphy <[email protected]>; Jonathan Hunter <[email protected]>; open list:TEGRA IOMMU DRIVERS <[email protected]>; open list:IOMMU SUBSYSTEM <[email protected]>; open list <[email protected]> 抄送: [email protected]; opensource.kernel <[email protected]>; Thierry Reding <[email protected]>
主题: Re: [PATCH v4] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
[Some people who received this message don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Quoted 8 lines · Minjie Du
debugfs_create_file()will return early ifsmmu->debugfsis an error pointer, so an extra error check is not needed.Signed-off-by Minjie Du <[email protected]>Acked-by Thierry Reding <[email protected]>--- drivers/iommu/tegra-smmu.c | 2 -- 1 file changed, 2 deletions(-)
Next time when you send a new version of a patch, please don't forget to add the change log after the tear line. This way, people can know how the patch evolved into this way.
Best regards,
baolu
Quoted 14 lines
drivers/iommu/tegra-smmu.c +0
-2@@ -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);
Quoted 7 lines · 杜敏杰
Hi baolu!
Thanks for your suggestion!
You say:
Quoted 1 line
Next time when you send a new version of a patch, please don't forget to add the change log after the tear line. This way, people can know how the patch evolved into this way.
Do I need to submit a new patch?
Oh no. Just a kind remind. :-)
Best regards,
baolu
Hi Baolu!
I will pay attention to this in future patch!
Thanks again!
regards,
Minjie
-----邮件原件-----
发件人: Baolu Lu <[email protected]>
发送时间: 2023年7月14日 10:51
收件人: 杜敏杰 <[email protected]>; Thierry Reding <[email protected]>; Krishna Reddy <[email protected]>; Joerg Roedel <[email protected]>; Will Deacon <[email protected]>; Robin Murphy <[email protected]>; Jonathan Hunter <[email protected]>; open list:TEGRA IOMMU DRIVERS <[email protected]>; open list:IOMMU SUBSYSTEM <[email protected]>; open list <[email protected]> 抄送: [email protected]; opensource.kernel <[email protected]>; Thierry Reding <[email protected]>
主题: Re: 回复: [PATCH v4] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Quoted 7 lines · 杜敏杰
Hi baolu!
Thanks for your suggestion!
You say:
Quoted 1 line
Next time when you send a new version of a patch, please don't forget to add the change log after the tear line. This way, people can know how the patch evolved into this way.
Do I need to submit a new patch?
Oh no. Just a kind remind. :-)
Best regards,
baolu
Quoted 5 lines · Minjie Du
debugfs_create_file()will return early ifsmmu->debugfsis an error pointer, so an extra error check is not needed.Signed-off-by Minjie Du<[email protected]>Acked-by Thierry Reding<[email protected]>
Greg keeps reminding that no error branch for debugfs, so
Best regards,
baolu
杜敏杰
Reviewed-by Lu BaoluHi Baolu!
It seems that 'smmu->debugfs' check is still needed. Then I will modify the patch.
Thanks!
regards,
Minjie
-----邮件原件-----
发件人: Baolu Lu <[email protected]>
发送时间: 2023年7月14日 10:58
收件人: 杜敏杰 <[email protected]>; Thierry Reding <[email protected]>; Krishna Reddy <[email protected]>; Joerg Roedel <[email protected]>; Will Deacon <[email protected]>; Robin Murphy <[email protected]>; Jonathan Hunter <[email protected]>; open list:TEGRA IOMMU DRIVERS <[email protected]>; open list:IOMMU SUBSYSTEM <[email protected]>; open list <[email protected]> 抄送: [email protected]; opensource.kernel <[email protected]>; Thierry Reding <[email protected]>
主题: Re: [PATCH v4] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
[Some people who received this message don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Quoted 5 lines · Minjie Du
debugfs_create_file()will return early ifsmmu->debugfsis an error pointer, so an extra error check is not needed.Signed-off-by Minjie Du<[email protected]>Acked-by Thierry Reding<[email protected]>
Greg keeps reminding that no error branch for debugfs, so
Best regards,
baolu
Quoted 8 lines · 杜敏杰
Hi Baolu!
It seems that '
smmu->debugfs' check is still needed. Then I will modify the patch.
Thanks!regards,
Minjie
Don't top-post, please. See Documentation/process/2.Process.rst and Documentation/process/submitting-patches.rst.
Also, how did you come to the above conclusion? Baolu said that Greg keeps reminding people that we shouldn't do error handling for debugfs and gave a Reviewed-by:, so why the 180?
Thierry
Quoted 22 lines
-----邮件原件-----
发件人: Baolu Lu <[email protected]>
发送时间: 2023年7月14日 10:58
收件人: 杜敏杰 <[email protected]>; Thierry Reding <[email protected]>; Krishna Reddy <[email protected]>; Joerg Roedel <[email protected]>; Will Deacon <[email protected]>; Robin Murphy <[email protected]>; Jonathan Hunter <[email protected]>; open list:TEGRA IOMMU DRIVERS <[email protected]>; open list:IOMMU SUBSYSTEM <[email protected]>; open list <[email protected]> 抄送: [email protected]; opensource.kernel <[email protected]>; Thierry Reding <[email protected]>
主题: Re: [PATCH v4] iommu: remove redundant parameter check integra_smmu_debugfs_init()[Some people who received this message don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Quoted 5 lines · Minjie Du
debugfs_create_file()will return early ifsmmu->debugfsis an error pointer, so an extra error check is not needed.Signed-off-by Minjie Du<[email protected]>Acked-by Thierry Reding<[email protected]>Greg keeps reminding that no error branch for debugfs, so
Reviewed-by Lu Baolu <[email protected]>Best regards,
baolu
Hi Thierry!
I misunderstood what Baolu meant, sorry.
I will submit a new patch.
Thanks!
regards,
Minjie
-----邮件原件-----
发件人: Thierry Reding <[email protected]>
发送时间: 2023年7月14日 16:41
收件人: 杜敏杰 <[email protected]>
抄送: Baolu Lu <[email protected]>; Krishna Reddy <[email protected]>; Joerg Roedel <[email protected]>; Will Deacon <[email protected]>; Robin Murphy <[email protected]>; Jonathan Hunter <[email protected]>; open list:TEGRA IOMMU DRIVERS <[email protected]>; open list:IOMMU SUBSYSTEM <[email protected]>; open list <[email protected]>; opensource.kernel <[email protected]>; Thierry Reding <[email protected]> 主题: Re: 回复: [PATCH v4] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
Quoted 8 lines · 杜敏杰
Hi Baolu!
It seems that '
smmu->debugfs' check is still needed. Then I will modify the patch.
Thanks!regards,
Minjie
Don't top-post, please. See Documentation/process/2.Process.rst and Documentation/process/submitting-patches.rst.
Also, how did you come to the above conclusion? Baolu said that Greg keeps reminding people that we shouldn't do error handling for debugfs and gave a Reviewed-by:, so why the 180?
Thierry
Quoted 32 lines
-----邮件原件-----
发件人: Baolu Lu <[email protected]>
发送时间: 2023年7月14日 10:58
收件人: 杜敏杰 <[email protected]>; Thierry Reding <[email protected]>; Krishna Reddy <[email protected]>; Joerg Roedel <[email protected]>; Will Deacon <[email protected]>; Robin Murphy <[email protected]>; Jonathan Hunter <[email protected]>; open list:TEGRA IOMMU DRIVERS <[email protected]>; open list:IOMMU SUBSYSTEM <[email protected]>; open list <[email protected]>
抄送: [email protected]; opensource.kernel <[email protected]>; Thierry Reding <[email protected]> 主题: Re: [PATCH v4] iommu: remove redundant parameter check integra_smmu_debugfs_init()[Some people who received this message don't often get email from [email protected]. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification ]Quoted 5 lines · Minjie Du
debugfs_create_file()will return early ifsmmu->debugfsis an error pointer, so an extra error check is not needed.Signed-off-by Minjie Du<[email protected]>Acked-by Thierry Reding<[email protected]>Greg keeps reminding that no error branch for debugfs, so
Reviewed-by Lu Baolu <[email protected]>Best regards,
baolu