Skip to content

Commit e2f80cb

Browse files
GUIDINGLIwyr-7
authored andcommitted
rpmsg_virtio: don't need check status when get_tx_payload
status has been checked before virtio device init, so when get_tx_payload is called it must have ready Signed-off-by: Guiding Li <liguiding1@xiaomi.com>
1 parent c468328 commit e2f80cb

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

lib/rpmsg/rpmsg_virtio.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,19 +359,13 @@ static void *rpmsg_virtio_get_tx_payload_buffer(struct rpmsg_device *rdev,
359359
{
360360
struct rpmsg_virtio_device *rvdev;
361361
struct rpmsg_hdr *rp_hdr;
362-
uint8_t virtio_status;
363362
uint16_t idx;
364363
int tick_count;
365364
int status;
366365

367366
/* Get the associated remote device for channel. */
368367
rvdev = metal_container_of(rdev, struct rpmsg_virtio_device, rdev);
369368

370-
/* Validate device state */
371-
status = virtio_get_status(rvdev->vdev, &virtio_status);
372-
if (status || !(virtio_status & VIRTIO_CONFIG_STATUS_DRIVER_OK))
373-
return NULL;
374-
375369
if (wait)
376370
tick_count = RPMSG_TICK_COUNT / RPMSG_TICKS_PER_INTERVAL;
377371
else

0 commit comments

Comments
 (0)