> > + if (sync) {
> > + err = wait_for_completion_timeout(&info->cmd_complete,
> > +
> > msecs_to_jiffies(RPMSG_TIMEOUT));
> > + if (err == 0) {
> > + dev_err(&info->rpdev->dev, "rpmsg_send timeout!\n");
> > + return -ETIMEDOUT;
>
> strange condition you return an error if err == 0, for redability use 'ret'
> variable or simply:
>
> if(!wait_for_completion_timeout(&info->cmd_complete,
> msecs_to_jiffies(RPMSG_TIMEOUT)) {
> dev_err(&info->rpdev->dev, "rpmsg_send timeout!\n");
> return -ETIMEDOUT;
> }
This will be from a comment i made. It appears that
do_wait_for_common() can return -ERESTARTSYS. I assume that should be
returned to user space?
Andrew