summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2016-12-16 14:28:40 +0100
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2016-12-19 09:05:20 -0500
commit6c206e4d99f2ed2a5a59875858e3beecc69b6474 (patch)
tree59831dec45a58d4e5cb353c92c4c20f14092c3f3 /arch
parentb5cab0da75c292ffa0fbd68dd2c820066b2842de (diff)
downloadlinux-0-day-6c206e4d99f2ed2a5a59875858e3beecc69b6474.tar.gz
linux-0-day-6c206e4d99f2ed2a5a59875858e3beecc69b6474.tar.xz
x86, swiotlb: Simplify pci_swiotlb_detect_override()
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> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/pci-swiotlb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
index b47edb8f52566..36049af2715eb 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -68,12 +68,10 @@ static struct dma_map_ops swiotlb_dma_ops = {
*/
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,