Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7c308ca authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: Dump cookie value upon assert"

parents f23639fc d7903341
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -938,16 +938,16 @@ void mhi_ev_task(unsigned long data);

#ifdef CONFIG_MHI_DEBUG

#define MHI_ASSERT(cond, msg) do { \
#define MHI_ASSERT(cond, fmt, ...) do { \
	if (cond) \
		panic(msg); \
		panic(fmt); \
} while (0)

#else

#define MHI_ASSERT(cond, msg) do { \
#define MHI_ASSERT(cond, fmt, ...) do { \
	if (cond) { \
		MHI_ERR(msg); \
		MHI_ERR(fmt); \
		WARN_ON(cond); \
	} \
} while (0)
+1 −1
Original line number Diff line number Diff line
@@ -1072,7 +1072,7 @@ static int parse_rsc_event(struct mhi_controller *mhi_cntrl,
	xfer_len = MHI_TRE_GET_EV_LEN(event);

	/* received out of bound cookie */
	MHI_ASSERT(cookie >= buf_ring->len, "Invalid Cookie\n");
	MHI_ASSERT(cookie >= buf_ring->len, "Invalid Cookie 0x%08x\n", cookie);

	buf_info = buf_ring->base + cookie;