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

Commit e8dc01e7 authored by Chris Lew's avatar Chris Lew Committed by Gerrit - the friendly Code Review server
Browse files

trace: ipc_logging: Remove unnecesary bounds check



An unsigned char will always have a size less than 255. Remove this
check as it will always return false. Add header file dependencies for
compilation.

Change-Id: I8a80e230d4b1a2f91e153644d63e8e5892609c07
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent 0a4e946c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/wait.h>
#include <linux/delay.h>
#include <linux/completion.h>
#include <linux/sched/clock.h>
#include <linux/ipc_logging.h>

#include "ipc_logging_private.h"
@@ -364,8 +365,6 @@ void msg_encode_end(struct encode_context *ectxt)

	/* finalize data size */
	ectxt->hdr.size = ectxt->offset - sizeof(ectxt->hdr);
	if (WARN_ON(ectxt->hdr.size > MAX_MSG_SIZE))
		return;
	memcpy(ectxt->buff, &ectxt->hdr, sizeof(ectxt->hdr));
}
EXPORT_SYMBOL(msg_encode_end);