x86, swiotlb: Simplify pci_swiotlb_detect_override()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 16 Dec 2016 13:28:40 +0000 (14:28 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 19 Dec 2016 14:05:20 +0000 (09:05 -0500)
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>
arch/x86/kernel/pci-swiotlb.c

index b47edb8f52566e223f89800b5b0465349331985a..36049af2715ebd13a5a463ddea442cfc24e5c9ab 100644 (file)
@@ -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,