From: Thomas Gleixner <tglx@linutronix.de>
To: "Bjorn Helgaas" <helgaas@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Bjorn Helgaas <bhelgaas@google.com>,
x86@kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] x86/pci: Add missing forward declaration for pci_numachip_init()
Date: Thu, 12 Aug 2021 17:14:50 +0200 [thread overview]
Message-ID: <87y296hez9.ffs@tglx> (raw)
In-Reply-To: <20210730211920.GA1099849@bjorn-Precision-5520>
On Fri, Jul 30 2021 at 16:19, Bjorn Helgaas wrote:
> On Thu, Jul 29, 2021 at 11:40:59PM +0000, Krzysztof Wilczyński wrote:
> What should be done with the pci_numachip_init() declaration in
> arch/x86/include/asm/numachip/numachip.h? It doesn't seem like we
> should have *two* declarations.
Right. Include that file in the C file and be done with it.
> The one in arch/x86/include/asm/numachip/numachip.h is:
>
> extern int __init pci_numachip_init(void);
>
> I'm not enough of a C language lawyer to know whether "__init" in a
> declaration is useful. It doesn't *seem* like it would be useful
> since this is not a definition and the compiler isn't generating code
> here. But "git grep __init include/ arch/*/include" finds quite a few
> of them.
__init on the prototype is not having any effect except perhaps
documentary value at least with current compilers.
The attribute magic is vague in both the C specification and the
compiler manuals, but that might change some day in the future. But in
which direction is unknown :)
Thanks,
tglx
next prev parent reply other threads:[~2021-08-12 15:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 23:40 [PATCH] x86/pci: Add missing forward declaration for pci_numachip_init() Krzysztof Wilczyński
2021-07-30 21:19 ` Bjorn Helgaas
2021-08-12 15:14 ` Thomas Gleixner [this message]
2021-08-12 16:11 ` Krzysztof Wilczyński
2021-08-12 15:05 ` Thomas Gleixner
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=87y296hez9.ffs@tglx \
--to=tglx@linutronix.de \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=helgaas@kernel.org \
--cc=hpa@zytor.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--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 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.