From: "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>
To: Peter Zijlstra <peterz@infradead.org>,
Shreenidhi Shedi <yesshedi@gmail.com>
Cc: amakhalov@vmware.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
virtualization@lists.linux-foundation.org, pv-drivers@vmware.com,
x86@kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Shreenidhi Shedi <sshedi@vmware.com>
Subject: Re: [PATCH v3] x86/vmware: use unsigned integer for shifting
Date: Tue, 31 May 2022 14:51:53 +0200 [thread overview]
Message-ID: <5dfc62d1-5778-ed94-3f3e-54e12ee5e4e6@csail.mit.edu> (raw)
In-Reply-To: <YpIpL728ii08D9uK@worktop.programming.kicks-ass.net>
On 5/28/22 6:52 AM, Peter Zijlstra wrote:
> On Fri, May 27, 2022 at 11:27:37PM +0530, Shreenidhi Shedi wrote:
>> From: Shreenidhi Shedi <sshedi@vmware.com>
>>
>> Shifting signed 32-bit value by 31 bits is implementation-defined
>> behaviour. Using unsigned is better option for this.
>
> The kernel builds with -fno-strict-overflow and as such this behaviour
> is well defined.
>
Ah, I see. Thank you, Peter!
>> Fixes: 4cca6ea04d31 ("x86/apic: Allow x2apic without IR on VMware platform")
>
> Nothing broken, therefore nothing fixed.
>
Agreed.
I think using the BIT() macro still provides a nice readability
improvement. So, Shreenidhi, could you spin a new version of the patch
with the same code changes but with a different commit message about
using the BIT() macro to simplify the code, and also include a
clarification as to why the existing code is correct (which Peter
pointed out), please?
Thank you!
Regards,
Srivatsa
VMware Photon OS
prev parent reply other threads:[~2022-05-31 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 17:57 Shreenidhi Shedi
2022-05-28 13:52 ` Peter Zijlstra
2022-05-31 12:51 ` Srivatsa S. Bhat [this message]
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=5dfc62d1-5778-ed94-3f3e-54e12ee5e4e6@csail.mit.edu \
--to=srivatsa@csail.mit.edu \
--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=peterz@infradead.org \
--cc=pv-drivers@vmware.com \
--cc=sshedi@vmware.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®