lkml.org 
[lkml]   [2012]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/12] VMCI: device driver implementaton.
On Mon, Oct 29, 2012 at 06:04:15PM -0700, George Zhang wrote:
> +/*
> + * vmci_get_context_id() - Gets the current context ID.
> + *
> + * Returns the current context ID. Note that since this is accessed only
> + * from code running in the host, this always returns the host context ID.
> + */
> +u32 vmci_get_context_id(void)
> +{
> + if (vmci_guest_code_active()) {
> + return vmci_get_vm_context_id();
> + } else if (vmci_host_code_active()) {
> + return VMCI_HOST_CONTEXT_ID;
> + } else {
> + return VMCI_INVALID_ID;
> + }
> +}
> +EXPORT_SYMBOL_GPL(vmci_get_context_id);

checkpatch didn't complain about too many { } here?

> +/*
> + * vmci_version() - Returns the version of the driver.
> + *
> + * Returns the version of the VMCI driver.
> + */
> +u32 vmci_version(void)
> +{
> + return VMCI_VERSION;
> +}
> +EXPORT_SYMBOL_GPL(vmci_version);

Why is this needed? Why would a kernel driver ever care about this?

thanks,

greg k-h


\
 
 \ /
  Last update: 2012-10-30 03:41    [W:0.194 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site