Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: kernel test robot <lkp@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [ardb:for-kernelci 15/18] arch/x86/boot/startup/sev-startup.c:141:15: error: '__section__' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties
Date: Thu, 8 May 2025 18:39:14 +0100	[thread overview]
Message-ID: <20250508173914.GA2060049@ax162> (raw)
In-Reply-To: <CAMj1kXGQNyHw57bp-iHU0qgYBKwBS1SSJbq5X9BQkCvKLJFyrw@mail.gmail.com>

On Thu, May 08, 2025 at 07:22:14PM +0200, Ard Biesheuvel wrote:
> > > > >> arch/x86/boot/startup/sev-startup.c:141:15: error: '__section__' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties
> > > >      141 | static struct __init cc_blob_sev_info *find_cc_blob(struct boot_params *bp)
> > > >          |               ^
> >
> > I think this should should be
> >
> >   static __init struct cc_blob_sev_info *find_cc_blob(struct boot_params *bp)
> >
> > or
> >
> >   static struct cc_blob_sev_info __init *find_cc_blob(struct boot_params *bp)
> >
> > The __init is splitting the return type.
> >
> 
> Ah oops.
> 
> Now I'm surprised it even worked at all with GCC.

Yeah, you are not the first one to wonder that either :)

https://lore.kernel.org/CAHk-=wgf+kHeSZbpkZumWcTXUD7ordqTMvPRNL6aQVG1DSBDnQ@mail.gmail.com/

      parent reply	other threads:[~2025-05-08 17:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 16:19 [ardb:for-kernelci 15/18] arch/x86/boot/startup/sev-startup.c:141:15: error: '__section__' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties kernel test robot
2025-05-08 16:50 ` Ard Biesheuvel
2025-05-08 16:57   ` Nathan Chancellor
2025-05-08 17:22     ` Ard Biesheuvel
2025-05-08 17:22       ` Ard Biesheuvel
2025-05-08 17:39       ` Nathan Chancellor [this message]

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=20250508173914.GA2060049@ax162 \
    --to=nathan@kernel.org \
    --cc=ardb@kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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