提交 7b770657 编写于 作者: J Julian Andres Klode 提交者: Greg Kroah-Hartman

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: NJulian Andres Klode <jak@jak-linux.org>
Acked-by: NMarc Dietrich <marvin24@gmx.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0cab4cb8
......@@ -110,7 +110,8 @@ static struct nvec_msg *nvec_msg_alloc(struct nvec_chip *nvec)
static void nvec_msg_free(struct nvec_chip *nvec, struct nvec_msg *msg)
{
dev_vdbg(nvec->dev, "INFO: Free %ti\n", msg - nvec->msg_pool);
if (msg != &nvec->tx_scratch)
dev_vdbg(nvec->dev, "INFO: Free %ti\n", msg - nvec->msg_pool);
atomic_set(&msg->used, 0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册