From: Thomas Gleixner <tglx@linutronix.de>
To: Shreenidhi Shedi <yesshedi@gmail.com>,
srivatsa@csail.mit.edu, amakhalov@vmware.com, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com
Cc: Shreenidhi Shedi <sshedi@vmware.com>,
pv-drivers@vmware.com, x86@kernel.org,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, yesshedi@gmail.com
Subject: Re: [PATCH v2] x86/vmware: use unsigned integer for shifting
Date: Sat, 21 May 2022 01:25:57 +0200 [thread overview]
Message-ID: <87pmk7iy62.ffs@tglx> (raw)
In-Reply-To: <20220520140954.597725-1-sshedi@vmware.com>
On Fri, May 20 2022 at 19:39, Shreenidhi Shedi wrote:
> From: Shreenidhi Shedi <yesshedi@gmail.com>
>
> From: Shreenidhi Shedi <sshedi@vmware.com>
Can you please decide which of your personalities wrote that patch?
> Shifting signed 32-bit value by 31 bits is implementation-defined
> behaviour. Using unsigned is better option for this.
Better option? There are no options. It's either correct or not. Please
be precise and technical in your wording.
> Fixes: 4cca6ea04d31 ("x86/apic: Allow x2apic without IR on VMware platform")
>
> Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Please keep the tags together. This extra new line is pointless and
makes the maintainer do extra work to remove it.
Documentation/process/* has all the relevant directives for
you. Following them is not an option. It's mandatory.
> @@ -476,8 +477,8 @@ static bool __init vmware_legacy_x2apic_available(void)
> {
> uint32_t eax, ebx, ecx, edx;
> VMWARE_CMD(GETVCPU_INFO, eax, ebx, ecx, edx);
> - return (eax & (1 << VMWARE_CMD_VCPU_RESERVED)) == 0 &&
> - (eax & (1 << VMWARE_CMD_LEGACY_X2APIC)) != 0;
> + return !(eax & BIT(VMWARE_CMD_VCPU_RESERVED)) &&
> + (eax & BIT(VMWARE_CMD_LEGACY_X2APIC))
Testing your changes before submission is not optional either. How is
this supposed to compile?
Thanks,
tglx
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Shreenidhi Shedi <yesshedi@gmail.com>,
srivatsa@csail.mit.edu, amakhalov@vmware.com, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com
Cc: virtualization@lists.linux-foundation.org, pv-drivers@vmware.com,
x86@kernel.org, linux-kernel@vger.kernel.org, yesshedi@gmail.com,
Shreenidhi Shedi <sshedi@vmware.com>
Subject: Re: [PATCH v2] x86/vmware: use unsigned integer for shifting
Date: Sat, 21 May 2022 01:25:57 +0200 [thread overview]
Message-ID: <87pmk7iy62.ffs@tglx> (raw)
In-Reply-To: <20220520140954.597725-1-sshedi@vmware.com>
On Fri, May 20 2022 at 19:39, Shreenidhi Shedi wrote:
> From: Shreenidhi Shedi <yesshedi@gmail.com>
>
> From: Shreenidhi Shedi <sshedi@vmware.com>
Can you please decide which of your personalities wrote that patch?
> Shifting signed 32-bit value by 31 bits is implementation-defined
> behaviour. Using unsigned is better option for this.
Better option? There are no options. It's either correct or not. Please
be precise and technical in your wording.
> Fixes: 4cca6ea04d31 ("x86/apic: Allow x2apic without IR on VMware platform")
>
> Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Please keep the tags together. This extra new line is pointless and
makes the maintainer do extra work to remove it.
Documentation/process/* has all the relevant directives for
you. Following them is not an option. It's mandatory.
> @@ -476,8 +477,8 @@ static bool __init vmware_legacy_x2apic_available(void)
> {
> uint32_t eax, ebx, ecx, edx;
> VMWARE_CMD(GETVCPU_INFO, eax, ebx, ecx, edx);
> - return (eax & (1 << VMWARE_CMD_VCPU_RESERVED)) == 0 &&
> - (eax & (1 << VMWARE_CMD_LEGACY_X2APIC)) != 0;
> + return !(eax & BIT(VMWARE_CMD_VCPU_RESERVED)) &&
> + (eax & BIT(VMWARE_CMD_LEGACY_X2APIC))
Testing your changes before submission is not optional either. How is
this supposed to compile?
Thanks,
tglx
next prev parent reply other threads:[~2022-05-20 23:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 14:09 [PATCH v2] x86/vmware: use unsigned integer for shifting Shreenidhi Shedi
2022-05-20 15:41 ` Srivatsa S. Bhat
2022-05-20 15:41 ` Srivatsa S. Bhat
2022-05-20 23:25 ` Thomas Gleixner [this message]
2022-05-20 23:25 ` Thomas Gleixner
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=87pmk7iy62.ffs@tglx \
--to=tglx@linutronix.de \
--cc=amakhalov@vmware.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pv-drivers@vmware.com \
--cc=srivatsa@csail.mit.edu \
--cc=sshedi@vmware.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
--cc=yesshedi@gmail.com \
/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.