Skip to content

Commit adda070

Browse files
committed
drivers/rpmsg: no need check held status after change to rmutex
metal_mutex has been changed to rmutex_t, so do not need check the held status again. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
1 parent f14c662 commit adda070

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

drivers/rpmsg/rpmsg_port.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,7 @@ static void rpmsg_port_dump(FAR struct rpmsg_s *rpmsg)
812812
FAR struct metal_list *node;
813813
bool needunlock = false;
814814

815-
if (!up_interrupt_context() && !sched_idletask() &&
816-
!nxmutex_is_hold(&rdev->lock))
815+
if (!up_interrupt_context() && !sched_idletask())
817816
{
818817
metal_mutex_acquire(&rdev->lock);
819818
needunlock = true;

drivers/rpmsg/rpmsg_virtio_lite.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,7 @@ static void rpmsg_virtio_lite_dump(FAR struct rpmsg_s *rpmsg)
496496
return;
497497
}
498498

499-
if (up_interrupt_context() || sched_idletask() ||
500-
nxmutex_is_hold(&rdev->lock))
499+
if (up_interrupt_context() || sched_idletask())
501500
{
502501
needlock = false;
503502
}

drivers/rptun/rptun.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,7 @@ static void rptun_dump(FAR struct rpmsg_s *rpmsg)
711711
return;
712712
}
713713

714-
if (up_interrupt_context() || sched_idletask() ||
715-
nxmutex_is_hold(&rdev->lock))
714+
if (up_interrupt_context() || sched_idletask())
716715
{
717716
needlock = false;
718717
}

0 commit comments

Comments
 (0)