-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
drivers: scmi-msg: correct voltage domain protocol version & clock rates enumeration #6951
Conversation
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.
For "drivers: scmi-msg: correct voltage domain protocol version":
Acked-by: Jerome Forissier <[email protected]>
core/drivers/scmi-msg/clock.c
Outdated
@@ -321,7 +321,7 @@ static void scmi_clock_describe_rates(struct scmi_msg *msg) | |||
} | |||
|
|||
out_count = rate_index - in_args->rate_index; | |||
remaining = nb_rates - in_args->rate_index; | |||
remaining = nb_rates - in_args->rate_index - out_count; |
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.
nb_rates - rate_index
would be better, no?
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.
I would have said nb_rates - out_count
as out_count is the number of entries filled in the buffer. Maybe I'm missing something.
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.
nb_rates - rate_index would be better, no?
Indeed simpler.
I would have said
nb_rates - out_count
as out_count is the number of entries filled in the buffer. Maybe I'm missing something.
nb_rates
gives the overall number of supported rates. out_count
gives the number of rates filled in this very response message but does not count the rates skipped, from index 0 to index in_args->rate_index - 1
.
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.
I'll update the change.
core/drivers/scmi-msg/clock.c
Outdated
@@ -321,7 +321,7 @@ static void scmi_clock_describe_rates(struct scmi_msg *msg) | |||
} | |||
|
|||
out_count = rate_index - in_args->rate_index; | |||
remaining = nb_rates - in_args->rate_index; | |||
remaining = nb_rates - in_args->rate_index - out_count; |
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.
nb_rates - rate_index would be better, no?
Indeed simpler.
I would have said
nb_rates - out_count
as out_count is the number of entries filled in the buffer. Maybe I'm missing something.
nb_rates
gives the overall number of supported rates. out_count
gives the number of rates filled in this very response message but does not count the rates skipped, from index 0 to index in_args->rate_index - 1
.
|
Sure, |
Fix the version ID of the implemented SCMI voltage domain protocol that is v2.0 (ID 0x20000), not v3.0 (ID 0x30000). Fixes: 006d89b ("drivers: scmi-msg: add SCMI Voltage Domain protocol") Signed-off-by: Etienne Carriere <[email protected]> Acked-by: Jerome Forissier <[email protected]> Acked-by: Gatien Chevallier <[email protected]>
Fix value of remaining clocks to describe on SCMI clock protocol message CLOCK_DESCRIBE_RATES that does not take into account the number of returned clock in the response. Fixes: 90252e2 ("drivers: scmi-msg: clock adapts to output buffer size") Signed-off-by: Etienne Carriere <[email protected]> Acked-by: Jerome Forissier <[email protected]> Acked-by: Gatien Chevallier <[email protected]>
Review tags applied. Thanks. |
Fix the version ID of the implemented SCMI voltage domain protocol that is v2.0 (ID 0x20000), not v3.0 (ID 0x30000).
(Fixes: 006d89b ("drivers: scmi-msg: add SCMI Voltage Domain protocol"))
Fix value of remaining clocks to describe on SCMI clock protocol message CLOCK_DESCRIBE_RATES that does not take into account the number of returned clock in the response.
(Fixes: 90252e2 ("drivers: scmi-msg: clock adapts to output buffer size"))