usb/net: rndis: remove ambigous status codes
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 11 May 2012 22:15:59 +0000 (22:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 May 2012 19:03:14 +0000 (15:03 -0400)
The RNDIS status codes are redefined with much stranged ifdeffery
and only one of these codes was used in the hyperv driver, and
there it is very clearly referring to the RNDIS variant, not some
other status. So clarify this by explictly using the RNDIS_*
prefixed status code in the hyperv drivera and delete the
duplicate defines.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/rndis_filter.c
include/linux/rndis.h

index d6be64bcefd41fb2f2d009431616c1661d3d885b..0d1034839d68cf6f9a656a20aeedea3da1aa9074 100644 (file)
@@ -267,11 +267,11 @@ static void rndis_filter_receive_response(struct rndis_device *dev,
                            REMOTE_NDIS_RESET_CMPLT) {
                                /* does not have a request id field */
                                request->response_msg.msg.reset_complete.
-                                       status = STATUS_BUFFER_OVERFLOW;
+                                       status = RNDIS_STATUS_BUFFER_OVERFLOW;
                        } else {
                                request->response_msg.msg.
                                init_complete.status =
-                                       STATUS_BUFFER_OVERFLOW;
+                                       RNDIS_STATUS_BUFFER_OVERFLOW;
                        }
                }
 
index 430d72eefc09bccfc5c351e8a672793ba96aa06a..61b4185b860cd9949a7cb4bf365416a7b31515ae 100644 (file)
 /* From drivers/net/hyperv/hyperv_net.h */
 
 /*  Status codes */
-
-#ifndef STATUS_SUCCESS
-#define STATUS_SUCCESS                         (0x00000000L)
-#endif
-
-#ifndef STATUS_UNSUCCESSFUL
-#define STATUS_UNSUCCESSFUL                    (0xC0000001L)
-#endif
-
-#ifndef STATUS_PENDING
-#define STATUS_PENDING                         (0x00000103L)
-#endif
-
-#ifndef STATUS_INSUFFICIENT_RESOURCES
-#define STATUS_INSUFFICIENT_RESOURCES          (0xC000009AL)
-#endif
-
-#ifndef STATUS_BUFFER_OVERFLOW
-#define STATUS_BUFFER_OVERFLOW                 (0x80000005L)
-#endif
-
-#ifndef STATUS_NOT_SUPPORTED
-#define STATUS_NOT_SUPPORTED                   (0xC00000BBL)
-#endif
-
-#define RNDIS_STATUS_PENDING                   (STATUS_PENDING)
+#define RNDIS_STATUS_PENDING                   (0x00000103L)
 #define RNDIS_STATUS_NOT_RECOGNIZED            (0x00010001L)
 #define RNDIS_STATUS_NOT_COPIED                        (0x00010002L)
 #define RNDIS_STATUS_NOT_ACCEPTED              (0x00010003L)
 #define RNDIS_STATUS_NOT_RESETTABLE            (0x80010001L)
 #define RNDIS_STATUS_SOFT_ERRORS               (0x80010003L)
 #define RNDIS_STATUS_HARD_ERRORS               (0x80010004L)
-#define RNDIS_STATUS_BUFFER_OVERFLOW           (STATUS_BUFFER_OVERFLOW)
+#define RNDIS_STATUS_BUFFER_OVERFLOW           (0x80000005L)
 
-#define RNDIS_STATUS_RESOURCES                 (STATUS_INSUFFICIENT_RESOURCES)
+#define RNDIS_STATUS_RESOURCES                 (0xC000009AL)
 #define RNDIS_STATUS_CLOSING                   (0xC0010002L)
 #define RNDIS_STATUS_BAD_VERSION               (0xC0010004L)
 #define RNDIS_STATUS_BAD_CHARACTERISTICS       (0xC0010005L)