* [patch] iommu/vt-d: signedness bug in alloc_irte()
@ 2014-01-09 5:32 Dan Carpenter
[not found] ` <20140109053236.GE1265-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-01-09 5:32 UTC (permalink / raw)
To: Joerg Roedel, Jiang Liu
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
"index" needs to be signed for the error handling to work. I deleted a
little bit of obsolete cruft related to "index" and "start_index" as
well.
Fixes: 360eb3c5687e ('iommu/vt-d: use dedicated bitmap to track remapping entry allocation status')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index 78fba6212ed2..ef5f65dbafe9 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -71,18 +71,13 @@ static int alloc_irte(struct intel_iommu *iommu, int irq, u16 count)
struct ir_table *table = iommu->ir_table;
struct irq_2_iommu *irq_iommu = irq_2_iommu(irq);
struct irq_cfg *cfg = irq_get_chip_data(irq);
- u16 index, start_index;
unsigned int mask = 0;
unsigned long flags;
+ int index;
if (!count || !irq_iommu)
return -1;
- /*
- * start the IRTE search from index 0.
- */
- index = start_index = 0;
-
if (count > 1) {
count = __roundup_pow_of_two(count);
mask = ilog2(count);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] iommu/vt-d: signedness bug in alloc_irte()
[not found] ` <20140109053236.GE1265-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
@ 2014-01-09 12:06 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2014-01-09 12:06 UTC (permalink / raw)
To: Dan Carpenter
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Jiang Liu
On Thu, Jan 09, 2014 at 08:32:36AM +0300, Dan Carpenter wrote:
> "index" needs to be signed for the error handling to work. I deleted a
> little bit of obsolete cruft related to "index" and "start_index" as
> well.
>
> Fixes: 360eb3c5687e ('iommu/vt-d: use dedicated bitmap to track remapping entry allocation status')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks Dan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-09 12:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-09 5:32 [patch] iommu/vt-d: signedness bug in alloc_irte() Dan Carpenter
[not found] ` <20140109053236.GE1265-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2014-01-09 12:06 ` Joerg Roedel
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).