Commit 7b770657 authored by Julian Andres Klode's avatar Julian Andres Klode Committed by Greg Kroah-Hartman
Browse files

staging: nvec: Do not print free message for tx_scratch



The scratch area is not part of the pool and thus gets
no allocation message. Printing a free message would
be confusing, and the pointer subtraction would be
undefined behavior.

Signed-off-by: default avatarJulian Andres Klode <jak@jak-linux.org>
Acked-by: default avatarMarc Dietrich <marvin24@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0cab4cb8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ static struct nvec_msg *nvec_msg_alloc(struct nvec_chip *nvec)

static void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg)
{
	if (msg != &nvec->tx_scratch)
		dev_vdbg(nvec->dev, "INFO: Free %ti\n", msg - nvec->msg_pool);
	atomic_set(&msg->used, 0);
}