Re: [RFC PATCH] x86/sev: Cleanup vc_handle_msr()

From: Borislav Petkov
Date: Wed Nov 06 2024 - 14:51:32 EST


On Wed, Nov 06, 2024 at 01:40:47PM -0600, Tom Lendacky wrote:
> Is the !! necessary? It should have either 0 or 1 because of the boolean
> operation used to set it, right?

I was going to be overly cautious but integer promotion will make sure there
really is a 0 or a 1. So yeah, I can drop the !!.

>
> >
> > - if ((ret == ES_OK) && (!exit_info_1)) {
> > + if ((ret == ES_OK) && (!write)) {
>
> I guess the parentheses around "!write" can be removed while your at it.

Ack.

> Other than those two little things...
>
> Reviewed-by: Tom Lendacky <thomas.lendacky@xxxxxxx>

Thanks!

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette