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

Remove no-longer-needed checks for CHIP_ERROR_KEY_NOT_FOUND. #15841

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

bzbarsky-apple
Copy link
Contributor

Our storage now guarantees it will return
CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND when there is nothing stored under the key.

Problem

Code more complicated than it has to be.

Change overview

Simplify.

Testing

No behavior changes. The KEY_NOT_FOUND case could never be hit anymore.

Our storage now guarantees it will return
CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND when there is nothing stored under the key.
@github-actions
Copy link

github-actions bot commented Mar 4, 2022

PR #15841: Size comparison from 5a8ffc1 to 58ebe5a

Decreases (11 builds for efr32, esp32, k32w, linux, p6, qpg, telink)
platform target config section 5a8ffc1 58ebe5a change % change
efr32 window-app BRD4161A (read only) 853136 853120 -16 -0.0
.text 853128 853112 -16 -0.0
esp32 all-clusters-app c3devkit (read only) 953132 953120 -12 -0.0
.flash.text 953132 953120 -12 -0.0
m5stack (read only) 1008407 1008303 -104 -0.0
.flash.text 1003023 1002919 -104 -0.0
k32w light k32w061+release (read/write) 694008 693992 -16 -0.0
.text 608556 608540 -16 -0.0
lock k32w061+release (read/write) 695760 695744 -16 -0.0
.text 610372 610356 -16 -0.0
linux chip-tool-ipv6only arm64 (read only) 9097844 9097700 -144 -0.0
.text 7706468 7706324 -144 -0.0
thermostat-no-ble arm64 (read only) 2169156 2169028 -128 -0.0
.text 1817984 1817856 -128 -0.0
p6 all-clusters-app default (read/write) 2489608 2489592 -16 -0.0
.text 1447872 1447856 -16 -0.0
qpg lighting-app qpg6105+debug (read only) 603152 603136 -16 -0.0
.text 597832 597816 -16 -0.0
lock-app qpg6105+debug (read only) 568836 568820 -16 -0.0
.text 563516 563500 -16 -0.0
telink lighting-app tlsr9518adk80d (read/write) 887462 887438 -24 -0.0
text 626986 626964 -22 -0.0
Full report (22 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 5a8ffc1 58ebe5a change % change
cyw30739 light cyw930739m2evb_01 (read/write) 600294 600294 0 0.0
.app_xip_area 505316 505316 0 0.0
.bss 77660 77660 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 558290 558290 0 0.0
.app_xip_area 464848 464848 0 0.0
.bss 76164 76164 0 0.0
.data 624 624 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 580290 580290 0 0.0
.app_xip_area 477128 477128 0 0.0
.bss 85524 85524 0 0.0
.data 600 600 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 919804 919804 0 0.0
(read/write) 128840 128840 0 0.0
.bss 126752 126752 0 0.0
.data 2088 2088 0 0.0
.text 919796 919796 0 0.0
BRD4161A+rpc (read only) 949880 949880 0 0.0
(read/write) 145784 145784 0 0.0
.bss 143528 143528 0 0.0
.data 2252 2252 0 0.0
.text 949872 949872 0 0.0
lock-app BRD4161A+wf200 (read only) 988140 988140 0 0.0
(read/write) 120312 120312 0 0.0
.bss 118380 118380 0 0.0
.data 1932 1932 0 0.0
.text 988132 988132 0 0.0
window-app BRD4161A (read only) 853136 853120 -16 -0.0
(read/write) 126784 126784 0 0.0
.bss 124856 124856 0 0.0
.data 1924 1924 0 0.0
.text 853128 853112 -16 -0.0
esp32 all-clusters-app c3devkit (read only) 953132 953120 -12 -0.0
(read/write) 1392570 1392570 0 0.0
.dram0.bss 62536 62536 0 0.0
.dram0.data 14236 14236 0 0.0
.flash.rodata 196880 196880 0 0.0
.flash.text 953132 953120 -12 -0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1008407 1008303 -104 -0.0
(read/write) 459692 459692 0 0.0
.dram0.bss 68056 68056 0 0.0
.dram0.data 34080 34080 0 0.0
.flash.rodata 225720 225720 0 0.0
.flash.text 1003023 1002919 -104 -0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 694008 693992 -16 -0.0
.bss 77680 77680 0 0.0
.data 1972 1972 0 0.0
.text 608556 608540 -16 -0.0
lock k32w061+release (read/write) 695760 695744 -16 -0.0
.bss 77616 77616 0 0.0
.data 1972 1972 0 0.0
.text 610372 610356 -16 -0.0
linux chip-tool-ipv6only arm64 (read only) 9097844 9097700 -144 -0.0
(read/write) 418529 418529 0 0.0
.bss 43761 43761 0 0.0
.data 1192 1192 0 0.0
.data.rel.ro 317936 317936 0 0.0
.dynamic 560 560 0 0.0
.got 51856 51856 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 473628 473628 0 0.0
.text 7706468 7706324 -144 -0.0
thermostat-no-ble arm64 (read only) 2169156 2169028 -128 -0.0
(read/write) 148417 148417 0 0.0
.bss 65121 65121 0 0.0
.data 1072 1072 0 0.0
.data.rel.ro 75048 75048 0 0.0
.dynamic 560 560 0 0.0
.got 4216 4216 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 132900 132900 0 0.0
.text 1817984 1817856 -128 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2350772 2350772 0 0.0
.bss 187036 187036 0 0.0
.data 5784 5784 0 0.0
.text 1313372 1313372 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1078115 1078115 0 0.0
bss 128900 128900 0 0.0
rodata 142028 142028 0 0.0
text 731896 731896 0 0.0
p6 all-clusters-app default (read/write) 2489608 2489592 -16 -0.0
.bss 118608 118608 0 0.0
.data 2696 2696 0 0.0
.text 1447872 1447856 -16 -0.0
light-app default (read/write) 2396728 2396728 0 0.0
.bss 112920 112920 0 0.0
.data 2544 2544 0 0.0
.text 1354992 1354992 0 0.0
lock-app default (read/write) 2360240 2360240 0 0.0
.bss 112664 112664 0 0.0
.data 2504 2504 0 0.0
.text 1318504 1318504 0 0.0
qpg lighting-app qpg6105+debug (read only) 603152 603136 -16 -0.0
(read/write) 146936 146936 0 0.0
.bss 91056 91056 0 0.0
.data 1172 1172 0 0.0
.text 597832 597816 -16 -0.0
lock-app qpg6105+debug (read only) 568836 568820 -16 -0.0
(read/write) 146936 146936 0 0.0
.bss 91064 91064 0 0.0
.data 1124 1124 0 0.0
.text 563516 563500 -16 -0.0
persistent-storage-app qpg6105+debug (read only) 99520 99520 0 0.0
(read/write) 146940 146940 0 0.0
.bss 24004 24004 0 0.0
.data 176 176 0 0.0
.text 94200 94200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 887462 887438 -24 -0.0
bss 86864 86864 0 0.0
noinit 37160 37160 0 0.0
text 626986 626964 -22 -0.0

@bzbarsky-apple bzbarsky-apple merged commit 84bd4dc into project-chip:master Mar 4, 2022
@bzbarsky-apple bzbarsky-apple deleted the simplify-logic branch March 4, 2022 06:56
jadhavrohit924 added a commit to jadhavrohit924/connectedhomeip that referenced this pull request Mar 4, 2022
@jadhavrohit924
Copy link
Contributor

After this MR got merged commissiong was failing for esp32. Fixed in 15856. Please have a look

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.

4 participants