login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
29
Re: [PATCH] intel-iommu fixes
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Mark Gross <mgross@...>
To: Al Viro <viro@...>
Cc: Linus Torvalds <torvalds@...>, <anil.s.keshavamurthy@...>, <linux-kernel@...>
Subject:
Re: [PATCH] intel-iommu fixes
Date: Monday, October 29, 2007 - 12:52 pm
On Mon, Oct 29, 2007 at 04:51:16AM +0000, Al Viro wrote:
quoted text
> * 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
Probably should be +#define MAX_FAULT_REASON_IDX (ARRAY_SIZE(fault_reason_strings) - 1)
quoted text
> > char *dmar_get_fault_reason(u8 fault_reason) > { > @@ -995,7 +995,6 @@ static struct intel_iommu *alloc_iommu(struct dmar_drhd_unit *drhd) > return iommu; > error_unmap: > iounmap(iommu->reg); > - iommu->reg = 0; > error: > kfree(iommu); > return NULL; > @@ -1808,7 +1807,7 @@ get_valid_domain_for_dev(struct pci_dev *pdev) > if (!domain) { > printk(KERN_ERR > "Allocating domain for %s failed", pci_name(pdev)); > - return 0; > + return NULL; > } > > /* make sure context mapping is ok */ > @@ -1818,7 +1817,7 @@ get_valid_domain_for_dev(struct pci_dev *pdev) > printk(KERN_ERR > "Domain context map for %s failed", > pci_name(pdev)); > - return 0; > + return NULL; > } > } > > diff --git a/drivers/pci/intel-iommu.h b/drivers/pci/intel-iommu.h > index ee88dd2..459ad1f 100644 > --- a/drivers/pci/intel-iommu.h > +++ b/drivers/pci/intel-iommu.h > @@ -58,7 +58,7 @@ > hi = readl(dmar + reg + 4); \ > (((u64) hi) << 32) + lo; }) > */ > -static inline u64 dmar_readq(void *addr) > +static inline u64 dmar_readq(void __iomem *addr) > { > u32 lo, hi; > lo = readl(addr);
Looks good to me. ACK --mgross -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] intel-iommu fixes
, Al Viro
, (Mon Oct 29, 12:51 am)
Re: [PATCH] intel-iommu fixes
, Denys Vlasenko
, (Fri Nov 16, 3:14 am)
Re: [PATCH] intel-iommu fixes
, Mark Gross
, (Mon Oct 29, 12:52 pm)
Re: [PATCH] intel-iommu fixes
, Mark Rustad
, (Mon Oct 29, 11:25 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Parag Warudkar
BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0]
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
git
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Arjan van de Ven
Re: [GIT]: Networking
David Miller
Re: [BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
2 users
and
920 guests
online.
Online users
strcmp
muebcas98
Syndicate