diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-01-19 17:15:30 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-03-20 06:47:53 +0100 |
commit | a0828cf57acce9bf941539e1f633e9a91f9df57d (patch) | |
tree | 9d46aad873dd0e863adfa9a861bb965e4eee5d69 /drivers/macintosh/rack-meter.c | |
parent | powerpc: Remove unused flush_dcache_phys_range() (diff) | |
download | linux-a0828cf57acce9bf941539e1f633e9a91f9df57d.tar.xz linux-a0828cf57acce9bf941539e1f633e9a91f9df57d.zip |
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 'drivers/macintosh/rack-meter.c')
-rw-r--r-- | drivers/macintosh/rack-meter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 910b5b6f96b1..190c9efeace5 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -397,7 +397,7 @@ static int rackmeter_probe(struct macio_dev* mdev, } /* Create and initialize our instance data */ - rm = kzalloc(sizeof(struct rackmeter), GFP_KERNEL); + rm = kzalloc(sizeof(*rm), GFP_KERNEL); if (rm == NULL) { printk(KERN_ERR "rackmeter: failed to allocate memory !\n"); rc = -ENOMEM; |