scripts/gdb: convert CpuList to generator function

Yet another code simplification.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Jan Kiszka 2015-02-17 13:47:47 -08:00 committed by Linus Torvalds
parent fffb944c4e
commit a77e15e8b4
2 changed files with 32 additions and 39 deletions

View file

@ -75,7 +75,7 @@ class LxLsmod(gdb.Command):
for module in module_list():
ref = 0
module_refptr = module['refptr']
for cpu in cpus.CpuList("cpu_possible_mask"):
for cpu in cpus.cpu_list("cpu_possible_mask"):
refptr = cpus.per_cpu(module_refptr, cpu)
ref += refptr['incs']
ref -= refptr['decs']