Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/68232 )
Change subject: rayer_spi.c: Drop lpt_outbyte intermediate var
......................................................................
rayer_spi.c: Drop lpt_outbyte intermediate var
The intermediate variable in this case serves no extra
assistance in readability or additional control flow
branching. Just assign the result directly into the
driver state tracker.
Change-Id: Idedabb7b1c401d666b3b7e621e75704c7e765fd1
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68232
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
---
M rayer_spi.c
1 file changed, 20 insertions(+), 5 deletions(-)
Approvals:
build bot (Jenkins): Verified
Angel Pons: Looks good to me, approved
diff --git a/rayer_spi.c b/rayer_spi.c
index 8eee7ab..41c5364 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -283,7 +283,6 @@
const struct rayer_programmer *prog = rayer_spi_types;
struct rayer_pinout *pinout = NULL;
uint16_t lpt_iobase;
- uint8_t lpt_outbyte;
char *prog_type;
if (get_params(cfg, &lpt_iobase, &prog_type) < 0)
@@ -312,9 +311,6 @@
if (rget_io_perms())
return 1;
- /* Get the initial value before writing to any line. */
- lpt_outbyte = INB(lpt_iobase);
-
struct rayer_spi_data *data = calloc(1, sizeof(*data));
if (!data) {
msg_perr("Unable to allocate space for SPI master data\n");
@@ -322,7 +318,8 @@
}
data->pinout = pinout;
data->lpt_iobase = lpt_iobase;
- data->lpt_outbyte = lpt_outbyte;
+ /* Get the initial value before writing to any line. */
+ data->lpt_outbyte = INB(lpt_iobase);
if (pinout->shutdown)
register_shutdown(pinout->shutdown, data);
--
To view, visit https://review.coreboot.org/c/flashrom/+/68232
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Idedabb7b1c401d666b3b7e621e75704c7e765fd1
Gerrit-Change-Number: 68232
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Felix Singer, Thomas Heijligen, Angel Pons.
Shreeyash has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66225 )
Change subject: stlinkv3_spi: Bug fix, Initialize uninitialized pointers
......................................................................
Patch Set 2:
(1 comment)
File stlinkv3_spi.c:
https://review.coreboot.org/c/flashrom/+/66225/comment/d8ff90b9_40abeba3
PS1, Line 501: stlinkv3_handle = usb_dev_get_by_vid_pid_serial(usb_ctx,
> > So, "fixing conflicts" is essentially making my changes? What's the "conflict" here? […]
```
$ git status
On branch stlink_bug
Your branch is ahead of 'upstream/master' by 1 commit.
(use "git push" to publish your local commits)
You are currently cherry-picking commit 17aa4ed.
(all conflicts fixed: run "git cherry-pick --continue")
(use "git cherry-pick --skip" to skip this patch)
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
Changes to be committed:
modified: stlinkv3_spi.c
```
`git diff` doesn't return anything...
This is after I've changed the file.
--
To view, visit https://review.coreboot.org/c/flashrom/+/66225
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7ce156a9f7455434ea461560320c84660c93c02f
Gerrit-Change-Number: 66225
Gerrit-PatchSet: 2
Gerrit-Owner: Shreeyash <shreeyash335(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Fri, 21 Oct 2022 18:42:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Singer <felixsinger(a)posteo.net>
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Shreeyash <shreeyash335(a)gmail.com>
Comment-In-Reply-To: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: comment
Attention is currently required from: Thomas Heijligen, Angel Pons, Shreeyash .
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66225 )
Change subject: stlinkv3_spi: Bug fix, Initialize uninitialized pointers
......................................................................
Patch Set 2:
(1 comment)
File stlinkv3_spi.c:
https://review.coreboot.org/c/flashrom/+/66225/comment/27e6ade1_d73bf395
PS1, Line 501: stlinkv3_handle = usb_dev_get_by_vid_pid_serial(usb_ctx,
> So, "fixing conflicts" is essentially making my changes? What's the "conflict" here?
We don't know yet. `git status` can tell us. So please provide the info which was asked by Angel 3 times now. Most likely the conflict is somewhere in a file.
Also, have a look at `git diff`. This shows you the specific changes, and in this case also the conflict.
--
To view, visit https://review.coreboot.org/c/flashrom/+/66225
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7ce156a9f7455434ea461560320c84660c93c02f
Gerrit-Change-Number: 66225
Gerrit-PatchSet: 2
Gerrit-Owner: Shreeyash <shreeyash335(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Shreeyash <shreeyash335(a)gmail.com>
Gerrit-Comment-Date: Fri, 21 Oct 2022 17:04:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Shreeyash <shreeyash335(a)gmail.com>
Comment-In-Reply-To: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen, Shreeyash .
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66225 )
Change subject: stlinkv3_spi: Bug fix, Initialize uninitialized pointers
......................................................................
Patch Set 2:
(1 comment)
File stlinkv3_spi.c:
https://review.coreboot.org/c/flashrom/+/66225/comment/53e8e355_f57e5c5b
PS1, Line 501: stlinkv3_handle = usb_dev_get_by_vid_pid_serial(usb_ctx,
> So, "fixing conflicts" is essentially making my changes? What's the "conflict" here?
Could you please provide the output of `git status`? Otherwise it's impossible to know what's going on...
--
To view, visit https://review.coreboot.org/c/flashrom/+/66225
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7ce156a9f7455434ea461560320c84660c93c02f
Gerrit-Change-Number: 66225
Gerrit-PatchSet: 2
Gerrit-Owner: Shreeyash <shreeyash335(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Shreeyash <shreeyash335(a)gmail.com>
Gerrit-Comment-Date: Fri, 21 Oct 2022 16:50:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Shreeyash <shreeyash335(a)gmail.com>
Comment-In-Reply-To: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen, Angel Pons.
Shreeyash has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66225 )
Change subject: stlinkv3_spi: Bug fix, Initialize uninitialized pointers
......................................................................
Patch Set 2:
(1 comment)
File stlinkv3_spi.c:
https://review.coreboot.org/c/flashrom/+/66225/comment/404a36dc_afbc73ac
PS1, Line 501: stlinkv3_handle = usb_dev_get_by_vid_pid_serial(usb_ctx,
> Yes, you likely have to `git add` the modified files first, and then `git cherry-pick --continue`
So, "fixing conflicts" is essentially making my changes? What's the "conflict" here?
--
To view, visit https://review.coreboot.org/c/flashrom/+/66225
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7ce156a9f7455434ea461560320c84660c93c02f
Gerrit-Change-Number: 66225
Gerrit-PatchSet: 2
Gerrit-Owner: Shreeyash <shreeyash335(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Fri, 21 Oct 2022 16:48:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Heijligen <src(a)posteo.de>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Shreeyash <shreeyash335(a)gmail.com>
Comment-In-Reply-To: Alexander Goncharov <chat(a)joursoir.net>
Gerrit-MessageType: comment