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

Simplify and future-proof enum range checks in door locks. #24879

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Instead of explicitly checking for the min/max values, check for the "unknown value" value that decoding will decode to if the value is out of range.

Fixes #20936

@bzbarsky-apple bzbarsky-apple changed the title Simplfy and future-proof enum range checks in door locks. Simplify and future-proof enum range checks in door locks. Feb 6, 2023
@github-actions
Copy link

github-actions bot commented Feb 6, 2023

PR #24879: Size comparison from 3d09d2d to af27aae

Increases (8 builds for bl602, cc13x2_26x2, esp32, psoc6, telink)
platform target config section 3d09d2d af27aae change % change
bl602 lighting-app bl602 (read/write) 1346094 1346102 8 0.0
.text 1023094 1023098 4 0.0
bl602+rpc .text 1053772 1053776 4 0.0
cc13x2_26x2 lock-mtd LP_CC2652R7 (read/write) 182812 182820 8 0.0
.text 557600 557608 8 0.0
esp32 all-clusters-app c3devkit (read only) 1047342 1047344 2 0.0
.flash.text 1047342 1047344 2 0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 27524518 27524520 2 0.0
lock cy8ckit_062s2_43012 .debug_info 22728527 2272852 1 0.0
telink all-clusters-app tlsr9518adk80d text 686126 686134 8 0.0
contact-sensor-app tlsr9518adk80d text 579328 579330 2 0.0
Decreases (15 builds for cc13x2_26x2, cyw30739, efr32, esp32, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 3d09d2d af27aae change % change
cc13x2_26x2 lock-mtd LP_CC2652R7 (read only) 660979 660971 -8 -0.0
.rodata 102899 102883 -16 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584194 584186 -8 -0.0
.app_xip_area 461012 461004 -8 -0.0
efr32 lock-app BRD4161A+wf200 (read/write) 1065792 1065776 -16 -0.0
.text 910632 910616 -16 -0.0
esp32 all-clusters-app c3devkit (read/write) 1518746 1518730 -16 -0.0
.flash.rodata 220768 220752 -16 -0.0
m5stack (read/write) 500387 500371 -16 -0.0
.flash.rodata 249528 249512 -16 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2464072 2464056 -16 -0.0
.text 1426716 1426700 -16 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1161400 1161388 -12 -0.0
rodata 133556 133544 -12 -0.0
nrf7002dk_nrf5340_cpuapp (read/write) 1366668 1366640 -28 -0.0
rodata 210988 210976 -12 -0.0
text 764160 764156 -4 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1756516 1756500 -16 -0.0
.text 1555656 1555640 -16 -0.0
all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27080392 27080391 -1 -0.0
light cy8ckit_062s2_43012 .debug_info 22502922 22502921 -1 -0.0
lock cy8ckit_062s2_43012 (read/write) 1645940 1645924 -16 -0.0
.text 1449232 1449216 -16 -0.0
qpg lock-app qpg6105+debug (read/write) 1116204 1116188 -16 -0.0
.text 563300 563284 -16 -0.0
telink all-clusters-app tlsr9518adk80d (read/write) 1016092 1016088 -4 -0.0
thermostat tlsr9518adk80d text 594954 594952 -2 -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 3d09d2d af27aae change % change
bl602 lighting-app bl602 (read/write) 1346094 1346102 8 0.0
.bss 94794 94794 0 0.0
.data 9736 9736 0 0.0
.text 1023094 1023098 4 0.0
bl602+rpc (read/write) 1391286 1391286 0 0.0
.bss 102842 102842 0 0.0
.data 10128 10128 0 0.0
.text 1053772 1053776 4 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1184091 1184091 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69905 69905 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4056 4056 0 0.0
.debug_abbrev 1550392 1550392 0 0.0
.debug_aranges 134128 134128 0 0.0
.debug_frame 491212 491212 0 0.0
.debug_info 40212336 40212336 0 0.0
.debug_line 5267956 5267956 0 0.0
.debug_loc 3401541 3401541 0 0.0
.debug_ranges 371800 371800 0 0.0
.debug_str 3535643 3535643 0 0.0
.hbn 536 536 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 106864 106864 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 572228 572228 0 0.0
.symtab 173328 173328 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
952132 952132 0 0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1276783 1276783 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77953 77953 0 0.0
.bss_psram 30304 30304 0 0.0
.comment 48 48 0 0.0
.data 4608 4608 0 0.0
.debug_abbrev 1698806 1698806 0 0.0
.debug_aranges 142352 142352 0 0.0
.debug_frame 518916 518916 0 0.0
.debug_info 44608818 44608818 0 0.0
.debug_line 5666424 5666424 0 0.0
.debug_loc 3597833 3597833 0 0.0
.debug_ranges 395504 395504 0 0.0
.debug_str 3938881 3938881 0 0.0
.hbn 536 536 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 121408 121408 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 632825 632825 0 0.0
.symtab 191680 191680 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1029154 1029154 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 677351 677351 0 0.0
(read/write) 173832 173832 0 0.0
.bss 80876 80876 0 0.0
.data 3384 3384 0 0.0
.rodata 87527 87527 0 0.0
.text 589508 589508 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641359 641359 0 0.0
(read/write) 157568 157568 0 0.0
.bss 80068 80068 0 0.0
.data 3384 3384 0 0.0
.rodata 77479 77479 0 0.0
.text 563560 563560 0 0.0
lock-ftd LP_CC2652R7 (read only) 674451 674451 0 0.0
(read/write) 174076 174076 0 0.0
.bss 78308 78308 0 0.0
.data 3312 3312 0 0.0
.rodata 76323 76323 0 0.0
.text 597648 597648 0 0.0
lock-mtd LP_CC2652R7 (read only) 660979 660971 -8 -0.0
(read/write) 182812 182820 8 0.0
.bss 73572 73572 0 0.0
.data 3312 3312 0 0.0
.rodata 102899 102883 -16 -0.0
.text 557600 557608 8 0.0
pump-app LP_CC2652R7 (read only) 687431 687431 0 0.0
(read/write) 161832 161832 0 0.0
.bss 78276 78276 0 0.0
.data 3276 3276 0 0.0
.rodata 90535 90535 0 0.0
.text 596416 596416 0 0.0
pump-controller-app LP_CC2652R7 (read only) 672839 672839 0 0.0
(read/write) 176536 176536 0 0.0
.bss 78388 78388 0 0.0
.data 3300 3300 0 0.0
.rodata 86615 86615 0 0.0
.text 585744 585744 0 0.0
shell LP_CC2652R7 (read only) 668598 668598 0 0.0
(read/write) 184656 184656 0 0.0
.bss 82948 82948 0 0.0
.data 3380 3380 0 0.0
.rodata 84262 84262 0 0.0
.text 584024 584024 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584194 584186 -8 -0.0
.app_xip_area 461012 461004 -8 -0.0
.bss 65632 65632 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 588078 588078 0 0.0
.app_xip_area 459600 459600 0 0.0
.bss 70920 70920 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 549690 549690 0 0.0
.app_xip_area 431988 431988 0 0.0
.bss 60192 60192 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs911x (read/write) 1038144 1038144 0 0.0
.bss 181560 181560 0 0.0
.data 2044 2044 0 0.0
.text 854516 854516 0 0.0
BRD4187C (read/write) 1141368 1141368 0 0.0
.bss 133328 133328 0 0.0
.data 2544 2544 0 0.0
.text 980900 980900 0 0.0
lock-app BRD4161A+wf200 (read/write) 1065792 1065776 -16 -0.0
.bss 153088 153088 0 0.0
.data 2052 2052 0 0.0
.text 910632 910616 -16 -0.0
window-app BRD4187C (read/write) 1136276 1136276 0 0.0
.bss 134848 134848 0 0.0
.data 2572 2572 0 0.0
.text 974260 974260 0 0.0
esp32 all-clusters-app c3devkit (read only) 1047342 1047344 2 0.0
(read/write) 1518746 1518730 -16 -0.0
.dram0.bss 77960 77960 0 0.0
.dram0.data 13792 13792 0 0.0
.flash.rodata 220768 220752 -16 -0.0
.flash.text 1047342 1047344 2 0.0
.iram0.text 72896 72896 0 0.0
m5stack (read only) 1099799 1099799 0 0.0
(read/write) 500387 500371 -16 -0.0
.dram0.bss 83008 83008 0 0.0
.dram0.data 34080 34080 0 0.0
.flash.rodata 249528 249512 -16 -0.0
.flash.text 1094415 1094415 0 0.0
.iram0.text 124855 124855 0 0.0
k32w contact k32w0+release (read/write) 659768 659768 0 0.0
.bss 76560 76560 0 0.0
.data 2112 2112 0 0.0
.text 561984 561984 0 0.0
light k32w0+release (read/write) 671884 671884 0 0.0
.bss 74344 74344 0 0.0
.data 2064 2064 0 0.0
.text 592748 592748 0 0.0
lock k32w0+release (read/write) 631308 631308 0 0.0
.bss 75112 75112 0 0.0
.data 2084 2084 0 0.0
.text 551384 551384 0 0.0
linux chip-tool-ipv6only arm64 (read only) 11962356 11962356 0 0.0
(read/write) 727672 727672 0 0.0
.bss 34248 34248 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 669944 669944 0 0.0
.dynamic 560 560 0 0.0
.got 15264 15264 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 582804 582804 0 0.0
.text 9650404 9650404 0 0.0
thermostat-no-ble arm64 (read only) 2509052 2509052 0 0.0
(read/write) 144744 144744 0 0.0
.bss 56456 56456 0 0.0
.data 1824 1824 0 0.0
.data.rel.ro 77016 77016 0 0.0
.dynamic 560 560 0 0.0
.got 5408 5408 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 150984 150984 0 0.0
.text 2096096 2096096 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2464072 2464056 -16 -0.0
.bss 215892 215892 0 0.0
.data 5880 5880 0 0.0
.text 1426716 1426700 -16 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1161400 1161388 -12 -0.0
bss 143531 143531 0 0.0
rodata 133556 133544 -12 -0.0
text 804428 804428 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1366668 1366640 -28 -0.0
bss 105990 105990 0 0.0
rodata 210988 210976 -12 -0.0
text 764160 764156 -4 -0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1107584 1107584 0 0.0
bss 142687 142687 0 0.0
rodata 110700 110700 0 0.0
text 774424 774424 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 840872 840872 0 0.0
(read/write) 1756516 1756500 -16 -0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189800 189800 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 2672 2672 0 0.0
.debug_abbrev 1251930 1251930 0 0.0
.debug_aranges 111392 111392 0 0.0
.debug_frame 373948 373948 0 0.0
.debug_info 27524518 27524520 2 0.0
.debug_line 3781071 3781071 0 0.0
.debug_loc 3676049 3676049 0 0.0
.debug_ranges 362456 362456 0 0.0
.debug_str 3486476 3486476 0 0.0
.heap 840872 840872 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 578105 578105 0 0.0
.symtab 424864 424864 0 0.0
.text 0 0 0 0.0
1555656 1555640 -16 -0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 841688 841688 0 0.0
(read/write) 1698276 1698276 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188992 188992 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 1237601 1237601 0 0.0
.debug_aranges 110656 110656 0 0.0
.debug_frame 376392 376392 0 0.0
.debug_info 27080392 27080391 -1 -0.0
.debug_line 3789417 3789417 0 0.0
.debug_loc 3659779 3659779 0 0.0
.debug_ranges 360424 360424 0 0.0
.debug_str 3472229 3472229 0 0.0
.heap 841688 841688 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 539313 539313 0 0.0
.symtab 410144 410144 0 0.0
.text 1498232 1498232 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850008 850008 0 0.0
(read/write) 1611724 1611724 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180872 180872 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 2464 2464 0 0.0
.debug_abbrev 1071935 1071935 0 0.0
.debug_aranges 102864 102864 0 0.0
.debug_frame 346828 346828 0 0.0
.debug_info 22502922 22502921 -1 -0.0
.debug_line 3341713 3341713 0 0.0
.debug_loc 3337839 3337839 0 0.0
.debug_ranges 319600 319600 0 0.0
.debug_str 3275475 3275475 0 0.0
.heap 850008 850008 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 474518 474518 0 0.0
.symtab 377920 377920 0 0.0
.text 1420000 1420000 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845024 845024 0 0.0
(read/write) 1645940 1645924 -16 -0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185848 185848 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 1073639 1073639 0 0.0
.debug_aranges 103304 103304 0 0.0
.debug_frame 348768 348768 0 0.0
.debug_info 22728527 2272852 1 0.0
.debug_line 3343626 3343626 0 0.0
.debug_loc 3360643 3360643 0 0.0
.debug_ranges 321512 321512 0 0.0
.debug_str 3292701 3292701 0 0.0
.heap 845024 845024 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 477894 477894 0 0.0
.symtab 380080 380080 0 0.0
.text 1449232 1449216 -16 -0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1148212 1148212 0 0.0
.bss 99876 99876 0 0.0
.data 848 848 0 0.0
.text 595312 595312 0 0.0
lock-app qpg6105+debug (read/write) 1116204 1116188 -16 -0.0
.bss 96396 96396 0 0.0
.data 860 860 0 0.0
.text 563300 563284 -16 -0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1016092 1016088 -4 -0.0
bss 97980 97980 0 0.0
text 686126 686134 8 0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 952648 952648 0 0.0
bss 97028 97028 0 0.0
text 648424 648424 0 0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 857980 857980 0 0.0
bss 89152 89152 0 0.0
text 579328 579330 2 0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 873680 873680 0 0.0
bss 89240 89240 0 0.0
text 593378 593378 0 0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 951004 951004 0 0.0
bss 97388 97388 0 0.0
text 658780 658780 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 887848 887848 0 0.0
bss 90188 90188 0 0.0
text 604748 604748 0 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 877888 877888 0 0.0
bss 90628 90628 0 0.0
text 594954 594952 -2 -0.0

Instead of explicitly checking for the min/max values, check for the "unknown
value" value that decoding will decode to if the value is out of range.

Fixes project-chip#20936
@github-actions
Copy link

github-actions bot commented Feb 7, 2023

PR #24879: Size comparison from 5eb5d91 to 2d8aa7d

Increases above 0.2%:

platform target config section 5eb5d91 2d8aa7d change % change
bl702 lighting-app bl702 .debug_str 3535545 3558073 22528 0.6
bl702+rpc .debug_str 3938909 3961437 22528 0.6
psoc6 all-clusters cy8ckit_062s2_43012 .debug_str 3486476 3509298 22822 0.7
all-clusters-minimal cy8ckit_062s2_43012 .debug_str 3472229 3495051 22822 0.7
light cy8ckit_062s2_43012 .debug_str 3275475 3298077 22602 0.7
lock cy8ckit_062s2_43012 .debug_info 22728527 22786155 57628 0.3
.debug_str 3292701 3315331 22630 0.7
Increases (12 builds for bl602, bl702, cc13x2_26x2, psoc6, qpg, telink)
platform target config section 5eb5d91 2d8aa7d change % change
bl602 lighting-app bl602+rpc .text 1053772 1053774 2 0.0
bl702 lighting-app bl702 .debug_info 40224844 40280983 56139 0.1
.debug_loc 3401462 3401489 27 0.0
.debug_str 3535545 3558073 22528 0.6
bl702+rpc .debug_info 44623674 44680670 56996 0.1
.debug_loc 3598205 3598238 33 0.0
.debug_str 3938909 3961437 22528 0.6
cc13x2_26x2 lock-mtd LP_CC2652R7 (read/write) 182812 182828 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 .debug_info 27524518 27589897 65379 0.2
.debug_loc 3676006 3676144 138 0.0
.debug_str 3486476 3509298 22822 0.7
all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27080391 27144632 64241 0.2
.debug_loc 3659736 3659874 138 0.0
.debug_str 3472229 3495051 22822 0.7
light cy8ckit_062s2_43012 .debug_info 22502921 22554267 51346 0.2
.debug_str 3275475 3298077 22602 0.7
lock cy8ckit_062s2_43012 .debug_info 22728527 22786155 57628 0.3
.debug_loc 3360628 3360703 75 0.0
.debug_str 3292701 3315331 22630 0.7
qpg lighting-app qpg6105+debug (read/write) 1148236 1148244 8 0.0
.text 595336 595344 8 0.0
telink all-clusters-app tlsr9518adk80d text 686128 686130 2 0.0
all-clusters-minimal-app tlsr9518adk80d text 648422 648426 4 0.0
light-switch-app tlsr9518adk80d text 593376 593378 2 0.0
Decreases (14 builds for bl602, bl702, cc13x2_26x2, esp32, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 5eb5d91 2d8aa7d change % change
bl602 lighting-app bl602 .text 1023096 1023094 -2 -0.0
bl702 lighting-app bl702 (read/write) 1184171 1184155 -16 -0.0
.text 952210 952208 -2 -0.0
cc13x2_26x2 lock-mtd LP_CC2652R7 (read only) 660979 660963 -16 -0.0
.rodata 102899 102883 -16 -0.0
esp32 all-clusters-app m5stack (read only) 1099799 1099791 -8 -0.0
(read/write) 500387 500371 -16 -0.0
.flash.rodata 249528 249512 -16 -0.0
.flash.text 1094415 1094407 -8 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2464072 2464056 -16 -0.0
.text 1426716 1426700 -16 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1161400 1161388 -12 -0.0
rodata 133556 133544 -12 -0.0
nrf7002dk_nrf5340_cpuapp (read/write) 1366668 1366656 -12 -0.0
rodata 210988 210976 -12 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read/write) 1756516 1756500 -16 -0.0
.debug_line 3781069 3781050 -19 -0.0
.text 1555656 1555640 -16 -0.0
all-clusters-minimal cy8ckit_062s2_43012 .debug_line 3789415 3789396 -19 -0.0
light cy8ckit_062s2_43012 .debug_line 3341715 3341713 -2 -0.0
.debug_loc 3337868 3337853 -15 -0.0
lock cy8ckit_062s2_43012 (read/write) 1645940 1645924 -16 -0.0
.debug_line 3343625 3343605 -20 -0.0
.text 1449232 1449216 -16 -0.0
qpg lock-app qpg6105+debug (read/write) 1116220 1116196 -24 -0.0
.text 563316 563292 -24 -0.0
telink all-clusters-app tlsr9518adk80d (read/write) 1016092 1016088 -4 -0.0
thermostat tlsr9518adk80d text 594954 594952 -2 -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 5eb5d91 2d8aa7d change % change
bl602 lighting-app bl602 (read/write) 1346094 1346094 0 0.0
.bss 94794 94794 0 0.0
.data 9736 9736 0 0.0
.text 1023096 1023094 -2 -0.0
bl602+rpc (read/write) 1391286 1391286 0 0.0
.bss 102842 102842 0 0.0
.data 10128 10128 0 0.0
.text 1053772 1053774 2 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1184171 1184155 -16 -0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69905 69905 0 0.0
.bss_psram 30048 30048 0 0.0
.comment 48 48 0 0.0
.data 4056 4056 0 0.0
.debug_abbrev 1550344 1550344 0 0.0
.debug_aranges 134176 134176 0 0.0
.debug_frame 491408 491408 0 0.0
.debug_info 40224844 40280983 56139 0.1
.debug_line 5268117 5268117 0 0.0
.debug_loc 3401462 3401489 27 0.0
.debug_ranges 371816 371816 0 0.0
.debug_str 3535545 3558073 22528 0.6
.hbn 536 536 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 106864 106864 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 572338 572338 0 0.0
.symtab 173376 173376 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
952210 952208 -2 -0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1277055 1277055 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77953 77953 0 0.0
.bss_psram 30304 30304 0 0.0
.comment 48 48 0 0.0
.data 4608 4608 0 0.0
.debug_abbrev 1698758 1698758 0 0.0
.debug_aranges 142408 142408 0 0.0
.debug_frame 519152 519152 0 0.0
.debug_info 44623674 44680670 56996 0.1
.debug_line 5666824 5666824 0 0.0
.debug_loc 3598205 3598238 33 0.0
.debug_ranges 395584 395584 0 0.0
.debug_str 3938909 3961437 22528 0.6
.hbn 536 536 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 121440 121440 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 633131 633131 0 0.0
.symtab 191792 191792 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1029402 1029402 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 677343 677343 0 0.0
(read/write) 173840 173840 0 0.0
.bss 80876 80876 0 0.0
.data 3384 3384 0 0.0
.rodata 87527 87527 0 0.0
.text 589500 589500 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 641351 641351 0 0.0
(read/write) 157568 157568 0 0.0
.bss 80068 80068 0 0.0
.data 3384 3384 0 0.0
.rodata 77479 77479 0 0.0
.text 563552 563552 0 0.0
lock-ftd LP_CC2652R7 (read only) 674459 674459 0 0.0
(read/write) 174068 174068 0 0.0
.bss 78308 78308 0 0.0
.data 3312 3312 0 0.0
.rodata 76323 76323 0 0.0
.text 597656 597656 0 0.0
lock-mtd LP_CC2652R7 (read only) 660979 660963 -16 -0.0
(read/write) 182812 182828 16 0.0
.bss 73572 73572 0 0.0
.data 3312 3312 0 0.0
.rodata 102899 102883 -16 -0.0
.text 557600 557600 0 0.0
pump-app LP_CC2652R7 (read only) 687439 687439 0 0.0
(read/write) 161824 161824 0 0.0
.bss 78276 78276 0 0.0
.data 3276 3276 0 0.0
.rodata 90535 90535 0 0.0
.text 596424 596424 0 0.0
pump-controller-app LP_CC2652R7 (read only) 672847 672847 0 0.0
(read/write) 176528 176528 0 0.0
.bss 78388 78388 0 0.0
.data 3300 3300 0 0.0
.rodata 86615 86615 0 0.0
.text 585752 585752 0 0.0
shell LP_CC2652R7 (read only) 668590 668590 0 0.0
(read/write) 184664 184664 0 0.0
.bss 82948 82948 0 0.0
.data 3380 3380 0 0.0
.rodata 84262 84262 0 0.0
.text 584016 584016 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584282 584282 0 0.0
.app_xip_area 461092 461092 0 0.0
.bss 65632 65632 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 588174 588174 0 0.0
.app_xip_area 459688 459688 0 0.0
.bss 70920 70920 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 549762 549762 0 0.0
.app_xip_area 432060 432060 0 0.0
.bss 60192 60192 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs911x (read/write) 1038144 1038144 0 0.0
.bss 181560 181560 0 0.0
.data 2044 2044 0 0.0
.text 854516 854516 0 0.0
BRD4187C (read/write) 1141368 1141368 0 0.0
.bss 133328 133328 0 0.0
.data 2544 2544 0 0.0
.text 980900 980900 0 0.0
lock-app BRD4161A+wf200 (read/write) 1065792 1065792 0 0.0
.bss 153088 153088 0 0.0
.data 2052 2052 0 0.0
.text 910632 910632 0 0.0
window-app BRD4187C (read/write) 1136276 1136276 0 0.0
.bss 134848 134848 0 0.0
.data 2572 2572 0 0.0
.text 974260 974260 0 0.0
esp32 all-clusters-app c3devkit (read only) 1047344 1047344 0 0.0
(read/write) 1518738 1518738 0 0.0
.dram0.bss 77960 77960 0 0.0
.dram0.data 13792 13792 0 0.0
.flash.rodata 220760 220760 0 0.0
.flash.text 1047344 1047344 0 0.0
.iram0.text 72896 72896 0 0.0
m5stack (read only) 1099799 1099791 -8 -0.0
(read/write) 500387 500371 -16 -0.0
.dram0.bss 83008 83008 0 0.0
.dram0.data 34080 34080 0 0.0
.flash.rodata 249528 249512 -16 -0.0
.flash.text 1094415 1094407 -8 -0.0
.iram0.text 124855 124855 0 0.0
k32w contact k32w0+release (read/write) 659864 659864 0 0.0
.bss 76560 76560 0 0.0
.data 2112 2112 0 0.0
.text 562080 562080 0 0.0
light k32w0+release (read/write) 671980 671980 0 0.0
.bss 74344 74344 0 0.0
.data 2064 2064 0 0.0
.text 592844 592844 0 0.0
lock k32w0+release (read/write) 631388 631388 0 0.0
.bss 75112 75112 0 0.0
.data 2084 2084 0 0.0
.text 551464 551464 0 0.0
linux chip-tool-ipv6only arm64 (read only) 11968612 11968612 0 0.0
(read/write) 727672 727672 0 0.0
.bss 34248 34248 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 669944 669944 0 0.0
.dynamic 560 560 0 0.0
.got 15264 15264 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 582836 582836 0 0.0
.text 9656628 9656628 0 0.0
thermostat-no-ble arm64 (read only) 2509052 2509052 0 0.0
(read/write) 144744 144744 0 0.0
.bss 56456 56456 0 0.0
.data 1824 1824 0 0.0
.data.rel.ro 77016 77016 0 0.0
.dynamic 560 560 0 0.0
.got 5408 5408 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 150984 150984 0 0.0
.text 2096096 2096096 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2464072 2464056 -16 -0.0
.bss 215892 215892 0 0.0
.data 5880 5880 0 0.0
.text 1426716 1426700 -16 -0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1161400 1161388 -12 -0.0
bss 143531 143531 0 0.0
rodata 133556 133544 -12 -0.0
text 804428 804428 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1366668 1366656 -12 -0.0
bss 105990 105990 0 0.0
rodata 210988 210976 -12 -0.0
text 764160 764160 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1107584 1107584 0 0.0
bss 142687 142687 0 0.0
rodata 110700 110700 0 0.0
text 774424 774424 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 840872 840872 0 0.0
(read/write) 1756516 1756500 -16 -0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189800 189800 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 2672 2672 0 0.0
.debug_abbrev 1251930 1251930 0 0.0
.debug_aranges 111392 111392 0 0.0
.debug_frame 373948 373948 0 0.0
.debug_info 27524518 27589897 65379 0.2
.debug_line 3781069 3781050 -19 -0.0
.debug_loc 3676006 3676144 138 0.0
.debug_ranges 362456 362456 0 0.0
.debug_str 3486476 3509298 22822 0.7
.heap 840872 840872 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 578105 578105 0 0.0
.symtab 424864 424864 0 0.0
.text 1555656 1555640 -16 -0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 841688 841688 0 0.0
(read/write) 1698276 1698276 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188992 188992 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 1237601 1237601 0 0.0
.debug_aranges 110656 110656 0 0.0
.debug_frame 376392 376392 0 0.0
.debug_info 27080391 27144632 64241 0.2
.debug_line 3789415 3789396 -19 -0.0
.debug_loc 3659736 3659874 138 0.0
.debug_ranges 360424 360424 0 0.0
.debug_str 3472229 3495051 22822 0.7
.heap 841688 841688 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 539313 539313 0 0.0
.symtab 410144 410144 0 0.0
.text 1498232 1498232 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850008 850008 0 0.0
(read/write) 1611724 1611724 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180872 180872 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 2464 2464 0 0.0
.debug_abbrev 1071935 1071935 0 0.0
.debug_aranges 102864 102864 0 0.0
.debug_frame 346828 346828 0 0.0
.debug_info 22502921 22554267 51346 0.2
.debug_line 3341715 3341713 -2 -0.0
.debug_loc 3337868 3337853 -15 -0.0
.debug_ranges 319600 319600 0 0.0
.debug_str 3275475 3298077 22602 0.7
.heap 850008 850008 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 474518 474518 0 0.0
.symtab 377920 377920 0 0.0
.text 1420000 1420000 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845024 845024 0 0.0
(read/write) 1645940 1645924 -16 -0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185848 185848 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 1073639 1073639 0 0.0
.debug_aranges 103304 103304 0 0.0
.debug_frame 348768 348768 0 0.0
.debug_info 22728527 22786155 57628 0.3
.debug_line 3343625 3343605 -20 -0.0
.debug_loc 3360628 3360703 75 0.0
.debug_ranges 321512 321512 0 0.0
.debug_str 3292701 3315331 22630 0.7
.heap 845024 845024 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 477894 477894 0 0.0
.symtab 380080 380080 0 0.0
.text 1449232 1449216 -16 -0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1148236 1148244 8 0.0
.bss 99876 99876 0 0.0
.data 848 848 0 0.0
.text 595336 595344 8 0.0
lock-app qpg6105+debug (read/write) 1116220 1116196 -24 -0.0
.bss 96396 96396 0 0.0
.data 860 860 0 0.0
.text 563316 563292 -24 -0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1016092 1016088 -4 -0.0
bss 97980 97980 0 0.0
text 686128 686130 2 0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 952648 952648 0 0.0
bss 97028 97028 0 0.0
text 648422 648426 4 0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 857980 857980 0 0.0
bss 89152 89152 0 0.0
text 579328 579328 0 0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 873680 873680 0 0.0
bss 89240 89240 0 0.0
text 593376 593378 2 0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 951004 951004 0 0.0
bss 97388 97388 0 0.0
text 658780 658780 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 887848 887848 0 0.0
bss 90188 90188 0 0.0
text 604746 604746 0 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 877888 877888 0 0.0
bss 90628 90628 0 0.0
text 594954 594952 -2 -0.0

@bzbarsky-apple bzbarsky-apple merged commit fd3217a into project-chip:master Feb 8, 2023
@bzbarsky-apple bzbarsky-apple deleted the door-lock-enum-checks branch February 8, 2023 18:35
lpbeliveau-silabs pushed a commit to lpbeliveau-silabs/connectedhomeip that referenced this pull request Feb 13, 2023
…hip#24879)

* Simplify and future-proof enum range checks in door locks.

Instead of explicitly checking for the min/max values, check for the "unknown
value" value that decoding will decode to if the value is out of range.

Fixes project-chip#20936

* Address review commment.

* Address more review comments.
lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…hip#24879)

* Simplify and future-proof enum range checks in door locks.

Instead of explicitly checking for the min/max values, check for the "unknown
value" value that decoding will decode to if the value is out of range.

Fixes project-chip#20936

* Address review commment.

* Address more review comments.
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.

Simplify enum checking in door lock code
3 participants