virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, virtualization@lists.osdl.org,
	Haiyang Zhang <haiyangz@microsoft.com>
Subject: Re: [PATCH 06/59] Staging: hv: blkvsc: Use the newly introduced vmbus ID in the blockvsc driver
Date: Thu, 25 Aug 2011 10:36:24 -0700	[thread overview]
Message-ID: <20110825173624.GA21334@kroah.com> (raw)
In-Reply-To: <1314290965-2698-6-git-send-email-kys@microsoft.com>

On Thu, Aug 25, 2011 at 09:48:32AM -0700, K. Y. Srinivasan wrote:
> Use the newly introduced vmbus ID in the blockvsc driver. Also, do
> the associated cleanup.
> 
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> ---
>  drivers/staging/hv/blkvsc_drv.c |   23 ++++++++++++++---------
>  1 files changed, 14 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
> index 018b293..9b99387 100644
> --- a/drivers/staging/hv/blkvsc_drv.c
> +++ b/drivers/staging/hv/blkvsc_drv.c
> @@ -111,14 +111,6 @@ struct block_device_context {
>  
>  static const char *drv_name = "blkvsc";
>  
> -/* {32412632-86cb-44a2-9b5c-50d1417354f5} */
> -static const uuid_le dev_type = {
> -	.b = {
> -		0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
> -		0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
> -	}
> -};
> -
>  /*
>   * There is a circular dependency involving blkvsc_request_completion()
>   * and blkvsc_do_request().
> @@ -802,10 +794,24 @@ static void blkvsc_request(struct request_queue *queue)
>  	}
>  }
>  
> +static const struct hv_vmbus_device_id id_table[] = {
> +	{
> +		/* IDE guid */
> +		.guid = {
> +			0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
> +			0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
> +		}
> +	},
> +	{
> +		.guid = { }
> +	},
> +};

