提交 6c206e4d 编写于 作者: G Geert Uytterhoeven 提交者: Konrad Rzeszutek Wilk

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: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 b5cab0da
...@@ -68,12 +68,10 @@ static struct dma_map_ops swiotlb_dma_ops = { ...@@ -68,12 +68,10 @@ static struct dma_map_ops swiotlb_dma_ops = {
*/ */
int __init pci_swiotlb_detect_override(void) int __init pci_swiotlb_detect_override(void)
{ {
int use_swiotlb = swiotlb | swiotlb_force;
if (swiotlb_force) if (swiotlb_force)
swiotlb = 1; swiotlb = 1;
return use_swiotlb; return swiotlb;
} }
IOMMU_INIT_FINISH(pci_swiotlb_detect_override, IOMMU_INIT_FINISH(pci_swiotlb_detect_override,
pci_xen_swiotlb_detect, pci_xen_swiotlb_detect,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册