linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-pci@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
	Robert Moore <robert.moore@intel.com>,
	Lv Zheng <lv.zheng@intel.com>
Subject: Re: [PATCH v1 2/2] PCI/ACPI: alloc ACPI to be built without PCI support
Date: Mon, 3 Dec 2018 09:02:15 -0500	[thread overview]
Message-ID: <d15a7ea7-6bb3-9f83-5251-0bdde92fcb36@kernel.org> (raw)
In-Reply-To: <20181203081942.GA2516@gmail.com>

On 12/3/2018 3:19 AM, Ingo Molnar wrote:
> 
> * Sinan Kaya <okaya@kernel.org> wrote:
> 
>> We are compiling PCI code today for systems with ACPI and no PCI
>> device present. Remove the useless code and reduce the tight
>> dependency.
>>
>> Signed-off-by: Sinan Kaya <okaya@kernel.org>
>> ---
>>   arch/x86/include/asm/pci_x86.h | 5 +++++
>>   drivers/acpi/Kconfig           | 1 -
>>   drivers/acpi/Makefile          | 2 +-
>>   drivers/acpi/internal.h        | 5 +++++
>>   drivers/pci/Makefile           | 2 +-
>>   include/acpi/acpi_drivers.h    | 5 +++++
>>   include/linux/acpi.h           | 6 ++++++
>>   include/linux/pci.h            | 4 ++++
>>   8 files changed, 27 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
>> index 959d618dbb17..940cf12e7d05 100644
>> --- a/arch/x86/include/asm/pci_x86.h
>> +++ b/arch/x86/include/asm/pci_x86.h
>> @@ -121,7 +121,12 @@ extern void __init dmi_check_pciprobe(void);
>>   extern void __init dmi_check_skip_isa_align(void);
>>   
>>   /* some common used subsys_initcalls */
>> +#ifdef CONFIG_PCI
>>   extern int __init pci_acpi_init(void);
>> +#else
>> +static inline int  __init pci_acpi_init(void)
>> +{ return -EINVAL; }
>> +#endif
> 
> No objections to removing the dependency, but that's nowhere near
> standard kernel style. ;-)
> 

Great,

> (There are similar problems elsewhere in the patch as well, please fix
> all of them.)

I sure can fix them but I copied the stub style from existing other stub
functions in the same file and did run checkpatch before submitting.

If you can point me to the specific ones you would like to see or give an
idea what it needs to look like, I can change it.

I saw three different styles as follows:

static inline int  __init pci_acpi_init(void) {}

static inline int  __init pci_acpi_init(void)
{}

static inline int  __init pci_acpi_init(void)
{
}


> 
> Thanks,
> 
> 	Ingo
> 


  reply	other threads:[~2018-12-03 14:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-01 20:41 [PATCH v1 1/2] PCI: Stub out read/write/raw/find functions Sinan Kaya
2018-12-01 20:41 ` [PATCH v1 2/2] PCI/ACPI: alloc ACPI to be built without PCI support Sinan Kaya
2018-12-02 17:43   ` Sinan Kaya
2018-12-03  8:19   ` Ingo Molnar
2018-12-03 14:02     ` Sinan Kaya [this message]
2018-12-17 19:28   ` Bjorn Helgaas
2018-12-17 19:27 ` [PATCH v1 1/2] PCI: Stub out read/write/raw/find functions Bjorn Helgaas
2018-12-18  1:52   ` Sinan Kaya

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=d15a7ea7-6bb3-9f83-5251-0bdde92fcb36@kernel.org \
    --to=okaya@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).