aboutsummaryrefslogtreecommitdiffstats
path: root/flashrom.8.tmpl
diff options
context:
space:
mode:
authorNikolai Artemiev <nartemiev@google.com>2022-11-21 19:10:54 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-11-28 11:34:45 +0000
commit438b4ef75af84e4f1a89a61691b3d1c23a6d014f (patch)
tree5dbed3bc22511e33e3d84f9cd4b7c394777827c7 /flashrom.8.tmpl
parentcf030c000c9cfc5cbb3fbf3f1473d1591a6d891c (diff)
downloadflashrom-438b4ef75af84e4f1a89a61691b3d1c23a6d014f.tar.gz
flashrom-438b4ef75af84e4f1a89a61691b3d1c23a6d014f.tar.bz2
flashrom-438b4ef75af84e4f1a89a61691b3d1c23a6d014f.zip
writeprotect.c: Split register value/mask calculation into pure func
Extract the code that converts `struct wp_bits` into a collection of register values and bit masks out of `write_wp_bits()` into a new function. This avoids monadic transformer stacks where unit-testing cannot penetrate well to give suitable coverage, therefore keep the bit logic in a separate pure function. BUG=b:260019525,b:259013033 BRANCH=none TEST=ninja test TEST=flashrom --wp-{{dis,en}able,range,list,status} on dedede Change-Id: I604478ecbb70392c5584bf5d87c76b6f20f882b1 Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/69846 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'flashrom.8.tmpl')
0 files changed, 0 insertions, 0 deletions