-
Notifications
You must be signed in to change notification settings - Fork 919
Staging/xlnx/jesd204 fsm #3057
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
Open
mhennerich
wants to merge
13
commits into
main
Choose a base branch
from
staging/xlnx/jesd204-fsm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Staging/xlnx/jesd204 fsm #3057
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ac30686
jesd204: fsm: fix uninitialized return value in propagate_cb_top_level()
mhennerich 61b7850
jesd204: sysfs: fix missing iterator increment in output connection show
mhennerich f3007b5
jesd204: sysfs: fix str_cut_from_chr() ignoring character parameter
mhennerich a1464f9
jesd204: sysfs: fix integer overflow in max value validation
mhennerich b68f7d1
jesd204: add mutex locking for FSM state transitions
mhennerich 09f4b7f
jesd204: fix memory leak in lane_ids on device removal
mhennerich 8c9c7d8
jesd204: warn when device belongs to multiple topologies
mhennerich 7873547
jesd204: fix missing of_node_put() in error path
mhennerich f5aa232
jesd204: fsm: add NULL check for dev_data in table entry callback
mhennerich 72b1b15
jesd204: fsm: document EINVALID_STATE error code
mhennerich 29d2739
jesd204: fsm: add debug logging for rollback operations
mhennerich e17e8bf
jesd204: add kernel-doc comments for undocumented functions
mhennerich 85b3727
jesd204: sysfs: expose sample_rate_div link attribute
mhennerich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,6 +92,7 @@ | |
| JESD204_LNK_ATTR_fsm_paused, | ||
| JESD204_LNK_ATTR_fsm_ignore_errors, | ||
| JESD204_LNK_ATTR_sample_rate, | ||
| JESD204_LNK_ATTR_sample_rate_div, | ||
| JESD204_LNK_ATTR_is_transmit, | ||
| JESD204_LNK_ATTR_num_lanes, | ||
| JESD204_LNK_ATTR_num_converters, | ||
|
|
@@ -122,6 +123,7 @@ | |
| JESD204_LNK_ATTR_BOOL_PRIV(fsm_paused), | ||
| JESD204_LNK_ATTR_BOOL_PRIV(fsm_ignore_errors), | ||
| JESD204_LNK_ATTR_UINT(sample_rate), | ||
| JESD204_LNK_ATTR_UINT(sample_rate_div), | ||
| JESD204_LNK_ATTR_BOOL(is_transmit), | ||
| JESD204_LNK_ATTR_UINT(num_lanes), | ||
| JESD204_LNK_ATTR_UINT(num_converters), | ||
|
|
@@ -212,7 +214,7 @@ | |
|
|
||
| static char *str_cut_from_chr(char *s, char c) | ||
| { | ||
| char *ptr = strchr(s, '_'); | ||
| char *ptr = strchr(s, c); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I would just argue about a fixes tag given that all callers use _ |
||
|
|
||
| if (!ptr) | ||
| return NULL; | ||
|
|
@@ -297,7 +299,7 @@ | |
| if (rc) | ||
| goto out; | ||
|
|
||
| if (idx >= con->dests_count) { | ||
| rc = -ERANGE; | ||
| goto out; | ||
| } | ||
|
|
@@ -308,6 +310,7 @@ | |
| rc = jesd204_con_printf(e->jdev, ptr1, con, buf); | ||
| break; | ||
| } | ||
| iter_idx++; | ||
| } | ||
|
|
||
| out: | ||
|
|
@@ -320,7 +323,8 @@ | |
| size_t count, bool store, bool is_signed) | ||
| { | ||
| u64 val1 = 0; | ||
| int ret, max; | ||
| u64 max; | ||
| int ret; | ||
|
|
||
| if (!store) { | ||
| memcpy(&val1, val, usize); | ||
|
|
@@ -330,21 +334,21 @@ | |
| } | ||
|
|
||
| if (is_signed) | ||
| ret = kstrtoll(rbuf, 0, &val1); | ||
| ret = kstrtoll(rbuf, 0, (s64 *)&val1); | ||
| else | ||
| ret = kstrtoull(rbuf, 0, &val1); | ||
| if (ret) | ||
| return ret; | ||
|
|
||
| switch (usize) { | ||
| case 1: | ||
| max = 0xff; | ||
| max = U8_MAX; | ||
| break; | ||
| case 2: | ||
| max = 0xffff; | ||
| max = U16_MAX; | ||
| break; | ||
| case 4: | ||
| max = 0xffffffff; | ||
| max = U32_MAX; | ||
| break; | ||
| case 8: | ||
| max = 0; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could use guard(mutex)...