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:
Chirag Shilwant
2026-09-09 19:09:56 +02:00
committed by Arnaud Pouliquen
parent 4ae383d32d
commit c2c26fce51
+1 -1
View File
@@ -41,7 +41,7 @@
((rp_hdr)->reserved -= 1 << RPMSG_BUF_HELD_SHIFT)
/* Get the buffer index */
#define RPMSG_BUF_INDEX(rphdr) \
#define RPMSG_BUF_INDEX(rp_hdr) \
((uint16_t)((rp_hdr)->reserved & ~RPMSG_BUF_HELD_MASK))
/**