]> git.baikalelectronics.ru Git - kernel.git/commit
USB: Remove duplicate USB 3.0 hub feature #defines.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 6 Jan 2012 00:28:54 +0000 (16:28 -0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 10 Feb 2012 22:24:31 +0000 (14:24 -0800)
commit7e5af4dd5c2066a49c0cfb60b5ed85f6fc7d4ed4
tree113835295efcfd8edbcb7dc052181deca7e4d8ff
parent2e933257de51cbf02633860efdca260d8cb4b99c
USB: Remove duplicate USB 3.0 hub feature #defines.

Somehow we ended up with duplicate hub feature #defines in ch11.h.
Tatyana Brokhman first created the USB 3.0 hub feature macros in 2.6.38
with commit 944c55b13430a6e96f81c6e3c00225d140418f61 "usb: USB3.0 ch11
definitions".  In 2.6.39, I modified a patch from John Youn that added
similar macros in a different place in the same file, and committed
e027f9002bec4ebea232c8094d67e286d4bb33a6 "USB 3.0 Hub Changes".

Some of the #defines used different names for the same values.  Others
used exactly the same names with the same values, like these gems:

 #define USB_PORT_FEAT_BH_PORT_RESET     28
...
 #define USB_PORT_FEAT_BH_PORT_RESET            28

According to my very geeky husband (who looked it up in the C99 spec),
it is allowed to have object-like macros with duplicate names as long as
the replacement list is exactly the same.  However, he recalled that
some compilers will give warnings when they find duplicate macros.  It's
probably best to remove the duplicates in the stable tree, so that the
code compiles for everyone.

The macros are now fixed to move the feature requests that are specific
to USB 3.0 hubs into a new section (out of the USB 2.0 hub feature
section), and use the most common macro name.

This patch should be backported to 2.6.39.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Tatyana Brokhman <tlinder@codeaurora.org>
Cc: John Youn <johnyoun@synopsys.com>
Cc: Jamey Sharp <jamey@minilop.net>
Cc: stable@vger.kernel.org
include/linux/usb/ch11.h