Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543462
| From | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/3] x86, swiotlb: Simplify pci_swiotlb_detect_override() |
| Date | 2016-12-16 14:30 +0100 |
| Message-ID | <sP0Ke-4gJ-23@gated-at.bofh.it> (permalink) |
| References | <sP0Kd-4gJ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
At the end of the function, the local variable use_swiotlb has always
the same value as the global variable swiotlb. Hence drop the local
variable completely.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- New.
---
arch/x86/kernel/pci-swiotlb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index b47edb8f52566e22..36049af2715ebd13 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -68,12 +68,10 @@ void x86_swiotlb_free_coherent(struct device *dev, size_t size,
*/
int __init pci_swiotlb_detect_override(void)
{
- int use_swiotlb = swiotlb | swiotlb_force;
-
if (swiotlb_force)
swiotlb = 1;
- return use_swiotlb;
+ return swiotlb;
}
IOMMU_INIT_FINISH(pci_swiotlb_detect_override,
pci_xen_swiotlb_detect,
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/3] swiotlb: Add swiotlb=noforce debug option Geert Uytterhoeven <geert+renesas@glider.be> - 2016-12-16 14:30 +0100
[PATCH v2 2/3] swiotlb: Convert swiotlb_force from int to enum Geert Uytterhoeven <geert+renesas@glider.be> - 2016-12-16 14:30 +0100
[PATCH v2 3/3] swiotlb: Add swiotlb=noforce debug option Geert Uytterhoeven <geert+renesas@glider.be> - 2016-12-16 14:30 +0100
Re: [PATCH v2 3/3] swiotlb: Add swiotlb=noforce debug option Konrad Rzeszutek Wilk <konrad@darnok.org> - 2016-12-19 14:40 +0100
Re: [PATCH v2 3/3] swiotlb: Add swiotlb=noforce debug option Geert Uytterhoeven <geert@linux-m68k.org> - 2016-12-19 15:00 +0100
Re: [PATCH v2 3/3] swiotlb: Add swiotlb=noforce debug option Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-12-19 15:40 +0100
[PATCH v2 1/3] x86, swiotlb: Simplify pci_swiotlb_detect_override() Geert Uytterhoeven <geert+renesas@glider.be> - 2016-12-16 14:30 +0100
Re: [PATCH v2 0/3] swiotlb: Add swiotlb=noforce debug option Konrad Rzeszutek Wilk <konrad@darnok.org> - 2016-12-19 14:40 +0100
csiph-web