All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Juergen Gross <jgross@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v2 1/3] x86, swiotlb: Simplify pci_swiotlb_detect_override()
Date: Fri, 16 Dec 2016 14:28:40 +0100	[thread overview]
Message-ID: <1481894922-28828-2-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1481894922-28828-1-git-send-email-geert+renesas@glider.be>

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

  reply	other threads:[~2016-12-16 13:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 13:28 [PATCH v2 0/3] swiotlb: Add swiotlb=noforce debug option Geert Uytterhoeven
2016-12-16 13:28 ` Geert Uytterhoeven [this message]
2016-12-16 13:28 ` [PATCH v2 2/3] swiotlb: Convert swiotlb_force from int to enum Geert Uytterhoeven
2017-01-04 17:57   ` Catalin Marinas
2017-01-04 18:25     ` Konrad Rzeszutek Wilk
2016-12-16 13:28 ` [PATCH v2 3/3] swiotlb: Add swiotlb=noforce debug option Geert Uytterhoeven
2016-12-19 13:38   ` Konrad Rzeszutek Wilk
2016-12-19 13:57     ` Geert Uytterhoeven
2016-12-19 14:31       ` Konrad Rzeszutek Wilk
2017-01-04 18:00   ` Catalin Marinas
2016-12-19 13:31 ` [PATCH v2 0/3] " Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1481894922-28828-2-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=boris.ostrovsky@oracle.com \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=david.vrabel@citrix.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.