public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, virtualization@lists.osdl.org
Subject: Re: [PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names
Date: Sat, 26 Feb 2011 06:40:39 +0300	[thread overview]
Message-ID: <20110226034039.GE18043@bicker> (raw)
In-Reply-To: <1298686078-30945-1-git-send-email-kys@microsoft.com>

On Fri, Feb 25, 2011 at 06:07:58PM -0800, K. Y. Srinivasan wrote:
> The title says it all.
> 

For this patch the rename_rev.pl command is:

rename_rev.pl -nc -e 's/(drv|driver)_ctx/drv/g'

> --- a/drivers/staging/hv/vmbus_drv.c
> +++ b/drivers/staging/hv/vmbus_drv.c
> @@ -46,7 +46,7 @@ struct vmbus_hyperv_driver {
>  	/* FIXME, this is a bug */
>  	/* The driver field is not used in here. Instead, the bus field is */
>  	/* used to represent the driver */
        ^^
This comment out of date now that we're using container_of().

> -	struct hyperv_driver drv_ctx;
> +	struct hyperv_driver dummy;
                             ^^^^^
Delete.

> @@ -849,18 +849,18 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
>  static int vmbus_match(struct device *device, struct device_driver *driver)
>  {
>  	int match = 0;
> -	struct hyperv_driver *driver_ctx = driver_to_hyperv_driver(driver);
> +	struct hyperv_driver *drv = driver_to_hyperv_driver(driver);
>  	struct hyperv_device *device_obj = device_to_hyperv_device(device);
>  
>  	/* We found our driver ? */
> -	if (memcmp(&device_obj->class_id, &driver_ctx->class_id,
> +	if (memcmp(&device_obj->class_id, &drv->class_id,
>  		   sizeof(struct hv_guid)) == 0) {
>  		/*
> -		 * !! NOTE: The driver_ctx is not a vmbus_drv_ctx. We typecast
> +		 * !! NOTE: The drv is not a vmbus_drv_ctx. We typecast
                                                      ^^^^
Out of date.

regards,
dan carpenter

  reply	other threads:[~2011-02-26  3:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26  2:07 [PATCH 6/6] Staging: hv: Cleanup hyperv_driver variable names K. Y. Srinivasan
2011-02-26  3:40 ` Dan Carpenter [this message]
2011-02-26 17:13   ` KY Srinivasan
2011-03-01  2:58 ` Greg KH
2011-03-02  1:44   ` KY Srinivasan
2011-03-02  5:42     ` Greg KH

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=20110226034039.GE18043@bicker \
    --to=error27@gmail.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --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