From patchwork Tue May 1 18:22:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 8328 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2607D23E23 for ; Tue, 1 May 2012 18:22:44 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id E0981A181B1 for ; Tue, 1 May 2012 18:22:43 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id l4so2641820yen.11 for ; Tue, 01 May 2012 11:22:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=AaZRhQYpdrgnHd1A3nVrjLl1qe5njNg62sqD1Zs83Lk=; b=LKXlGyq1qUJ7+pa2cWGKULoAIH3uZn2anXYD5fZg4tftBzdeS8O6MAYMmWW0iGQGON tHt2w0rFxam1WUK5iHc0HQH0leXDVI/A5k4GDMJ57330985BqBxvqwOlHlNBBEOhZMjT ASIUrcPzwSnE//uL2YVHBCRkG/R7WmUwL1YIbfQK7pfwPd0zfMA/o8ySbcYAlX9qmbjV PThRKsLRxMGIJbG9vzU9zbv5GSYzaUKvBrt3HXDy5l0mhaKHDYz4Qa231Gty86klDBLJ bU2unT0iC3TMunbqgUTJByplz/tvMIjAOWVLpzV/z9aAhfddFqPXVM8mSo3MsakRRYwW IbDA== Received: by 10.42.142.71 with SMTP id r7mr4500945icu.7.1335896563518; Tue, 01 May 2012 11:22:43 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp197954ibt; Tue, 1 May 2012 11:22:42 -0700 (PDT) Received: by 10.112.85.228 with SMTP id k4mr11770106lbz.76.1335896562289; Tue, 01 May 2012 11:22:42 -0700 (PDT) Received: from mail.df.lth.se (mail.df.lth.se. [194.47.250.12]) by mx.google.com with ESMTPS id ih7si8774314lab.20.2012.05.01.11.22.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 May 2012 11:22:42 -0700 (PDT) Received-SPF: neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=194.47.250.12; Authentication-Results: mx.google.com; spf=neutral (google.com: 194.47.250.12 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) smtp.mail=linus.walleij@linaro.org Received: from fecusia (c83-249-217-212.bredband.comhem.se [83.249.217.212]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.df.lth.se (Postfix) with ESMTPSA id 12AD865D56; Tue, 1 May 2012 20:22:40 +0200 (CEST) Received: by fecusia (sSMTP sendmail emulation); Tue, 1 May 2012 20:22:39 +0200 From: "Linus Walleij" To: netdev@vger.kernel.org, linux-usb@vger.kernel.org, Greg Kroah-Hartman , "David S. Miller" , Felipe Balbi Cc: Jussi Kivilinna , Haiyang Zhang , Wei Yongjun , Ben Hutchings , Linus Walleij Subject: [PATCH 03/13 v4] usb/net: rndis: remove ambigous status codes Date: Tue, 1 May 2012 20:22:37 +0200 Message-Id: <1335896557-13350-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQnxais8On6S/pHT3ucixQHxOV3BPgtxvZioypoGH91Bp9wJha876yzf3f1F5u6dXSwBjsr+ 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 Signed-off-by: Linus Walleij --- drivers/net/hyperv/rndis_filter.c | 4 ++-- include/linux/rndis.h | 31 +++---------------------------- 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index d6be64b..0d10348 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c @@ -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; } } diff --git a/include/linux/rndis.h b/include/linux/rndis.h index 430d72e..61b4185 100644 --- a/include/linux/rndis.h +++ b/include/linux/rndis.h @@ -268,32 +268,7 @@ /* 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) @@ -318,9 +293,9 @@ #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)