From 4066aed2e8f776e0155a8e5d73df9e97b89e6d4c Mon Sep 17 00:00:00 2001 From: Cosmin Paraschiv Date: Tue, 30 Apr 2013 09:23:09 +0930 Subject: [PATCH] --- yaml --- r: 370979 b: refs/heads/master c: c2ecd51531c881c8d47d77ea30395f7f03d42da3 h: refs/heads/master i: 370977: b344637ab3ca5c9ec661db093fa30e1f83d07d4e 370975: 3435612ef68682cfd205cc2457048a79940ee9fc v: v3 --- [refs] | 2 +- trunk/drivers/lguest/lguest_user.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 056ff43e30a9..0dd4c58c42de 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 55257d72bd1c51f25106350f4983ec19f62ed1fa +refs/heads/master: c2ecd51531c881c8d47d77ea30395f7f03d42da3 diff --git a/trunk/drivers/lguest/lguest_user.c b/trunk/drivers/lguest/lguest_user.c index ff4a0bc9904d..4263f4cc8c55 100644 --- a/trunk/drivers/lguest/lguest_user.c +++ b/trunk/drivers/lguest/lguest_user.c @@ -250,13 +250,13 @@ static ssize_t read(struct file *file, char __user *user, size_t size,loff_t*o) */ static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip) { - /* We have a limited number the number of CPUs in the lguest struct. */ + /* We have a limited number of CPUs in the lguest struct. */ if (id >= ARRAY_SIZE(cpu->lg->cpus)) return -EINVAL; /* Set up this CPU's id, and pointer back to the lguest struct. */ cpu->id = id; - cpu->lg = container_of((cpu - id), struct lguest, cpus[0]); + cpu->lg = container_of(cpu, struct lguest, cpus[id]); cpu->lg->nr_cpus++; /* Each CPU has a timer it can set. */ @@ -270,7 +270,7 @@ static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip) if (!cpu->regs_page) return -ENOMEM; - /* We actually put the registers at the bottom of the page. */ + /* We actually put the registers at the end of the page. */ cpu->regs = (void *)cpu->regs_page + PAGE_SIZE - sizeof(*cpu->regs); /*