Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace == false if conditions with ! #23814

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Nov 29, 2022

Code is more consistent if using booleans as such (gn is type safe). Use if (!...) instead of if (... == false).

This is based on patterns noticed in #23777

@github-actions
Copy link

github-actions bot commented Nov 29, 2022

PR #23814: Size comparison from 2e2ae99 to d6de88b

Increases (9 builds for bl602, cc13x2_26x2, cyw30739, esp32, psoc6, qpg, telink)
platform target config section 2e2ae99 d6de88b change % change
bl602 lighting-app bl602+rpc .text 1092606 1092608 2 0.0
cc13x2_26x2 pump-app LP_CC2652R7 (read only) 689975 689983 8 0.0
.text 598564 598572 8 0.0
cyw30739 lock cyw930739m2evb_01 (read/write) 592026 592034 8 0.0
.app_xip_area 462980 462988 8 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544706 544714 8 0.0
.app_xip_area 426468 426476 8 0.0
esp32 all-clusters-app m5stack (read/write) 562692 562700 8 0.0
.flash.rodata 313664 313672 8 0.0
psoc6 all-clusters-minimal cy8ckit_062s2_43012 .debug_info 26773934 26773936 2 0.0
light cy8ckit_062s2_43012 .debug_info 22239727 22239728 1 0.0
qpg lock-app qpg6105+debug (read/write) 1116716 1116724 8 0.0
.text 563812 563820 8 0.0
telink thermostat tlsr9518adk80d text 554338 554340 2 0.0
Decreases (5 builds for bl602, bl702, cc13x2_26x2, psoc6, qpg)
platform target config section 2e2ae99 d6de88b change % change
bl602 lighting-app bl602 .text 1061278 1061274 -4 -0.0
bl702 lighting-app bl702 (read/write) 1196999 1196983 -16 -0.0
.debug_info 3915954 39159543 -1 -0.0
.text 957122 957120 -2 -0.0
cc13x2_26x2 pump-app LP_CC2652R7 (read/write) 159864 159856 -8 -0.0
psoc6 lock cy8ckit_062s2_43012 .debug_info 22459104 22459102 -2 -0.0
qpg lighting-app qpg6105+debug (read/write) 1150932 1150924 -8 -0.0
.text 598032 598024 -8 -0.0
Full report (42 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 2e2ae99 d6de88b change % change
bl602 lighting-app bl602 (read/write) 1377598 1377598 0 0.0
.bss 90041 90041 0 0.0
.data 9984 9984 0 0.0
.text 1061278 1061274 -4 -0.0
bl602+rpc (read/write) 1423270 1423270 0 0.0
.bss 98081 98081 0 0.0
.data 10376 10376 0 0.0
.text 1092606 1092608 2 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1196999 1196983 -16 -0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67166 67166 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4048 4048 0 0.0
.debug_abbrev 1524399 1524399 0 0.0
.debug_aranges 132432 132432 0 0.0
.debug_frame 485824 485824 0 0.0
.debug_info 3915954 39159543 -1 -0.0
.debug_line 5127011 5127011 0 0.0
.debug_loc 3373116 3373116 0 0.0
.debug_ranges 361256 361256 0 0.0
.debug_str 3475262 3475262 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116744 116744 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 568470 568470 0 0.0
.symtab 172080 172080 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
957122 957120 -2 -0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1285363 1285363 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75214 75214 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4576 4576 0 0.0
.debug_abbrev 1671502 1671502 0 0.0
.debug_aranges 140568 140568 0 0.0
.debug_frame 513248 513248 0 0.0
.debug_info 43456250 43456250 0 0.0
.debug_line 5517179 5517179 0 0.0
.debug_loc 3568382 3568382 0 0.0
.debug_ranges 384744 384744 0 0.0
.debug_str 3874855 3874855 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130456 130456 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 628624 628624 0 0.0
.symtab 190224 190224 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1030966 1030966 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 679443 679443 0 0.0
(read/write) 172092 172092 0 0.0
.bss 81228 81228 0 0.0
.data 3380 3380 0 0.0
.rodata 89923 89923 0 0.0
.text 589208 589208 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 643707 643707 0 0.0
(read/write) 157996 157996 0 0.0
.bss 80500 80500 0 0.0
.data 3380 3380 0 0.0
.rodata 79059 79059 0 0.0
.text 564328 564328 0 0.0
lock-ftd LP_CC2652R7 (read only) 676967 676967 0 0.0
(read/write) 172136 172136 0 0.0
.bss 78884 78884 0 0.0
.data 3304 3304 0 0.0
.rodata 77351 77351 0 0.0
.text 599136 599136 0 0.0
lock-mtd LP_CC2652R7 (read only) 661771 661771 0 0.0
(read/write) 182588 182588 0 0.0
.bss 74140 74140 0 0.0
.data 3304 3304 0 0.0
.rodata 103435 103435 0 0.0
.text 557856 557856 0 0.0
pump-app LP_CC2652R7 (read only) 689975 689983 8 0.0
(read/write) 159864 159856 -8 -0.0
.bss 78852 78852 0 0.0
.data 3296 3296 0 0.0
.rodata 90927 90927 0 0.0
.text 598564 598572 8 0.0
pump-controller-app LP_CC2652R7 (read only) 673819 673819 0 0.0
(read/write) 176116 176116 0 0.0
.bss 78948 78948 0 0.0
.data 3292 3292 0 0.0
.rodata 86427 86427 0 0.0
.text 586912 586912 0 0.0
shell LP_CC2652R7 (read only) 670654 670654 0 0.0
(read/write) 183200 183200 0 0.0
.bss 83548 83548 0 0.0
.data 3376 3376 0 0.0
.rodata 86670 86670 0 0.0
.text 583668 583668 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 588326 588326 0 0.0
.app_xip_area 464576 464576 0 0.0
.bss 66208 66208 0 0.0
.data 728 728 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592026 592034 8 0.0
.app_xip_area 462980 462988 8 0.0
.bss 71496 71496 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544706 544714 8 0.0
.app_xip_area 426468 426476 8 0.0
.bss 60736 60736 0 0.0
.data 684 684 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 976164 976164 0 0.0
.bss 152260 152260 0 0.0
.data 2168 2168 0 0.0
.text 821716 821716 0 0.0
BRD4161A+rs911x (read/write) 1037704 1037704 0 0.0
.bss 186736 186736 0 0.0
.data 2012 2012 0 0.0
.text 848936 848936 0 0.0
BRD4187C (read/write) 1149276 1149276 0 0.0
.bss 138656 138656 0 0.0
.data 2516 2516 0 0.0
.text 983508 983508 0 0.0
lock-app BRD4161A+wf200 (read/write) 1163272 1163272 0 0.0
.bss 158304 158304 0 0.0
.data 2020 2020 0 0.0
.text 1002928 1002928 0 0.0
window-app BRD4187C (read/write) 1141744 1141744 0 0.0
.bss 140072 140072 0 0.0
.data 2540 2540 0 0.0
.text 974536 974536 0 0.0
esp32 all-clusters-app c3devkit (read only) 1214750 1214750 0 0.0
(read/write) 1786726 1786726 0 0.0
.dram0.bss 76688 76688 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 256552 256552 0 0.0
.flash.text 1214750 1214750 0 0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1225503 1225503 0 0.0
(read/write) 562692 562700 8 0.0
.dram0.bss 82064 82064 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 313664 313672 8 0.0
.flash.text 1220119 1220119 0 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 662516 662516 0 0.0
.bss 77112 77112 0 0.0
.data 2104 2104 0 0.0
.text 564188 564188 0 0.0
light k32w0+release (read/write) 673152 673152 0 0.0
.bss 74912 74912 0 0.0
.data 2060 2060 0 0.0
.text 593452 593452 0 0.0
lock k32w0+release (read/write) 634044 634044 0 0.0
.bss 75672 75672 0 0.0
.data 2080 2080 0 0.0
.text 553564 553564 0 0.0
linux chip-tool-ipv6only arm64 (read only) 10450076 10450076 0 0.0
(read/write) 707713 707713 0 0.0
.bss 33905 33905 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 652008 652008 0 0.0
.dynamic 560 560 0 0.0
.got 13944 13944 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 519468 519468 0 0.0
.text 8272004 8272004 0 0.0
thermostat-no-ble arm64 (read only) 2387028 2387028 0 0.0
(read/write) 143665 143665 0 0.0
.bss 55329 55329 0 0.0
.data 1816 1816 0 0.0
.data.rel.ro 77256 77256 0 0.0
.dynamic 560 560 0 0.0
.got 5192 5192 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 145068 145068 0 0.0
.text 1998064 1998064 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2453760 2453760 0 0.0
.bss 215012 215012 0 0.0
.data 5872 5872 0 0.0
.text 1416404 1416404 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1190811 1190811 0 0.0
bss 145289 145289 0 0.0
rodata 144464 144464 0 0.0
text 819890 819890 0 0.0
nrf7002dk_nrf5340_cpuapp (read/write) 1360922 1360922 0 0.0
bss 105228 105228 0 0.0
rodata 211568 211568 0 0.0
text 759644 759644 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1136455 1136455 0 0.0
bss 144524 144524 0 0.0
rodata 120780 120780 0 0.0
text 790058 790058 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841968 841968 0 0.0
(read/write) 1748508 1748508 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188712 188712 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1235893 1235893 0 0.0
.debug_aranges 110752 110752 0 0.0
.debug_frame 371636 371636 0 0.0
.debug_info 27036434 27036434 0 0.0
.debug_line 3691218 3691218 0 0.0
.debug_loc 3616190 3616190 0 0.0
.debug_ranges 340824 340824 0 0.0
.debug_str 3444785 3444785 0 0.0
.heap 841968 841968 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 571547 571547 0 0.0
.symtab 422000 422000 0 0.0
.text 0 0 0 0.0
1548744 1548744 0 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842704 842704 0 0.0
(read/write) 1691028 1691028 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187976 187976 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1227784 1227784 0 0.0
.debug_aranges 110224 110224 0 0.0
.debug_frame 374692 374692 0 0.0
.debug_info 26773934 26773936 2 0.0
.debug_line 3712198 3712198 0 0.0
.debug_loc 3603796 3603796 0 0.0
.debug_ranges 339440 339440 0 0.0
.debug_str 3433797 3433797 0 0.0
.heap 842704 842704 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 535636 535636 0 0.0
.symtab 408432 408432 0 0.0
.text 1492000 1492000 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850888 850888 0 0.0
(read/write) 1609244 1609244 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180000 180000 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1062307 1062307 0 0.0
.debug_aranges 102424 102424 0 0.0
.debug_frame 345028 345028 0 0.0
.debug_info 22239727 22239728 1 0.0
.debug_line 3281552 3281552 0 0.0
.debug_loc 3301716 3301716 0 0.0
.debug_ranges 304704 304704 0 0.0
.debug_str 3239383 3239383 0 0.0
.heap 850888 850888 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 471961 471961 0 0.0
.symtab 376800 376800 0 0.0
.text 1418400 1418400 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845896 845896 0 0.0
(read/write) 1642596 1642596 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184976 184976 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1064298 1064298 0 0.0
.debug_aranges 102816 102816 0 0.0
.debug_frame 346848 346848 0 0.0
.debug_info 22459104 22459102 -2 -0.0
.debug_line 3276280 3276280 0 0.0
.debug_loc 3323104 3323104 0 0.0
.debug_ranges 306080 306080 0 0.0
.debug_str 3255275 3255275 0 0.0
.heap 845896 845896 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 473677 473677 0 0.0
.symtab 378416 378416 0 0.0
.text 1446760 1446760 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1150932 1150924 -8 -0.0
.bss 97628 97628 0 0.0
.data 840 840 0 0.0
.text 598032 598024 -8 -0.0
lock-app qpg6105+debug (read/write) 1116716 1116724 8 0.0
.bss 93100 93100 0 0.0
.data 836 836 0 0.0
.text 563812 563820 8 0.0
telink all-clusters-app tlsr9518adk80d (read/write) 939068 939068 0 0.0
bss 81620 81620 0 0.0
noinit 43440 43440 0 0.0
text 650276 650276 0 0.0
all-clusters-minimal-app tlsr9518adk80d (read/write) 877036 877036 0 0.0
bss 80844 80844 0 0.0
noinit 43440 43440 0 0.0
text 614230 614230 0 0.0
light-switch-app tlsr9518adk80d (read/write) 792184 792184 0 0.0
bss 72468 72468 0 0.0
noinit 43520 43520 0 0.0
text 555364 555364 0 0.0
lighting-app tlsr9518adk80d (read/write) 876576 876576 0 0.0
bss 82232 82232 0 0.0
noinit 43520 43520 0 0.0
text 625616 625616 0 0.0
ota-requestor-app tlsr9518adk80d (read/write) 806552 806552 0 0.0
bss 74040 74040 0 0.0
noinit 43520 43520 0 0.0
text 566704 566704 0 0.0
thermostat tlsr9518adk80d (read/write) 793356 793356 0 0.0
bss 73852 73852 0 0.0
noinit 43480 43480 0 0.0
text 554338 554340 2 0.0

@andy31415 andy31415 enabled auto-merge (squash) November 30, 2022 14:54
@andy31415 andy31415 merged commit 7609daf into project-chip:master Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants