mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-10-02 18:23:21 +08:00
rpmsg: Fix RPMSG_BUF_INDEX macro to use parameter
The macro body references 'rp_hdr' instead of using the declared
parameter 'rphdr'. This causes the macro to ignore its argument and
always reference whatever 'rp_hdr' variable exists in the calling
scope. Fix by using the parameter name in the macro body.
Fixes: commit b32187e4fb ("openamp: change rx/tx buffer hold flag to count")
Signed-off-by: Chirag Shilwant <c-shilwant@ti.com>
This commit is contained in:
committed by
Arnaud Pouliquen
parent
4ae383d32d
commit
c2c26fce51
@@ -41,7 +41,7 @@
|
|||||||
((rp_hdr)->reserved -= 1 << RPMSG_BUF_HELD_SHIFT)
|
((rp_hdr)->reserved -= 1 << RPMSG_BUF_HELD_SHIFT)
|
||||||
|
|
||||||
/* Get the buffer index */
|
/* Get the buffer index */
|
||||||
#define RPMSG_BUF_INDEX(rphdr) \
|
#define RPMSG_BUF_INDEX(rp_hdr) \
|
||||||
((uint16_t)((rp_hdr)->reserved & ~RPMSG_BUF_HELD_MASK))
|
((uint16_t)((rp_hdr)->reserved & ~RPMSG_BUF_HELD_MASK))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user