Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1657174
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] arm/xen: Improve a size determination in __set_phys_to_machine_multi() |
| Date | 2017-06-04 23:10 +0200 |
| Message-ID | <tOKWC-1Yk-19@gated-at.bofh.it> (permalink) |
| References | <tOKWB-1Yk-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 4 Jun 2017 20:50:55 +0200
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>
---
arch/arm/xen/p2m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
index 0ed01f2d5ee4..11e78432b663 100644
--- a/arch/arm/xen/p2m.c
+++ b/arch/arm/xen/p2m.c
@@ -144,5 +144,5 @@ 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) {
--
2.13.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] ARM-XEN: Adjustments for __set_phys_to_machine_multi() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-06-04 23:10 +0200
[PATCH 3/3] arm/xen: Adjust one function call together with a variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2017-06-04 23:10 +0200
Re: [PATCH 3/3] arm/xen: Adjust one function call together with a variable assignment Stefano Stabellini <sstabellini@kernel.org> - 2017-06-05 19:20 +0200
[PATCH 2/3] arm/xen: Delete an error message for a failed memory allocation in __set_phys_to_machine_multi() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-06-04 23:10 +0200
Re: [PATCH 2/3] arm/xen: Delete an error message for a failed memory allocation in __set_phys_to_machine_multi() Stefano Stabellini <sstabellini@kernel.org> - 2017-06-05 19:20 +0200
[PATCH 1/3] arm/xen: Improve a size determination in __set_phys_to_machine_multi() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-06-04 23:10 +0200
Re: [PATCH 1/3] arm/xen: Improve a size determination in __set_phys_to_machine_multi() Stefano Stabellini <sstabellini@kernel.org> - 2017-06-05 19:20 +0200
Re: [PATCH 0/3] ARM-XEN: Adjustments for __set_phys_to_machine_multi() Stefano Stabellini <sstabellini@kernel.org> - 2017-06-05 20:00 +0200
csiph-web