public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	stable@kernel.org, x86@kernel.org
Subject: Re: [PATCH] x86/microcode: Add microcode_loader_disabled() storage class for the !CONFIG_MICROCODE case
Date: Tue, 6 May 2025 12:57:08 +0200	[thread overview]
Message-ID: <aBnrBHfj_TM8gyit@gmail.com> (raw)
In-Reply-To: <20250505074703.GAaBhs99-ndCbFO6xl@fat_crate.local>


* Borislav Petkov <bp@alien8.de> wrote:

> On Mon, May 05, 2025 at 07:15:00AM +0200, Ingo Molnar wrote:
> > 
> > Fix this build bug:
> > 
> >   ./arch/x86/include/asm/microcode.h:27:13: warning: no previous prototype for ‘microcode_loader_disabled’ [-Wmissing-prototypes]
> > 
> > by adding the 'static' storage class to the !CONFIG_MICROCODE 
> > prototype.
> 
> Thanks, I'll merge it with my patch.

Please don't forcibly rebase trees like that, because you've just 
reintroduced a bug this way in tip:x86/urgent:

  # 5214a9f6c0f5 x86/microcode: Consolidate the loader enablement checking

  +static inline bool __init microcode_loader_disabled(void) { return false; }

static inlines don't need an __init tag ...

This was done correctly in the commit you removed:

  59e820c6de60 ("x86/microcode: Add microcode_loader_disabled() storage class for the !CONFIG_MICROCODE case")

  +static inline bool microcode_loader_disabled(void) { return false; }

> > Also, while at it, add all the other storage classes as well for this 
> > block of prototypes, 'extern' and 'static', respectively.
> 
> This I won't add as it is unnecessary.

Technically the 'int' in 'unsigned int' is 'unnecessary' and could be 
skipped as well with 'unsigned', right? Yet clean kernel code uses it 
because it's easier to read and more consistent. Likewise, the 'extern' 
storage class is a well-known and widespread way in the kernel to 
document public APIs, a counterpart to 'static'. Most of our major 
headers use that style.

Your change is a doubly poor choice in this particular case of 
<asm/microcode.h> as well, because the header continues with an 
'extern':

  extern unsigned long initrd_start_early;

So by dropping that cleanup you reintroduced an inconsistency as 
well...

Thanks,

	Ingo

  reply	other threads:[~2025-05-06 10:57 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-19  6:29 [PATCH] x86/microcode: Fix crashes on early 486 CPUs due to usage of 'cpuid' Oerg866
2024-10-19  9:49 ` Borislav Petkov
2024-10-19 14:06   ` Oerg866
2025-04-05  2:03 ` Kevin Koster
2025-04-05  9:32   ` Borislav Petkov
2025-04-05 20:33     ` H. Peter Anvin
2025-04-05 20:50       ` Borislav Petkov
2025-04-05 21:03         ` Borislav Petkov
2025-04-06  6:40     ` Kevin Koster
2025-04-06  7:46       ` Kevin Koster
2025-04-06 19:02         ` Borislav Petkov
2025-04-06 23:58           ` Kevin Koster
2025-04-07 10:29             ` Borislav Petkov
2025-04-07 14:21               ` Kevin Koster
2025-04-07 13:55                 ` Borislav Petkov
2025-04-07 14:28                   ` Oerg866
2025-04-08 10:37                     ` Maciej W. Rozycki
2025-04-08 17:22                   ` [PATCH] x86/microcode: Consolidate the loader enablement Borislav Petkov
2025-04-09  7:51                     ` Kevin Koster
2025-04-10 11:53                     ` Thomas Gleixner
2025-04-11 11:07                       ` Borislav Petkov
2025-04-14  9:59                         ` [PATCH -v2] x86/microcode: Consolidate the loader enablement checking Borislav Petkov
2025-04-14 10:48                           ` Ingo Molnar
2025-04-14 11:26                             ` Borislav Petkov
2025-05-03 10:51                               ` David Laight
2025-04-30 19:16                           ` Thomas Gleixner
2025-05-02 16:22                             ` Borislav Petkov
2025-05-02 19:15                               ` Thomas Gleixner
2025-04-07 14:38                 ` [PATCH] x86/microcode: Fix crashes on early 486 CPUs due to usage of 'cpuid' H. Peter Anvin
2025-04-07 23:20                   ` Kevin Koster
2025-04-07 18:10                 ` David Laight
2025-04-07 14:36               ` H. Peter Anvin
2025-04-08 10:16           ` Maciej W. Rozycki
2025-04-08 10:31             ` Borislav Petkov
2025-04-08 12:29               ` Maciej W. Rozycki
2025-04-08 17:28                 ` Borislav Petkov
2025-04-06 16:49       ` H. Peter Anvin
2025-05-03 15:14 ` [tip: x86/urgent] x86/microcode: Consolidate the loader enablement checking tip-bot2 for Borislav Petkov (AMD)
2025-05-04  6:14   ` Ingo Molnar
2025-05-05  5:15     ` [PATCH] x86/microcode: Add microcode_loader_disabled() storage class for the !CONFIG_MICROCODE case Ingo Molnar
2025-05-05  5:32       ` [tip: x86/microcode] " tip-bot2 for Ingo Molnar
2025-05-05  7:27       ` tip-bot2 for Ingo Molnar
2025-05-05  7:47       ` [PATCH] " Borislav Petkov
2025-05-06 10:57         ` Ingo Molnar [this message]
2025-05-06 12:19           ` Borislav Petkov
2025-05-06 10:44 ` [tip: x86/urgent] x86/microcode: Consolidate the loader enablement checking tip-bot2 for Borislav Petkov (AMD)

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=aBnrBHfj_TM8gyit@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=stable@kernel.org \
    --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