lkml.org 
[lkml]   [2023]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Subject: [PATCH] pci/msi: remove redundant calculation in msi_setup_msi_desc
Date
On Thu, Aug 24 2023 at 00:27, huangshaobo3@xiaomi.com wrote:
> On Wed, 23 Aug 2023 16:15:27 +0200, Thomas Gleixner wrote:
>> I'm not seeing what this solves:
>
>> > - if (control & PCI_MSI_FLAGS_64BIT)
>> > + if (desc.pci.msi_attrib.is_64)
>
>> Both variants resolve to a test of a bit and a conditional instruction
>> on the result. It's exactly zero difference in terms of "calculation".
>
>> So all this does is change the memory location to test. Not more not
>> less. It does not generate better code and does not save anything.
>
> It may not be appropriate to write to eliminate duplicate calculations,
> can it be proposed again with clean code?

What's wrong with the existing code?

\
 
 \ /
  Last update: 2023-08-24 11:05    [W:0.047 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site