lkml.org 
[lkml]   [2023]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] scsi: FlashPoint: Replace arithmetic addition by bitwise OR
    On Tue, Feb 07, 2023 at 08:28:22AM -0700, Khalid Aziz wrote:
    > On 2/7/23 05:26, 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.
    > > Perhaps Coccinelle should be fixed not to complain about this case?
    > >
    > > James
    > >
    >
    > Agreed. This would be lot of code changes for no benefit.

    Hi Khalid,
    I understand. Please disregard/drop the patch proposal.

    Regards,
    deepak.

    >
    > --
    > Khalid


    \
     
     \ /
      Last update: 2023-03-27 00:14    [W:9.171 / U:0.468 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site