Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75814
b: refs/heads/master
c: a521cf2
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent b954f1b commit 2e2acfb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3830c62fef49f8bb1b2f353c7fb9469e3d038f5d
refs/heads/master: a521cf209c6e7042f85b2c5b16da3ffa8004fb7b
19 changes: 9 additions & 10 deletions trunk/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static struct threshold_block threshold_defaults = {
};

struct threshold_bank {
struct kobject kobj;
struct kobject *kobj;
struct threshold_block *blocks;
cpumask_t cpus;
};
Expand Down Expand Up @@ -433,7 +433,7 @@ static __cpuinit int allocate_threshold_blocks(unsigned int cpu,
per_cpu(threshold_banks, cpu)[bank]->blocks = b;

kobject_set_name(&b->kobj, "misc%i", block);
b->kobj.parent = &per_cpu(threshold_banks, cpu)[bank]->kobj;
b->kobj.parent = per_cpu(threshold_banks, cpu)[bank]->kobj;
b->kobj.ktype = &threshold_ktype;
err = kobject_register(&b->kobj);
if (err)
Expand Down Expand Up @@ -489,7 +489,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
goto out;

err = sysfs_create_link(&per_cpu(device_mce, cpu).kobj,
&b->kobj, name);
b->kobj, name);
if (err)
goto out;

Expand All @@ -505,16 +505,15 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
goto out;
}

kobject_set_name(&b->kobj, "threshold_bank%i", bank);
b->kobj.parent = &per_cpu(device_mce, cpu).kobj;
b->kobj = kobject_create_and_add(name, &per_cpu(device_mce, cpu).kobj);
if (!b->kobj)
goto out_free;

#ifndef CONFIG_SMP
b->cpus = CPU_MASK_ALL;
#else
b->cpus = per_cpu(cpu_core_map, cpu);
#endif
err = kobject_register(&b->kobj);
if (err)
goto out_free;

per_cpu(threshold_banks, cpu)[bank] = b;

Expand All @@ -531,7 +530,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
continue;

err = sysfs_create_link(&per_cpu(device_mce, i).kobj,
&b->kobj, name);
b->kobj, name);
if (err)
goto out;

Expand Down Expand Up @@ -627,7 +626,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank)
deallocate_threshold_block(cpu, bank);

free_out:
kobject_unregister(&b->kobj);
kobject_unregister(b->kobj);
kfree(b);
per_cpu(threshold_banks, cpu)[bank] = NULL;
}
Expand Down

0 comments on commit 2e2acfb

Please sign in to comment.