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>
This commit is contained in:

committed by
Michael Ellerman

szülő
31513207ce
commit
a0828cf57a
@@ -524,8 +524,7 @@ static int dma_sb_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
|
||||
int result;
|
||||
struct dma_chunk *c;
|
||||
|
||||
c = kzalloc(sizeof(struct dma_chunk), GFP_ATOMIC);
|
||||
|
||||
c = kzalloc(sizeof(*c), GFP_ATOMIC);
|
||||
if (!c) {
|
||||
result = -ENOMEM;
|
||||
goto fail_alloc;
|
||||
@@ -570,8 +569,7 @@ static int dma_ioc0_map_pages(struct ps3_dma_region *r, unsigned long phys_addr,
|
||||
|
||||
DBG(KERN_ERR "%s: phy=%#lx, lpar%#lx, len=%#lx\n", __func__,
|
||||
phys_addr, ps3_mm_phys_to_lpar(phys_addr), len);
|
||||
c = kzalloc(sizeof(struct dma_chunk), GFP_ATOMIC);
|
||||
|
||||
c = kzalloc(sizeof(*c), GFP_ATOMIC);
|
||||
if (!c) {
|
||||
result = -ENOMEM;
|
||||
goto fail_alloc;
|
||||
|
Reference in New Issue
Block a user