Linux virtualization list
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'devel@driverdev.osuosl.org'" <devel@driverdev.osuosl.org>,
	"'virtualization@lists.osdl.org'" <virtualization@lists.osdl.org>,
	"'gregkh@suse.de'" <gregkh@suse.de>,
	Hank Janssen <hjanssen@microsoft.com>
Subject: Re: [PATCH 1/1] Rename camel case variables in channel.c
Date: Thu, 23 Sep 2010 13:41:08 -0700	[thread overview]
Message-ID: <1285274468.25928.15.camel@Joe-Laptop> (raw)
In-Reply-To: <1FB5E1D5CA062146B38059374562DF7289EBB57C@TK5EX14MBXC128.redmond.corp.microsoft.com>

On Thu, 2010-09-23 at 20:24 +0000, Haiyang Zhang wrote:
>  drivers/staging/hv/channel.c |  729 +++++++++++++++++++++---------------------
[]
> -	struct hv_monitor_page *monitorPage;
> +	struct hv_monitor_page *monitorpage;

Some of these renames would be better with a "_" for
the CamelCase conversions (ie: CamelCase -> camel_case).

perl regex: 's/\b([A-Z])([a-z]+)([A-Z])([a-z]+)\b/\L$1$2_\L$3$4/g'

For instance, I think this should be monitor_page;

> -void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
> -			      struct vmbus_channel_debug_info *DebugInfo)
> +void VmbusChannelGetDebugInfo(struct vmbus_channel *channel,
> +			      struct vmbus_channel_debug_info *debuginfo)

perhaps debug_info

>  {
> -	struct hv_monitor_page *monitorPage;
> -	u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32;
> -	u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32;
> +	struct hv_monitor_page *monitorpage;
> +	u8 monitorGroup = (u8)channel->OfferMsg.MonitorId / 32;
> +	u8 monitorOffset = (u8)channel->OfferMsg.MonitorId % 32;

Why not convert these to monitor_(group|offset)?

etc...

       reply	other threads:[~2010-09-23 20:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1FB5E1D5CA062146B38059374562DF7289EBB57C@TK5EX14MBXC128.redmond.corp.microsoft.com>
2010-09-23 20:41 ` Joe Perches [this message]
2010-09-23 21:04   ` [PATCH 1/1] Rename camel case variables in channel.c Haiyang Zhang
2010-09-23 20:24 Haiyang Zhang

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=1285274468.25928.15.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=haiyangz@microsoft.com \
    --cc=hjanssen@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