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

[VDO-5675] Improve constant definitions #33

Merged

Conversation

lorelei-sakai
Copy link
Member

This upstream commits from vdo-devel/83.

The first of these commits will be squashed with Susan's earlier commit 6f22c72 when going upstream, as per Mike's suggestions.

@lorelei-sakai lorelei-sakai changed the title [VDO-5675] Improve constatn definitions [VDO-5675] Improve constant definitions Feb 12, 2024
@github-actions github-actions bot requested a review from bjohnsto February 12, 2024 18:59
lorelei-sakai and others added 2 commits February 12, 2024 23:27
Move static constants from encodings.h to encodings.c to
fix upstream compile warnings about unused constants.
Upstream these constants are only use in encoding.c. However,
these constants are also used in userspace tools and some
tests, so internally it's easiest to leave the constants
in encodings.h. Add an assertion in encodings.c so that
we'll notice the mismatch if we ever change the value of
these constants.

This is an edit to Susan's earlier commit 9462281cde95 and
will be squashed into that one when going upstream.

Signed-off-by: Matthew Sakai <[email protected]>
Avoids unconventional use of 'static const' and enum in headers.

Signed-off-by: Mike Snitzer <[email protected]>
Signed-off-by: Matthew Sakai <[email protected]>
@lorelei-sakai lorelei-sakai force-pushed the feature/improve-constant-defs branch from 4c46f98 to c21d20c Compare February 13, 2024 04:28
@lorelei-sakai lorelei-sakai merged commit d0004d6 into dm-vdo:main Feb 13, 2024
2 checks passed
@lorelei-sakai lorelei-sakai deleted the feature/improve-constant-defs branch February 13, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants