Re: [PATCH v6 05/10] drivers: qcom: rpmh-rsc: write sleep/wake requests to TCS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, May 1, 2018 at 9:10 AM, Lina Iyer <ilina@xxxxxxxxxxxxxx> wrote:
> Yes, this is incorrect in its current form. This is what it should be -
>
> static int find_match(const struct tcs_group *tcs, const struct tcs_cmd
> *cmd,
>                      int len)
> {
>        int i, j;
>
>        /* Check for already cached commands */
>        for_each_set_bit(i, tcs->slots, MAX_TCS_SLOTS) {
>                if (tcs->cmd_cache[i] != cmd[0].addr)
>                        continue;
>                for (j = 0; j < len; j++) {
>                        WARN(tcs->cmd_cache[i + j] != cmd[j].addr,
>                             "Message does not match previous sequence.\n");
>                        return -EINVAL;
>                }

If len > 0, won't the above always return -EINVAL?


>                if (j == len - 1)
>                        return i;

Care to explain how you could get here and the test "if (j == len -
1)" could be false?  ;-P

-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux