Files
kernel_arpi/include/linux
Zhen Lei ca32b5310a PCI: Optimize pci_resource_len() to reduce kernel size
pci_resource_end() can be 0 only when pci_resource_start() is 0.
Otherwise, it is definitely an error. In this case, pci_resource_len()
should be regarded as 0. Therefore, determining whether
pci_resource_start() and pci_resource_end() are both 0 can be reduced to
determining only whether pci_resource_end() is 0.

Although only one condition judgment is reduced, the macro function
pci_resource_len() is widely referenced in the kernel. I used defconfig to
compile the latest kernel on X86, and its binary code size was reduced by
about 3KB.

  Before:
   [ 2] .rela.text        RELA             0000000000000000  093bfcb0
        0000000001a67168  0000000000000018   I      68     1     8

  After:
   [ 2] .rela.text        RELA             0000000000000000  093bfcb0
        0000000001a66598  0000000000000018   I      68     1     8

Link: https://lore.kernel.org/r/20210713072236.3043-1-thunder.leizhen@huawei.com
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2021-08-20 17:10:43 -05:00
..
2021-07-06 20:14:42 -04:00
2021-06-30 19:45:42 +02:00
2021-06-25 19:57:01 -04:00
2021-06-29 10:53:48 -07:00
2021-07-01 11:06:02 -07:00
2021-07-08 11:48:21 -07:00
2021-06-29 10:53:53 -07:00
2021-07-01 11:06:05 -07:00
2021-07-06 10:37:46 -05:00
2021-07-06 10:37:46 -05:00
2021-07-06 10:37:46 -05:00
2021-07-06 10:37:46 -05:00
2021-06-30 19:12:19 +02:00
2021-07-01 11:06:03 -07:00
2021-06-24 15:49:32 +02:00
2021-07-01 11:06:03 -07:00
2021-07-01 11:06:03 -07:00