* [PATCH] drv: iommu: amd: Remove double zero check
@ 2020-07-22 6:44 Libing Zhou
2020-07-22 13:26 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Libing Zhou @ 2020-07-22 6:44 UTC (permalink / raw)
To: joro; +Cc: linux-kernel
The free_pages() does zero check, therefore remove double zero
check here.
Signed-off-by: Libing Zhou <libing.zhou@nokia-sbell.com>
---
drivers/iommu/amd/init.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 6ebd4825e320..60a8a70b0d4f 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -720,21 +720,14 @@ static void iommu_enable_ppr_log(struct amd_iommu *iommu)
static void __init free_ppr_log(struct amd_iommu *iommu)
{
- if (iommu->ppr_log == NULL)
- return;
-
free_pages((unsigned long)iommu->ppr_log, get_order(PPR_LOG_SIZE));
}
static void free_ga_log(struct amd_iommu *iommu)
{
#ifdef CONFIG_IRQ_REMAP
- if (iommu->ga_log)
- free_pages((unsigned long)iommu->ga_log,
- get_order(GA_LOG_SIZE));
- if (iommu->ga_log_tail)
- free_pages((unsigned long)iommu->ga_log_tail,
- get_order(8));
+ free_pages((unsigned long)iommu->ga_log, get_order(GA_LOG_SIZE));
+ free_pages((unsigned long)iommu->ga_log_tail, get_order(8));
#endif
}
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drv: iommu: amd: Remove double zero check
2020-07-22 6:44 [PATCH] drv: iommu: amd: Remove double zero check Libing Zhou
@ 2020-07-22 13:26 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2020-07-22 13:26 UTC (permalink / raw)
To: Libing Zhou; +Cc: linux-kernel
On Wed, Jul 22, 2020 at 02:44:50PM +0800, Libing Zhou wrote:
> The free_pages() does zero check, therefore remove double zero
> check here.
>
> Signed-off-by: Libing Zhou <libing.zhou@nokia-sbell.com>
> ---
> drivers/iommu/amd/init.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-22 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 6:44 [PATCH] drv: iommu: amd: Remove double zero check Libing Zhou
2020-07-22 13:26 ` Joerg Roedel
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.