Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1528278
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit [ver #2] |
| Date | 2016-11-23 11:20 +0100 |
| Message-ID | <sGCOK-3Ax-7@gated-at.bofh.it> (permalink) |
| References | <sGCF4-3u2-47@gated-at.bofh.it> <sGC2m-30l-21@gated-at.bofh.it> <sGtBL-60o-3@gated-at.bofh.it> <sGtBL-60o-1@gated-at.bofh.it> <sGCF4-3u2-47@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
David Howells <dhowells@redhat.com> wrote:
> > > +#ifdef CONFIG_EFI
> > > + if (boot_params.secure_boot) {
> > > + set_bit(EFI_SECURE_BOOT, &efi.flags);
> > > + pr_info("Secure boot enabled\n");
> > > + }
> > > +#endif
> > > +
> >
> > Section 20 of Documentation/CodingStyle recommends IS_ENABLED()
> > instead of #ifdef.
>
> The problem is this:
>
> arch/x86/include/asm/bitops.h:75: undefined reference to `efi'
>
> To quote section 20: "... Thus, you still have to use an #ifdef if the code
> inside the block references symbols that will not exist if the condition is
> not met."
Okay, I take that back - it does actually work. However, should I follow the
scheme of the rest of the file?
David
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 6/6] efi: Add EFI_SECURE_BOOT bit [ver #2] David Howells <dhowells@redhat.com> - 2016-11-23 01:30 +0100
Re: [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit [ver #2] Lukas Wunner <lukas@wunner.de> - 2016-11-23 10:30 +0100
Re: [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit [ver #2] David Howells <dhowells@redhat.com> - 2016-11-23 11:10 +0100
Re: [PATCH 6/6] efi: Add EFI_SECURE_BOOT bit [ver #2] David Howells <dhowells@redhat.com> - 2016-11-23 11:20 +0100
csiph-web