提交 031229b8 编写于 作者: M Markus Elfring 提交者: Stefano Stabellini

arm/xen: Improve a size determination in __set_phys_to_machine_multi()

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
上级 3c2993b8
无相关合并请求
......@@ -144,7 +144,7 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
return true;
}
p2m_entry = kzalloc(sizeof(struct xen_p2m_entry), GFP_NOWAIT);
p2m_entry = kzalloc(sizeof(*p2m_entry), GFP_NOWAIT);
if (!p2m_entry) {
pr_warn("cannot allocate xen_p2m_entry\n");
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部