Skip to content

Commit

Permalink
powerpc/4xx: Combine four seq_printf() calls into two in ocm_debugfs_…
Browse files Browse the repository at this point in the history
…show()

Some data were printed into a sequence by four separate function calls.
Print the same data by two single function calls instead.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
elfring authored and mpe committed Dec 21, 2018
1 parent 96d19d7 commit b52106a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/powerpc/platforms/4xx/ocm.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ static int ocm_debugfs_show(struct seq_file *m, void *v)
seq_printf(m, "PhysAddr : 0x%llx\n", ocm->phys);
seq_printf(m, "MemTotal : %d Bytes\n", ocm->memtotal);
seq_printf(m, "MemTotal(NC) : %d Bytes\n", ocm->nc.memtotal);
seq_printf(m, "MemTotal(C) : %d Bytes\n", ocm->c.memtotal);

seq_printf(m, "\n");
seq_printf(m, "MemTotal(C) : %d Bytes\n\n", ocm->c.memtotal);

seq_printf(m, "NC.PhysAddr : 0x%llx\n", ocm->nc.phys);
seq_printf(m, "NC.VirtAddr : 0x%p\n", ocm->nc.virt);
Expand All @@ -256,9 +254,7 @@ static int ocm_debugfs_show(struct seq_file *m, void *v)
blk->size, blk->owner);
}

seq_printf(m, "\n");

seq_printf(m, "C.PhysAddr : 0x%llx\n", ocm->c.phys);
seq_printf(m, "\nC.PhysAddr : 0x%llx\n", ocm->c.phys);
seq_printf(m, "C.VirtAddr : 0x%p\n", ocm->c.virt);
seq_printf(m, "C.MemTotal : %d Bytes\n", ocm->c.memtotal);
seq_printf(m, "C.MemFree : %d Bytes\n", ocm->c.memfree);
Expand Down

0 comments on commit b52106a

Please sign in to comment.