Re: [v4:No,Change] xHCI:Fixing xhci_readl definition and function call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux