Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752310AbdGCCfJ (ORCPT ); Sun, 2 Jul 2017 22:35:09 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:61272 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752211AbdGCCfI (ORCPT ); Sun, 2 Jul 2017 22:35:08 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="20760945" Subject: Re: [PATCH v5 05/12] x86/apic: Unify interrupt mode setup for SMP-capable system To: Thomas Gleixner References: CC: , , , , , , , , , From: Dou Liyang Message-ID: Date: Mon, 3 Jul 2017 10:34:57 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.106] X-yoursite-MailScanner-ID: A99C747C653C.AC688 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: douly.fnst@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1026 Lines: 50 Hi Thomas, At 07/03/2017 02:07 AM, Thomas Gleixner wrote: > On Fri, 30 Jun 2017, Dou Liyang wrote: >> -static int __init apic_intr_mode_select(void) >> +static int __init apic_intr_mode_select(int *upmode) >> { >> /* Check kernel option */ >> if (disable_apic) { >> @@ -1206,12 +1208,30 @@ static int __init apic_intr_mode_select(void) >> if (!smp_found_config) { >> disable_ioapic_support(); >> >> - if (!acpi_lapic) >> + if (!acpi_lapic) { >> pr_info("APIC: ACPI MADT or MP tables are not detected\n"); >> + *upmode = true; > > That store and extra argument is pointless. > >> + >> + return APIC_VIRTUAL_WIRE_NO_CONFIG; > > You added an extra return code, which you can use exactly for that purpose > at the callsite. > Actually indeed. Great! Why didn't I think of that? > > Aside of that, if you use int * then use numbers, if you use bool then use > true/false. But mixing that is horrible. > Yes, it is, I will remove the 'upmode' argument. Thanks, dou. >> + } > > Thanks, > > tglx > > >