Ah, so close, and yet, not quite :(

This should look like:

static const struct hv_vmbus_device_id id_table[] = {
	{
		/* IDE guid */
		.guid = {
			0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
			0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
		}
	},
	{ },
};

No need to set the field name to nothing.

Hm, this could all be made even smaller with something like the
USB_DEVICE() macro.  How about this instead:

/* IDE guid */
static const struct hv_vmbus_device_id id_table[] = {
	{ VMBUS_DEVICE(0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
		       0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5) },
	{ },
};

That would be easier to read and understand, right?  Half the number of
lines as well, which is always nice.

If so, I'll go make that change here so you don't have to respin these.

thanks,

greg k-h

  reply	other threads:[~2011-08-25 17:36 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 16:47 [PATCH 0000/0059] Staging: hv: Driver cleanup K. Y. Srinivasan
2011-08-25 16:48 ` [PATCH 01/59] Staging: hv: vmbus: VMBUS is an ACPI enumerated device, get rid of the PCI signature K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 02/59] Staging: hv: Replace struct hv_guid with the uuid type already defined in Linux K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 03/59] Staging: hv: Add struct hv_vmbus_device_id to mod_devicetable.h K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 04/59] Staging: hv: Add code to parse struct hv_vmbus_device_id table K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 05/59] Staging: hv: vmbus: Introduce vmbus ID space in struct hv_driver K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 06/59] Staging: hv: blkvsc: Use the newly introduced vmbus ID in the blockvsc driver K. Y. Srinivasan
2011-08-25 17:36     ` Greg KH [this message]
2011-08-25 17:52       ` KY Srinivasan
2011-08-25 18:46         ` Greg KH
2011-08-25 18:50           ` KY Srinivasan
2011-08-25 20:43     ` Greg KH
2011-08-25 16:48   ` [PATCH 07/59] Staging: hv: storvsc: Use the newly introduced vmbus ID in storvsc driver K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 08/59] Staging: hv: netvsc: Use the newly introduced vmbus ID in netvsc driver K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 09/59] Staging: hv: mousevsc: Use the newly introduced vmbus ID in mouse driver K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 10/59] Staging: hv: util: Make hv_utils a vmbus device driver K. Y. Srinivasan
2011-08-30 15:53     ` Dan Carpenter
2011-08-30 17:14       ` KY Srinivasan
2011-08-25 16:48   ` [PATCH 11/59] Staging: hv: vmbus: Cleanup vmbus_match() K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 12/59] Staging: hv: vmbus: Cleanup vmbus_uevent() code K. Y. Srinivasan
2011-08-25 20:59     ` Greg KH
2011-08-25 21:15       ` Greg KH
2011-08-25 22:20         ` KY Srinivasan
2011-08-25 22:28           ` Greg KH
2011-08-25 22:46             ` KY Srinivasan
2011-08-25 22:14       ` KY Srinivasan
2011-08-25 22:26         ` Greg KH
2011-08-25 16:48   ` [PATCH 13/59] Staging: hv: vmbus: Support the notion of id tables in vmbus_match() K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 14/59] Staging: hv: vmbus: Get rid of an unnecessary include line in vmbus_drv.c K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 15/59] Staging: hv: storvsc: Get rid of the DMI signature K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 16/59] Staging: hv: netvsc: Get rid of the PCI signature K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 17/59] Staging: hv: netvsc: Get rid of the DMI signature in netvsc_drv.c K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 18/59] Staging: hv: util: Get rid of the DMI signature in hv_util.c K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 19/59] Staging: hv: util: Get rid of the PCI " K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 20/59] Staging: hv: netvsc: Initialize the driver name directly K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 21/59] Staging: hv: netvsc: Get rid of the empty function netvsc_initialize() K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 22/59] Staging: hv: vmbus: Get rid of the unused name field in struct hv_driver K. Y. Srinivasan
2011-08-25 21:24     ` Greg KH
2011-08-25 21:28       ` Greg KH
2011-08-25 22:11         ` Greg KH
2011-08-25 22:27         ` KY Srinivasan
2011-08-25 22:35           ` Greg KH
2011-08-25 16:48   ` [PATCH 23/59] Staging: hv: vmbus: Get rid of some unnecessary comments K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 24/59] Staging: hv: vmbus: Cleanup unnecessary comments in hv.c K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 25/59] Staging: hv: vmbus: Cleanup error handling in hv_init() K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 26/59] Staging: hv: vmbus: Get rid of unnecessay comments in connection.c K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 27/59] Staging: hv: vmbus: Get rid of the function dump_gpadl_body() K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 28/59] Staging: hv: vmbus: Get rid of the function dump_gpadl_header() K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 29/59] Staging: hv: vmbus: Rename openMsg to open_msg in channel.c K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 30/59] Staging: hv: vmbus: Get rid of unnecessary comments " K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 31/59] Staging: hv: vmbus: Change the variable name openInfo to open_info " K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 32/59] Staging: hv: vmbus: Cleanup error values in ringbuffer.c K. Y. Srinivasan
2011-08-25 16:48   ` [PATCH 33/59] Staging: hv: vmbus: Cleanup the error return value in vmbus_recvpacket_raw() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 34/59] Staging: hv: netvsc: Get rid of an unnecessary print statement in netvsc_probe() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 35/59] Staging: hv: vmbus: Retry vmbus_post_msg() before giving up K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 36/59] Staging: hv: storvsc: Cleanup error handling in storvsc_dev_add() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 37/59] Staging: hv: storvsc: Cleanup error handling in storvsc_channel_init() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 38/59] Staging: hv: storvsc: Cleanup error handling in storvsc_connect_to_vsp() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 39/59] Staging: hv: storvsc: Cleanup error handling in storvsc_do_io() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 40/59] Storage: hv: storvsc: Get rid of some unnecessary DPRINTs from storvsc.c K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 41/59] Staging: hv: storvsc: Fix/cleanup some dated comments in storvsc.c K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 42/59] Staging: hv: storvsc: Cleanup returned error code in storvsc_host_reset() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 43/59] Staging: hv: storvsc: Cleanup error code returned in storvsc_probe() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 44/59] Staging: hv: storvsc: Cleanup returned error code in storvsc_drv_init() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 45/59] Staging: hv: netvsc: Cleanup the returned error code in netvsc_probe() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 46/59] Staging: hv: netvsc: Cleanup error return codes in netvsc_destroy_recv_buf() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 47/59] Staging: hv: netvsc: Cleanup error return values in netvsc_init_recv_buf() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 48/59] Staging: hv: netvsc: Cleanup error returns in netvsc_connect_vsp() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 49/59] Staging: hv: netvsc: Cleanup error return values in netvsc_send() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 50/59] Staging: hv: netvsc: Cleanup error return codes in netvsc_device_add() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 51/59] Staging: hv: netvsc: Cleanup error codes in rndis_filter_receive() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 52/59] Staging: hv: netvsc: Cleanup error code in rndis_filter_query_device() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 53/59] Staging: hv: netvsc: Cleanup error return values in rndis_filter_set_packet_filter() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 54/59] Staging: hv: netvsc: Cleanup error returns in rndis_filter_init_device() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 55/59] Staging: hv: netvsc: Cleanup error code in rndis_filter_device_add() K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 56/59] Staging: hv: mouse: Change the jump label Cleanup to cleanup K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 57/59] Staging: hv: mouse: Get rid of the unused PCI signature K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 58/59] Staging: hv: netvsc: Change the jump label Cleanup to cleanup K. Y. Srinivasan
2011-08-25 16:49   ` [PATCH 59/59] Staging: hv: netvsc: Change the jump label Exit to exit K. Y. Srinivasan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110825173624.GA21334@kroah.com \
    --to=greg@kroah.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).