[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120704145245.GF23020@kroah.com>
Date: Wed, 4 Jul 2012 07:52:45 -0700
From: Greg KH <gregkh@...uxfoundation.org>
To: Yanfei Zhang <zhangyanfei@...fujitsu.com>
Cc: Avi Kivity <avi@...hat.com>, mtosatti@...hat.com,
ebiederm@...ssion.com, luto@....edu,
Joerg Roedel <joerg.roedel@....com>, dzickus@...hat.com,
paul.gortmaker@...driver.com, ludwig.nussel@...e.de,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
kexec@...ts.infradead.org
Subject: Re: [PATCH v4 2/3] KVM-INTEL: Add new module vmcsinfo-intel to fill
VMCSINFO
On Wed, Jul 04, 2012 at 06:05:19PM +0800, Yanfei Zhang wrote:
> +int vmcs_sysfs_add(struct device *dev)
> +{
> + return sysfs_create_group(&dev->kobj, &vmcs_attr_group);
> +}
> +
> +void vmcs_sysfs_remove(struct device *dev)
> +{
> + sysfs_remove_group(&dev->kobj, &vmcs_attr_group);
> +}
Why are these "add" and "remove" functions here? Shouldn't you just
write the lines out where you call them instead, as they are only called
once.
And does this race with adding new cpus to the system (is the uevent
being sent to userspace before the attributes are added?) If so, please
fix that.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists