mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-30 14:40:20 -04:00
Merge tag 'scmi-fixes-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes
Arm SCMI firmware interface fixes for v5.18 Few fixes to address assorted set of issues: - Erroneous clearing of Tx channel which only platform firmware must do - Invalid point access pass as parameter to sort() in clock support - Sparse build warnings in OPTEE transport driver - Use of deprecated zero-length arrays * tag 'scmi-fixes-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fix sparse warnings in OPTEE transport driver firmware: arm_scmi: Replace zero-length array with flexible-array member firmware: arm_scmi: Fix sorting of retrieved clock rates firmware: arm_scmi: Remove clear channel call on the TX channel Link: https://lore.kernel.org/r/20220407110818.1436181-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -49,7 +49,7 @@ struct scmi_msg_resp_clock_describe_rates {
|
||||
struct {
|
||||
__le32 value_low;
|
||||
__le32 value_high;
|
||||
} rate[0];
|
||||
} rate[];
|
||||
#define RATE_TO_U64(X) \
|
||||
({ \
|
||||
typeof(X) x = (X); \
|
||||
@@ -210,7 +210,8 @@ scmi_clock_describe_rates_get(const struct scmi_protocol_handle *ph, u32 clk_id,
|
||||
|
||||
if (rate_discrete && rate) {
|
||||
clk->list.num_rates = tot_rate_cnt;
|
||||
sort(rate, tot_rate_cnt, sizeof(*rate), rate_cmp_func, NULL);
|
||||
sort(clk->list.rates, tot_rate_cnt, sizeof(*rate),
|
||||
rate_cmp_func, NULL);
|
||||
}
|
||||
|
||||
clk->rate_discrete = rate_discrete;
|
||||
|
||||
@@ -679,7 +679,8 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
|
||||
|
||||
xfer = scmi_xfer_command_acquire(cinfo, msg_hdr);
|
||||
if (IS_ERR(xfer)) {
|
||||
scmi_clear_channel(info, cinfo);
|
||||
if (MSG_XTRACT_TYPE(msg_hdr) == MSG_TYPE_DELAYED_RESP)
|
||||
scmi_clear_channel(info, cinfo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -405,8 +405,8 @@ static int scmi_optee_chan_free(int id, void *p, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct scmi_shared_mem *get_channel_shm(struct scmi_optee_channel *chan,
|
||||
struct scmi_xfer *xfer)
|
||||
static struct scmi_shared_mem __iomem *
|
||||
get_channel_shm(struct scmi_optee_channel *chan, struct scmi_xfer *xfer)
|
||||
{
|
||||
if (!chan)
|
||||
return NULL;
|
||||
@@ -419,7 +419,7 @@ static int scmi_optee_send_message(struct scmi_chan_info *cinfo,
|
||||
struct scmi_xfer *xfer)
|
||||
{
|
||||
struct scmi_optee_channel *channel = cinfo->transport_info;
|
||||
struct scmi_shared_mem *shmem = get_channel_shm(channel, xfer);
|
||||
struct scmi_shared_mem __iomem *shmem = get_channel_shm(channel, xfer);
|
||||
int ret;
|
||||
|
||||
mutex_lock(&channel->mu);
|
||||
@@ -436,7 +436,7 @@ static void scmi_optee_fetch_response(struct scmi_chan_info *cinfo,
|
||||
struct scmi_xfer *xfer)
|
||||
{
|
||||
struct scmi_optee_channel *channel = cinfo->transport_info;
|
||||
struct scmi_shared_mem *shmem = get_channel_shm(channel, xfer);
|
||||
struct scmi_shared_mem __iomem *shmem = get_channel_shm(channel, xfer);
|
||||
|
||||
shmem_fetch_response(shmem, xfer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user