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-06-24 21:03:17 +02:00
2021-06-29 13:33:10 -07:00
2021-07-05 11:48:14 -07:00
2021-07-06 20:14:42 -04:00
2021-06-26 11:40:20 -05:00
2021-07-05 12:10:34 -07:00
2021-07-03 04:50:56 -04:00
2021-07-05 11:21:51 -07:00
2021-07-05 14:16:22 -07:00
2021-07-01 16:57:14 -07:00
2021-07-10 09:22:44 -07:00
2021-07-07 11:12:01 -07:00
2021-07-10 09:22:44 -07:00
2021-07-05 13:42:16 -07:00
2021-06-25 12:26:49 +01:00
2021-07-09 09:43:57 -07:00
2021-07-05 14:16:22 -07:00
2021-06-25 15:02:43 +02:00
2021-06-25 15:02:43 +02:00
2021-07-07 13:30:01 -07:00
2021-06-23 07:33:55 -07:00
2021-07-01 07:32:14 +05:30
2021-07-01 11:06:04 -07:00
2021-06-29 10:53:48 -07:00
2021-06-30 12:21:16 -07:00
2021-07-09 12:05:33 -07:00
2021-06-30 15:34:13 -06:00
2021-07-09 12:05:33 -07:00
2021-07-08 11:48:20 -07:00
2021-06-30 20:47:25 -07:00
2021-07-08 11:48:22 -07:00
2021-07-02 15:14:36 -07:00
2021-06-30 11:37:02 -07:00
2021-06-22 16:53:17 +02:00
2021-07-08 11:48:21 -07:00
2021-07-01 11:06:06 -07:00
2021-06-30 14:33:25 -07:00
2021-07-02 12:08:10 -07:00
2021-07-01 11:06:06 -07:00
2021-07-01 11:06:06 -07:00
2021-06-30 14:33:25 -07:00
2021-06-30 19:45:42 +02:00
2021-07-05 12:44:23 +02:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:22 -07:00
2021-06-28 20:39:26 -07:00
2021-06-24 14:51:35 +08:00
2021-06-22 13:56:43 +02:00
2021-07-08 11:48:20 -07:00
2021-07-05 14:16:22 -07:00
2021-06-25 15:02:43 +02:00
2021-06-29 18:09:24 +02:00
2021-06-24 18:43:55 -06:00
2021-06-22 10:40:54 -07:00
2021-06-23 01:09:35 -07:00
2021-06-24 19:41:15 +02:00
2021-07-05 13:42:16 -07:00
2021-06-25 19:57:01 -04:00
2021-06-25 11:46:29 -07:00
2021-06-24 12:01:06 -06:00
2021-06-29 17:29:11 -07:00
2021-06-30 09:15:15 +02:00
2021-07-08 11:48:21 -07:00
2021-06-30 20:47:30 -07:00
2021-06-30 20:47:25 -07:00
2021-07-08 11:48:21 -07:00
2021-07-05 14:01:53 -07:00
2021-06-23 11:29:14 +02:00
2021-06-28 14:09:03 -07:00
2021-06-29 10:53:48 -07:00
2021-07-08 08:37:31 -04:00
2021-07-08 11:48:22 -07:00
2021-06-29 17:29:11 -07:00
2021-06-30 20:47:28 -07:00
2021-07-02 12:08:10 -07:00
2021-07-02 12:54:34 -07:00
2021-07-01 11:06:05 -07:00
2021-06-29 17:29:11 -07:00
2021-06-24 18:00:29 -04:00
2021-06-24 11:47:57 -04:00
2021-07-08 11:48:21 -07:00
2021-07-08 11:48:20 -07:00
2021-06-30 20:47:29 -07:00
2021-07-01 17:17:24 -07:00
2021-06-30 20:47:25 -07:00
2021-06-30 20:47:29 -07:00
2021-07-01 11:06:02 -07:00
2021-06-30 20:47:30 -07:00
2021-07-02 12:08:10 -07:00
2021-07-08 11:48:21 -07:00
2021-06-29 10:53:50 -07:00
2021-06-29 10:53:53 -07:00
2021-07-08 11:48:21 -07:00
2021-07-01 11:06:03 -07:00
2021-07-08 11:48:22 -07:00
2021-07-01 11:06:05 -07:00
2021-06-29 15:45:27 -07:00
2021-06-29 13:12:39 -04:00
2021-07-08 14:03:26 -04:00
2021-07-08 11:48:20 -07:00
2021-07-05 13:42:16 -07:00
2021-06-28 15:54:57 -07:00
2021-06-29 10:53:53 -07:00
2021-06-29 10:53:53 -07:00
2021-06-29 10:53:47 -07:00
2021-07-02 12:08:10 -07:00
2021-06-29 10:53:53 -07:00
2021-06-29 10:53:48 -07:00
2021-07-01 11:06:04 -07:00
2021-07-01 11:06:04 -07:00
2021-07-06 10:37:46 -05:00
2021-06-28 11:22:40 -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-08-20 17:10:43 -05:00
2021-07-08 11:48:21 -07:00
2021-07-08 11:48:20 -07:00
2021-07-08 11:48:22 -07:00
2021-06-23 19:15:16 +02:00
2021-06-30 15:51:09 -07:00
2021-06-30 19:12:19 +02:00
2021-06-24 19:41:14 +02:00
2021-07-01 11:06:03 -07:00
2021-07-08 11:48:20 -07:00
2021-06-28 12:22:06 -07:00
2021-06-22 11:28:51 -07:00
2021-07-08 11:48:21 -07:00
2021-07-01 11:06:05 -07:00
2021-07-08 11:48:20 -07:00
2021-07-02 12:08:10 -07:00
2021-07-08 11:48:21 -07:00
2021-07-01 11:06:06 -07:00
2021-06-29 15:45:27 -07:00
2021-06-29 10:53:49 -07:00
2021-06-24 15:49:32 +02:00
2021-06-29 11:34:48 -07:00
2021-07-01 11:06:05 -07:00
2021-07-01 11:06:05 -07:00
2021-07-01 11:06:03 -07:00
2021-07-01 11:06:03 -07:00
2021-07-08 11:48:21 -07:00
2021-07-01 11:06:04 -07:00
2021-06-28 12:22:06 -07:00
2021-06-28 14:12:26 -04:00
2021-06-29 11:51:25 -04:00
2021-06-25 09:58:51 +02:00
2021-06-28 20:39:26 -07:00
2021-06-30 20:47:27 -07:00
2021-07-08 07:49:01 -04:00
2021-07-08 07:49:01 -04:00
2021-07-08 11:48:21 -07:00
2021-06-29 10:53:54 -07:00
2021-06-30 12:12:56 -07:00
2021-06-22 10:01:17 -07:00