All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 3/3] x86/ucode: Drop MIS_UCODE and microcode_match_result
Date: Thu, 14 Nov 2024 12:41:59 +0100	[thread overview]
Message-ID: <aee06ffe-fb3d-41ab-a715-0bb057d4ca52@suse.com> (raw)
In-Reply-To: <20241112211915.1473121-4-andrew.cooper3@citrix.com>

On 12.11.2024 22:19, Andrew Cooper wrote:
> @@ -199,8 +198,8 @@ static bool microcode_fits_cpu(const struct microcode_patch *patch)
>      return equiv.id == patch->processor_rev_id;
>  }
>  
> -static enum microcode_match_result cf_check compare_patch(
> -    const struct microcode_patch *new, const struct microcode_patch *old)
> +static int cf_check compare_patch(
> +    const struct microcode_patch *old, const struct microcode_patch *new)
>  {

Let's hope we won't screw up a backport because of this swapping. I'd
like to ask to at least consider renaming at least the functions,
perhaps also the hook pointer, perhaps simply by switching from singular
to plural. This would then also avoid reviewers like me to go hunt for
all uses of the function/hook, in an attempt to make sure none was left
out when converting.

> @@ -54,11 +47,17 @@ struct microcode_ops {
>                             unsigned int flags);
>  
>      /*
> -     * Given two patches, are they both applicable to the current CPU, and is
> -     * new a higher revision than old?
> +     * Given a current patch, and a proposed new patch, order them based on revision.
> +     *
> +     * This operation is not necessarily symmetrical.  In some cases, a debug
> +     * "new" patch will always considered to be newer, on the expectation that
> +     * whomever is using debug patches knows exactly what they're doing.
>       */
> -    enum microcode_match_result (*compare_patch)(
> -        const struct microcode_patch *new, const struct microcode_patch *old);
> +#define OLD_UCODE  -1

Nit: I'm pretty sure Misra wants parentheses here.

Preferably with both (mechanical) adjustments:
Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan


  reply	other threads:[~2024-11-14 11:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 21:19 [PATCH v2 0/3] x86/ucode: Simplify/fix loading paths further Andrew Cooper
2024-11-12 21:19 ` [PATCH v2 1/3] x86/ucode: Remove the collect_cpu_info() call from parse_blob() Andrew Cooper
2024-11-14 11:11   ` Jan Beulich
2024-11-14 15:59     ` Andrew Cooper
2024-11-14 16:15       ` Jan Beulich
2024-11-14 17:20         ` Andrew Cooper
2024-11-12 21:19 ` [PATCH v2 2/3] x86/ucode: Fix cache handling in microcode_update_helper() Andrew Cooper
2024-11-14 11:26   ` Jan Beulich
2024-11-15 18:03     ` Andrew Cooper
2024-11-18  7:45       ` Jan Beulich
2024-11-12 21:19 ` [PATCH v2 3/3] x86/ucode: Drop MIS_UCODE and microcode_match_result Andrew Cooper
2024-11-14 11:41   ` Jan Beulich [this message]
2024-11-14 17:18     ` Andrew Cooper
2024-11-15  8:02       ` Jan Beulich
2024-11-15 16:50         ` Andrew Cooper

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=aee06ffe-fb3d-41ab-a715-0bb057d4ca52@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.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.