* [PATCH] iommu/vt-d: Delete unnecessary check
@ 2017-10-08 22:33 Christos Gkekas
2017-10-10 12:10 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Christos Gkekas @ 2017-10-08 22:33 UTC (permalink / raw)
To: David Woodhouse, Joerg Roedel, iommu, linux-kernel; +Cc: Christos Gkekas
Variable did_old is unsigned so checking whether it is greater or equal
to zero is not necessary.
Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
---
drivers/iommu/intel-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index ebb4835..cb7ce99 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2054,7 +2054,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
if (context_copied(context)) {
u16 did_old = context_domain_id(context);
- if (did_old >= 0 && did_old < cap_ndoms(iommu->cap)) {
+ if (did_old < cap_ndoms(iommu->cap)) {
iommu->flush.flush_context(iommu, did_old,
(((u16)bus) << 8) | devfn,
DMA_CCMD_MASK_NOBIT,
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu/vt-d: Delete unnecessary check
2017-10-08 22:33 [PATCH] iommu/vt-d: Delete unnecessary check Christos Gkekas
@ 2017-10-10 12:10 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2017-10-10 12:10 UTC (permalink / raw)
To: Christos Gkekas; +Cc: David Woodhouse, iommu, linux-kernel
On Sun, Oct 08, 2017 at 11:33:31PM +0100, Christos Gkekas wrote:
> Variable did_old is unsigned so checking whether it is greater or equal
> to zero is not necessary.
>
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
> ---
> drivers/iommu/intel-iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-10 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 22:33 [PATCH] iommu/vt-d: Delete unnecessary check Christos Gkekas
2017-10-10 12:10 ` 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.