drm/nouveau/flcn/cmdq: cmd_queue_push can't fail, remove error handling for it
authorBen Skeggs <bskeggs@redhat.com>
Tue, 14 Jan 2020 20:34:22 +0000 (06:34 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 15 Jan 2020 00:50:28 +0000 (10:50 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c

index d32cc0d354eebb3fab5156a8de11fe64f60c7e81..b91971e15cc9ddc9631201d52001c0361ee328b1 100644 (file)
@@ -49,13 +49,12 @@ cmd_queue_has_room(struct nvkm_msgqueue *priv,
        return size <= free;
 }
 
-static int
+static void
 cmd_queue_push(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue,
               void *data, u32 size)
 {
        nvkm_falcon_load_dmem(priv->falcon, data, queue->position, size, 0);
        queue->position += ALIGN(size, QUEUE_ALIGNMENT);
-       return 0;
 }
 
 /* REWIND unit is always 0x00 */
@@ -64,17 +63,11 @@ cmd_queue_push(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue,
 static void
 cmd_queue_rewind(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_queue *queue)
 {
-       const struct nvkm_subdev *subdev = priv->falcon->owner;
        struct nvkm_msgqueue_hdr cmd;
-       int err;
 
        cmd.unit_id = MSGQUEUE_UNIT_REWIND;
        cmd.size = sizeof(cmd);
-       err = cmd_queue_push(priv, queue, &cmd, cmd.size);
-       if (err)
-               nvkm_error(subdev, "queue %d rewind failed\n", queue->index);
-       else
-               nvkm_error(subdev, "queue %d rewinded\n", queue->index);
+       cmd_queue_push(priv, queue, &cmd, cmd.size);
 
        queue->position = queue->offset;
 }
@@ -132,12 +125,7 @@ cmd_write(struct nvkm_msgqueue *priv, struct nvkm_msgqueue_hdr *cmd,
                return ret;
        }
 
-       ret = cmd_queue_push(priv, queue, cmd, cmd->size);
-       if (ret) {
-               nvkm_error(subdev, "pmu_queue_push failed\n");
-               commit = false;
-       }
-
+       cmd_queue_push(priv, queue, cmd, cmd->size);
        cmd_queue_close(priv, queue, commit);
        return ret;
 }