Attention is currently required from: Arthur Heymans, Julius Werner, Paul Menzel, Yidi Lin.
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78798?usp=email )
Change subject: commonlib: Add GCD function
......................................................................
Patch Set 4:
(2 comments)
File src/commonlib/bsd/gcd.c:
https://review.coreboot.org/c/coreboot/+/78798/comment/7f6cce4f_d95aa4b0 :
PS2, Line 10: if (a == 0 || b == 0)
Done.
`gcd(0, 123)` is mathematically well-defined. In addition, if this is taken out, then `gcd(1, 0)` and `gcd(0, 1)` will be different behaviors, which is even more confusing. Therefore I'm fine with adding this back.
File tests/commonlib/bsd/gcd-test.c:
https://review.coreboot.org/c/coreboot/+/78798/comment/64c88e5a_d9fd9b73 :
PS4, Line 7: {
Add some edge cases here such as
```
gcd32(1, 1);
gcd32(1, 123);
gcd32(123, 1);
gcd32(1, UINT32_MAX);
gcd32(UINT32_MAX, 1);
gcd32(UINT32_MAX, UINT32_MAX);
```
--
To view, visit
https://review.coreboot.org/c/coreboot/+/78798?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I21819cda4299b3809b8ca7a95cbdc6a87e4b3481
Gerrit-Change-Number: 78798
Gerrit-PatchSet: 4
Gerrit-Owner: Yidi Lin
yidilin@google.com
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Yu-Ping Wu
yupingso@google.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Julius Werner
jwerner@chromium.org
Gerrit-Attention: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Attention: Yidi Lin
yidilin@google.com
Gerrit-Comment-Date: Thu, 02 Nov 2023 08:06:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Julius Werner
jwerner@chromium.org
Comment-In-Reply-To: Yidi Lin
yidilin@google.com
Gerrit-MessageType: comment