lkml.org 
[lkml]   [2007]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] intel-iommu fixes
Date
From
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/

\
 
 \ /
  Last update: 2007-10-29 17:45    [W:0.304 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site