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

[Bug] Fix unused variable error when using ChibiOS Bitbang serial driver #16709

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

drashna
Copy link
Member

@drashna drashna commented Mar 22, 2022

Description

The bitbang serial driver for chibiOS doesn't compile, currently. (shows how often it is used)

Specifically, #16023 removed this line of code, which is the only place that checksum received was being called in that function.

    *trans->status = (checksum_computed == checksum_received) ? TRANSACTION_ACCEPTED : TRANSACTION_DATA_ERROR;

This removes the variable and just calls the function, "fixing" the error.

Types of Changes

  • Core
  • Bugfix

Issues Fixed or Closed by This PR

  • reddit

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@drashna drashna requested a review from a team March 22, 2022 17:05
@drashna
Copy link
Member Author

drashna commented Mar 22, 2022

@KarlK90 since it was your PR that changed it

@github-actions github-actions bot added the core label Mar 22, 2022
Copy link
Member

@KarlK90 KarlK90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mechanism of the secondary side to not accept data that was transmitted should the checksums mismatch is not implemented in the current split comms algorithm. So I think it is just save to remove this last piece and not implement anything else instead.

Both the main and secondary side could early return if the computed and received checksums mismatch, but given the low adoption maybe this could just stay as it is. (Maybe there are unknown side-effects to early returning)

@drashna drashna merged commit 4a3b410 into qmk:master Mar 23, 2022
@drashna drashna deleted the fix/bitbang_serial_chibios branch March 23, 2022 16:38
0xcharly pushed a commit to Bastardkb/bastardkb-qmk that referenced this pull request Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants