From: Deepak R Varma <drv@mailo.com>
To: James Bottomley <jejb@linux.ibm.com>
Cc: Khalid Aziz <khalid@gonehiking.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Saurabh Singh Sengar <ssengar@microsoft.com>,
Praveen Kumar <kumarpraveen@linux.microsoft.com>
Subject: Re: [PATCH] scsi: FlashPoint: Replace arithmetic addition by bitwise OR
Date: Tue, 7 Feb 2023 23:16:32 +0530 [thread overview]
Message-ID: <Y+KOeP0OOiem3lR5@ubun2204.myguest.virtualbox.org> (raw)
In-Reply-To: <9a78cdd254d5d962450242d2e01c3a0f702a63a0.camel@linux.ibm.com>
On Tue, Feb 07, 2023 at 03:26:48PM +0300, James Bottomley wrote:
> On Tue, 2023-02-07 at 16:51 +0530, Deepak R Varma wrote:
> > When adding two bit-field mask values, an OR operation offers higher
> > performance over an arithmetic operation. So, convert such additions
> > to an OR based expressions. Issue identified using orplus.cocci
> > semantic patch script.
>
> No it doesn't, at least not for constants, which is the entirety of
> this patch: the compiler can find the value at compile time, so the
> whole lot becomes a load immediate of a single value. Whether the
> compiler sees OR or + is immaterial to the compile time computation.
Hello James,
Thank you for the feedback. Your comments are useful. I was not aware of the
compile time computation of constant expressions before. Thanks.
> Perhaps Coccinelle should be fixed not to complain about this case?
Yes, sure. I will review the semantic patch and deterrmine if and how to fine
tune the same to avoid false positives.
>
> James
James, there are a few other patch submissions for the scsi subsystem that I
submitted in last few weeks. I sent couple of reminder request for comments on
those submission, but still waiting. Could you please also review those and
share your feedback?
Best Regards,
deepak.
>
next prev parent reply other threads:[~2023-02-07 17:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 11:21 Deepak R Varma
2023-02-07 12:26 ` James Bottomley
2023-02-07 15:28 ` Khalid Aziz
2023-02-07 17:48 ` Deepak R Varma
2023-02-07 17:46 ` Deepak R Varma [this message]
2023-02-07 19:25 ` James Bottomley
2023-02-07 20:19 ` Martin K. Petersen
2023-02-09 7:32 ` Deepak R Varma
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=Y+KOeP0OOiem3lR5@ubun2204.myguest.virtualbox.org \
--to=drv@mailo.com \
--cc=jejb@linux.ibm.com \
--cc=khalid@gonehiking.org \
--cc=kumarpraveen@linux.microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ssengar@microsoft.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®