summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/oprofile/cell/vma_map.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-01-19 17:15:30 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-20 16:47:53 +1100
commita0828cf57acce9bf941539e1f633e9a91f9df57d (patch)
tree9d46aad873dd0e863adfa9a861bb965e4eee5d69 /arch/powerpc/oprofile/cell/vma_map.c
parent31513207ce72fef5978e8b284e53f294c034ae51 (diff)
downloadlinux-a0828cf57acce9bf941539e1f633e9a91f9df57d.tar.bz2
powerpc: Use sizeof(*foo) rather than sizeof(struct foo)
It's slightly less error prone to use sizeof(*foo) rather than specifying the type. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> [mpe: Consolidate into one patch, rewrite change log] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/oprofile/cell/vma_map.c')
-rw-r--r--arch/powerpc/oprofile/cell/vma_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/oprofile/cell/vma_map.c b/arch/powerpc/oprofile/cell/vma_map.c
index c579b16845da..f40e37316dd6 100644
--- a/arch/powerpc/oprofile/cell/vma_map.c
+++ b/arch/powerpc/oprofile/cell/vma_map.c
@@ -69,8 +69,8 @@ vma_map_add(struct vma_to_fileoffset_map *map, unsigned int vma,
unsigned int size, unsigned int offset, unsigned int guard_ptr,
unsigned int guard_val)
{
- struct vma_to_fileoffset_map *new =
- kzalloc(sizeof(struct vma_to_fileoffset_map), GFP_KERNEL);
+ struct vma_to_fileoffset_map *new = kzalloc(sizeof(*new), GFP_KERNEL);
+
if (!new) {
printk(KERN_ERR "SPU_PROF: %s, line %d: malloc failed\n",
__func__, __LINE__);