Commit 007e5c8e6aad8526e234b2481d2104e3e1fe8b88

Authored by Linus Walleij
Committed by David S. Miller
1 parent 7591157e18

usb/net: rndis: remove ambigous status codes

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>

Showing 2 changed files with 5 additions and 30 deletions Side-by-side Diff

drivers/net/hyperv/rndis_filter.c
... ... @@ -267,11 +267,11 @@
267 267 REMOTE_NDIS_RESET_CMPLT) {
268 268 /* does not have a request id field */
269 269 request->response_msg.msg.reset_complete.
270   - status = STATUS_BUFFER_OVERFLOW;
  270 + status = RNDIS_STATUS_BUFFER_OVERFLOW;
271 271 } else {
272 272 request->response_msg.msg.
273 273 init_complete.status =
274   - STATUS_BUFFER_OVERFLOW;
  274 + RNDIS_STATUS_BUFFER_OVERFLOW;
275 275 }
276 276 }
277 277  
include/linux/rndis.h
... ... @@ -268,32 +268,7 @@
268 268 /* From drivers/net/hyperv/hyperv_net.h */
269 269  
270 270 /* Status codes */
271   -
272   -#ifndef STATUS_SUCCESS
273   -#define STATUS_SUCCESS (0x00000000L)
274   -#endif
275   -
276   -#ifndef STATUS_UNSUCCESSFUL
277   -#define STATUS_UNSUCCESSFUL (0xC0000001L)
278   -#endif
279   -
280   -#ifndef STATUS_PENDING
281   -#define STATUS_PENDING (0x00000103L)
282   -#endif
283   -
284   -#ifndef STATUS_INSUFFICIENT_RESOURCES
285   -#define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL)
286   -#endif
287   -
288   -#ifndef STATUS_BUFFER_OVERFLOW
289   -#define STATUS_BUFFER_OVERFLOW (0x80000005L)
290   -#endif
291   -
292   -#ifndef STATUS_NOT_SUPPORTED
293   -#define STATUS_NOT_SUPPORTED (0xC00000BBL)
294   -#endif
295   -
296   -#define RNDIS_STATUS_PENDING (STATUS_PENDING)
  271 +#define RNDIS_STATUS_PENDING (0x00000103L)
297 272 #define RNDIS_STATUS_NOT_RECOGNIZED (0x00010001L)
298 273 #define RNDIS_STATUS_NOT_COPIED (0x00010002L)
299 274 #define RNDIS_STATUS_NOT_ACCEPTED (0x00010003L)
300 275  
... ... @@ -318,9 +293,9 @@
318 293 #define RNDIS_STATUS_NOT_RESETTABLE (0x80010001L)
319 294 #define RNDIS_STATUS_SOFT_ERRORS (0x80010003L)
320 295 #define RNDIS_STATUS_HARD_ERRORS (0x80010004L)
321   -#define RNDIS_STATUS_BUFFER_OVERFLOW (STATUS_BUFFER_OVERFLOW)
  296 +#define RNDIS_STATUS_BUFFER_OVERFLOW (0x80000005L)
322 297  
323   -#define RNDIS_STATUS_RESOURCES (STATUS_INSUFFICIENT_RESOURCES)
  298 +#define RNDIS_STATUS_RESOURCES (0xC000009AL)
324 299 #define RNDIS_STATUS_CLOSING (0xC0010002L)
325 300 #define RNDIS_STATUS_BAD_VERSION (0xC0010004L)
326 301 #define RNDIS_STATUS_BAD_CHARACTERISTICS (0xC0010005L)