Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/47004 )
Change subject: spi25.c: Use define const in spi_simple_write_cmd() fn ......................................................................
spi25.c: Use define const in spi_simple_write_cmd() fn
This uses the JEDEC_WREN_OUTSIZE define in the spi_simple_write_cmd() helper function to improve readability.
BUG=none BRANCH=none TEST=builds same object
Change-Id: I1b5ede4435ba014320fa8cf9490dc23cdfba4fd6 Signed-off-by: Edward O'Callaghan quasisec@google.com --- M spi25.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/04/47004/1
diff --git a/spi25.c b/spi25.c index dd4543d..1e797c8 100644 --- a/spi25.c +++ b/spi25.c @@ -325,7 +325,7 @@ struct spi_command cmds[] = { { .readarr = 0, - .writecnt = 1, + .writecnt = JEDEC_WREN_OUTSIZE, .writearr = (const unsigned char[]){ JEDEC_WREN }, }, { .readarr = 0,
Shiyu Sun has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47004 )
Change subject: spi25.c: Use define const in spi_simple_write_cmd() fn ......................................................................
Patch Set 1: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47004 )
Change subject: spi25.c: Use define const in spi_simple_write_cmd() fn ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/flashrom/+/47004/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/47004/1//COMMIT_MSG@10 PS1, Line 10: readability I would beg to differ. It avoids a magic number, though, so I don't really care.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47004 )
Change subject: spi25.c: Use define const in spi_simple_write_cmd() fn ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/47004/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/47004/1//COMMIT_MSG@10 PS1, Line 10: readability
I would beg to differ. It avoids a magic number, though, so I don't really care.
Well I just picked a word to generally explain the idea, 'readability' seemed close enough for the general principle of what is going on here in this patch.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47004 )
Change subject: spi25.c: Use define const in spi_simple_write_cmd() fn ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/47004/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/47004/1//COMMIT_MSG@10 PS1, Line 10: readability
Well I just picked a word to generally explain the idea, 'readability' seemed close enough for the g […]
Yeah, I wouldn't know what word to use otherwise. That's why I don't care 😄
Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/47004 )
Change subject: spi25.c: Use define const in spi_simple_write_cmd() fn ......................................................................
spi25.c: Use define const in spi_simple_write_cmd() fn
This uses the JEDEC_WREN_OUTSIZE define in the spi_simple_write_cmd() helper function to improve readability.
BUG=none BRANCH=none TEST=builds same object
Change-Id: I1b5ede4435ba014320fa8cf9490dc23cdfba4fd6 Signed-off-by: Edward O'Callaghan quasisec@google.com Reviewed-on: https://review.coreboot.org/c/flashrom/+/47004 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Shiyu Sun sshiyu@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com --- M spi25.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Shiyu Sun: Looks good to me, but someone else must approve
diff --git a/spi25.c b/spi25.c index dd4543d..1e797c8 100644 --- a/spi25.c +++ b/spi25.c @@ -325,7 +325,7 @@ struct spi_command cmds[] = { { .readarr = 0, - .writecnt = 1, + .writecnt = JEDEC_WREN_OUTSIZE, .writearr = (const unsigned char[]){ JEDEC_WREN }, }, { .readarr = 0,