mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dou Liyang <douly.fnst@cn.fujitsu.com>
To: <x86@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <tglx@linutronix.de>, <mingo@kernel.org>, <hpa@zytor.com>,
	<bhe@redhat.com>, Dou Liyang <douly.fnst@cn.fujitsu.com>
Subject: [PATCH 1/2] x86/apic: Remove duplicate judgement of X86_64 in lapic_is_integrated()
Date: Thu, 7 Sep 2017 16:49:20 +0800	[thread overview]
Message-ID: <1504774161-7137-1-git-send-email-douly.fnst@cn.fujitsu.com> (raw)

The macro APIC_INTEGRATED(x) has already wrapped by CONFIG_X86_32. So
Invoke it directly.

But lapic_is_integrated() invokes APIC_INTEGRATED(x) with the duplicate
judgement of X86_64.

Remove the "#ifdef CONFIG_X86_64...". No functionality change.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 arch/x86/kernel/apic/apic.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 7834f73..63b3ae9 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -211,11 +211,7 @@ static inline int lapic_get_version(void)
  */
 static inline int lapic_is_integrated(void)
 {
-#ifdef CONFIG_X86_64
-	return 1;
-#else
 	return APIC_INTEGRATED(lapic_get_version());
-#endif
 }
 
 /*
-- 
2.5.5

             reply	other threads:[~2017-09-07  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07  8:49 Dou Liyang [this message]
2017-09-07  8:49 ` [PATCH 2/2] x86/apic: Convert APIC_INTEGRATED to lapic_is_integrated() in apic.c Dou Liyang

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=1504774161-7137-1-git-send-email-douly.fnst@cn.fujitsu.com \
    --to=douly.fnst@cn.fujitsu.com \
    --cc=bhe@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®