Messages in this thread | | | Subject | Re: [PATCH] intel-iommu fixes | Date | Mon, 29 Oct 2007 10:25:54 -0500 | From | Mark Rustad <> |
| |
On Oct 28, 2007, at 11:51 PM, Al Viro wrote:
> * off by one in dmar_get_fault_reason() (maximal index in > array is ARRAY_SIZE()-1, not ARRAY_SIZE()) > * NULL noise removal > * __iomem annotation fix > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> > --- > diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c > index 0c4ab3b..9b35259 100644 > --- a/drivers/pci/intel-iommu.c > +++ b/drivers/pci/intel-iommu.c > @@ -745,7 +745,7 @@ static char *fault_reason_strings[] = > "non-zero reserved fields in PTE", > "Unknown" > }; > -#define MAX_FAULT_REASON_IDX ARRAY_SIZE(fault_reason_strings) > +#define MAX_FAULT_REASON_IDX ARRAY_SIZE(fault_reason_strings) - 1
This define now should really have ()'s around its value now that it is an expression to avoid potential problems at its reference sites.
<snip>
-- Mark Rustad, MRustad@gmail.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |