Loading drivers/mailbox/qcom-rpmh-mailbox.c +5 −4 Original line number Diff line number Diff line Loading @@ -694,10 +694,11 @@ static int find_match(struct tcs_mbox *tcs, struct tcs_cmd *cmd, int len) } /* sanity check to ensure the seq is same */ for (j = 1; j < len; j++) { WARN((tcs->cmd_addr[i + j] != cmd[j].addr), "Message does not match previous sequence.\n"); if (tcs->cmd_addr[i + j] != cmd[j].addr) { pr_debug("Message does not match previous sequence.\n"); return -EINVAL; } } found = true; break; } Loading @@ -724,12 +725,12 @@ static int find_slots(struct tcs_mbox *tcs, struct tcs_mbox_msg *msg) do { slot = bitmap_find_next_zero_area(tcs->slots, MAX_TCS_SLOTS, n, msg->num_payload, 0); if (slot == MAX_TCS_SLOTS) if (slot >= MAX_TCS_SLOTS) break; n += tcs->ncpt; } while (slot + msg->num_payload - 1 >= n); return (slot != MAX_TCS_SLOTS) ? slot : -ENOMEM; return (slot < MAX_TCS_SLOTS) ? slot : -ENOMEM; } static int tcs_mbox_write(struct mbox_chan *chan, struct tcs_mbox_msg *msg, Loading Loading
drivers/mailbox/qcom-rpmh-mailbox.c +5 −4 Original line number Diff line number Diff line Loading @@ -694,10 +694,11 @@ static int find_match(struct tcs_mbox *tcs, struct tcs_cmd *cmd, int len) } /* sanity check to ensure the seq is same */ for (j = 1; j < len; j++) { WARN((tcs->cmd_addr[i + j] != cmd[j].addr), "Message does not match previous sequence.\n"); if (tcs->cmd_addr[i + j] != cmd[j].addr) { pr_debug("Message does not match previous sequence.\n"); return -EINVAL; } } found = true; break; } Loading @@ -724,12 +725,12 @@ static int find_slots(struct tcs_mbox *tcs, struct tcs_mbox_msg *msg) do { slot = bitmap_find_next_zero_area(tcs->slots, MAX_TCS_SLOTS, n, msg->num_payload, 0); if (slot == MAX_TCS_SLOTS) if (slot >= MAX_TCS_SLOTS) break; n += tcs->ncpt; } while (slot + msg->num_payload - 1 >= n); return (slot != MAX_TCS_SLOTS) ? slot : -ENOMEM; return (slot < MAX_TCS_SLOTS) ? slot : -ENOMEM; } static int tcs_mbox_write(struct mbox_chan *chan, struct tcs_mbox_msg *msg, Loading