From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: kumargauravgupta3@gmail.com, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [v4:No,Change] xHCI:Fixing xhci_readl definition and function call
Date: Tue, 3 Sep 2013 08:58:57 -0700 [thread overview]
Message-ID: <20130903155857.GA2657@xanatos> (raw)
In-Reply-To: <5223383f.hCMXrpqEq1AlVw9b%wangshilong1991@gmail.com>
On Sun, Sep 01, 2013 at 08:51:11PM +0800, Wang Shilong wrote:
> Hello, Using checkpatch.pl, i get the following warnings(errors):
> WARNING: Avoid CamelCase: <port_array[wIndex]>
> #272: FILE: drivers/usb/host/xhci-hub.c:725:
> + temp = xhci_readl(port_array[wIndex]);
>
> total: 0 errors, 1 warnings, 826 lines checked
>
> patch has style problems, please review.
>
> If any of these errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
Ignore this warning. The variable is called wIndex because it
corresponds to a field in a USB control transfer, and that's what it's
called in the spec. In this case, wIndex is the index into the hub's
port array, so it's perfectly valid to use it as an array index here.
In general, if checkpatch.pl complains about a variable a patch
introduces that's CamelCase, you should pay attention to it. If it's a
variable that already present in USB code, it's probably used to match
the spec.
Sarah Sharp
next parent reply other threads:[~2013-09-03 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5223383f.hCMXrpqEq1AlVw9b%wangshilong1991@gmail.com>
2013-09-03 15:58 ` Sarah Sharp [this message]
2013-09-03 17:25 ` [PATCH] checkpatch: Extend CamelCase types and ignore existing CamelCase uses in a patch Joe Perches
2013-09-04 15:58 ` Sarah Sharp
2013-09-04 23:08 ` Joe Perches
2013-09-05 17:45 ` Sarah Sharp
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=20130903155857.GA2657@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kumargauravgupta3@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wangshilong1991@gmail.com \
/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
all inboxes | Powered by JetHome®