Browse Source

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: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Markus Elfring 8 years ago
parent
commit
031229b862
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/arm/xen/p2m.c

+ 1 - 1
arch/arm/xen/p2m.c

@@ -144,7 +144,7 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
 		return true;
 		return true;
 	}
 	}
 
 
-	p2m_entry = kzalloc(sizeof(struct xen_p2m_entry), GFP_NOWAIT);
+	p2m_entry = kzalloc(sizeof(*p2m_entry), GFP_NOWAIT);
 	if (!p2m_entry) {
 	if (!p2m_entry) {
 		pr_warn("cannot allocate xen_p2m_entry\n");
 		pr_warn("cannot allocate xen_p2m_entry\n");
 		return false;
 		return false;