From patchwork Thu Mar 1 15:27:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130291 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2952721edc; Thu, 1 Mar 2018 07:38:47 -0800 (PST) X-Google-Smtp-Source: AG47ELtK0YQ2QAt7K0YDK5Ey8qdVkITZUj/or6e3el+I+PLVrZ2pSPWzy7c/HUuIumMnY4gavCE5 X-Received: by 2002:a17:902:6c4f:: with SMTP id h15-v6mr2276420pln.435.1519918726932; Thu, 01 Mar 2018 07:38:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918726; cv=none; d=google.com; s=arc-20160816; b=InplMR//kJ/C2vqb/kFECUJXkZ00sUiTK8BQcjk+epBabz1Pj09KPhFNFh9rL5SBz+ SJX1TO68xWjgXiADwycGFFIrC8GnHkRqN0UM4oybkQI0wKs+S/FfhIZ8nJD1NvielN2L Mbz8mmdk/xsGbUKjeLGz/VIWc6O/xpGvrVnK6ZcLywDFzf70xy5l42zI+tSEOw49S52h qgL0mp9+mmrZ3TzBwHdagM5k/TR2V/qQdWI6fM0YjgJKepY3CgcLSMUAbpPpLrDLFqzy zH+/5Khxh7ypqHwQKTIL22WM30AOv1oMj8DJETivOJeLiJcdSBWTndDQyWezeRsD8Gdo MR0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=sGg1yS0W65HG3rNy0Zm5C3/rIBfHbnr5DV6Qfgypb/8=; b=ZDIEboKr4a87PnxWO1T80bnsapNTI1A6hmUAXBoPMDiXsHLCAgCVaclMHxgObZUSJ1 EoxGncl6yDF3Nj3F8DbjRrJZkuc4sFdePFSKBFz82C78ynOhqHc4MkAeHtpIeMl54tMu Ut6oEi+hEWt+ZbrB5wklsTwtPxyUOMmTWlStzBFTODGHfJbdCQTf4SPZrxuIxrm3NVAg ebHjiaPdEat25GwzB6KUrflPgBT8HVOmKZIhqOL/Nu+Rk9Myn9H08fx3a7bncgA2HxLj 0dc0rl/TvxqXlQ2KAR8hqO57xD97n3KZaCGV0aa4EbkcB2KoWYO0vkIpI/XU/JlgusVe 3Xag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=AUtoNV5p; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si2586092pgs.318.2018.03.01.07.38.46; Thu, 01 Mar 2018 07:38:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=AUtoNV5p; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032578AbeCAPio (ORCPT + 10 others); Thu, 1 Mar 2018 10:38:44 -0500 Received: from mail-cys01nam02on0109.outbound.protection.outlook.com ([104.47.37.109]:53120 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032560AbeCAPic (ORCPT ); Thu, 1 Mar 2018 10:38:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sGg1yS0W65HG3rNy0Zm5C3/rIBfHbnr5DV6Qfgypb/8=; b=AUtoNV5pbJXZZSzU7C6BuFI+Y2Gi6CjADFSK+6Wj9+kdgScWT2pCN/L6c0WFJw48zfwMYr/W2H/LfxLWqV+Qo64uqukhlp1y+Np7Fbbp+UGEMMJSMRGwq5VqeJPAOhIr6T1hXZazNwHjd0rFuzGJILB1Y76WaUblObK/5QshXzo= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1077.namprd21.prod.outlook.com (52.132.130.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.3; Thu, 1 Mar 2018 15:38:30 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:38:30 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , "David S . Miller" , Sasha Levin Subject: [added to the 4.1 stable tree] USB: cdc_subset: only build when one driver is enabled Thread-Topic: [added to the 4.1 stable tree] USB: cdc_subset: only build when one driver is enabled Thread-Index: AQHTsXHPNJrcb9tzg0yT6Ah/zxPOpw== Date: Thu, 1 Mar 2018 15:27:29 +0000 Message-ID: <20180301152116.1486-467-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1077; 7:pG5nffwvb7QoRiHPwynv6+3dCsC/Qlil3+72sFUBmWFh35UE9hIfb0EsChtPnzEKzoS0opzjsdReFPsGIJCOCRL6i/19uCHkE92l9tN3QJtTED4z+D6S332HOh7Ct0CHOrvcpIhJDNrWfYODfvEhMntjOptexuT8qVRd7QppnrOZsNaIMlKFJiLy+D9snN+vNbenvP4iiTzByRaQLAZU3JMXFLMs65yoYHqPJzjFE8GIZglXKWPA327APwoKp0qX x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d9581314-cac8-4306-cf7b-08d57f8a7c03 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:DM5PR2101MB1077; x-ms-traffictypediagnostic: DM5PR2101MB1077: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501224)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR2101MB1077; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1077; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(39380400002)(39860400002)(396003)(366004)(189003)(199004)(81166006)(2900100001)(10090500001)(2906002)(81156014)(66066001)(8676002)(1076002)(6116002)(3846002)(105586002)(8936002)(107886003)(186003)(106356001)(478600001)(22452003)(14454004)(4326008)(68736007)(25786009)(10290500003)(102836004)(6506007)(6346003)(59450400001)(26005)(36756003)(72206003)(6512007)(53936002)(6486002)(3280700002)(6436002)(3660700001)(316002)(76176011)(110136005)(5250100002)(86362001)(54906003)(575784001)(7736002)(5660300001)(2950100002)(99286004)(86612001)(2501003)(305945005)(97736004)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1077; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: CepTquNkwEf6WP/zKe6dQgv1rWRauYQMbCZXYqMSJMHBcfNYE2YmzrSSD1YQO7JNGJlFx6unE5oF0L0pOjK9ZmFqlB+xPvfm9p54z9aCAeZgBQbxIsgt3yRcDh7FKgzJNTjSF7BXvDw2eFYozn8YaKGqLI2aiAFiHOkPf+XLmwE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9581314-cac8-4306-cf7b-08d57f8a7c03 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:27:29.7598 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1077 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit f3bb23764fac042d189129d485d3a9246cb777da ] This avoids a harmless randconfig warning I get when USB_NET_CDC_SUBSET is enabled, but all of the more specific drivers are not: drivers/net/usb/cdc_subset.c:241:2: #warning You need to configure some hardware for this driver The current behavior is clearly intentional, giving a warning when a user picks a configuration that won't do anything good. The only reason for even addressing this is that I'm getting close to eliminating all 'randconfig' warnings on ARM, and this came up a couple of times. My workaround is to not even build the module when none of the configurations are enable. Alternatively we could simply remove the #warning (nothing wrong for compile-testing), turn it into a runtime warning, or change the Kconfig options into a menu to hide CONFIG_USB_NET_CDC_SUBSET. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/Kconfig | 10 ++++++++++ drivers/net/usb/Makefile | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 2b47cbae524c..9a9e0ea05a72 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig @@ -382,6 +382,10 @@ config USB_NET_RNDIS_HOST The protocol specification is incomplete, and is controlled by (and for) Microsoft; it isn't an "Open" ecosystem or market. +config USB_NET_CDC_SUBSET_ENABLE + tristate + depends on USB_NET_CDC_SUBSET + config USB_NET_CDC_SUBSET tristate "Simple USB Network Links (CDC Ethernet subset)" depends on USB_USBNET @@ -400,6 +404,7 @@ config USB_NET_CDC_SUBSET config USB_ALI_M5632 bool "ALi M5632 based 'USB 2.0 Data Link' cables" depends on USB_NET_CDC_SUBSET + select USB_NET_CDC_SUBSET_ENABLE help Choose this option if you're using a host-to-host cable based on this design, which supports USB 2.0 high speed. @@ -407,6 +412,7 @@ config USB_ALI_M5632 config USB_AN2720 bool "AnchorChips 2720 based cables (Xircom PGUNET, ...)" depends on USB_NET_CDC_SUBSET + select USB_NET_CDC_SUBSET_ENABLE help Choose this option if you're using a host-to-host cable based on this design. Note that AnchorChips is now a @@ -415,6 +421,7 @@ config USB_AN2720 config USB_BELKIN bool "eTEK based host-to-host cables (Advance, Belkin, ...)" depends on USB_NET_CDC_SUBSET + select USB_NET_CDC_SUBSET_ENABLE default y help Choose this option if you're using a host-to-host cable @@ -424,6 +431,7 @@ config USB_BELKIN config USB_ARMLINUX bool "Embedded ARM Linux links (iPaq, ...)" depends on USB_NET_CDC_SUBSET + select USB_NET_CDC_SUBSET_ENABLE default y help Choose this option to support the "usb-eth" networking driver @@ -441,6 +449,7 @@ config USB_ARMLINUX config USB_EPSON2888 bool "Epson 2888 based firmware (DEVELOPMENT)" depends on USB_NET_CDC_SUBSET + select USB_NET_CDC_SUBSET_ENABLE help Choose this option to support the usb networking links used by some sample firmware from Epson. @@ -448,6 +457,7 @@ config USB_EPSON2888 config USB_KC2190 bool "KT Technology KC2190 based cables (InstaNet)" depends on USB_NET_CDC_SUBSET + select USB_NET_CDC_SUBSET_ENABLE help Choose this option if you're using a host-to-host cable with one of these chips. diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile index e2797f1e1b31..ed5a577c1a61 100644 --- a/drivers/net/usb/Makefile +++ b/drivers/net/usb/Makefile @@ -22,7 +22,7 @@ obj-$(CONFIG_USB_NET_GL620A) += gl620a.o obj-$(CONFIG_USB_NET_NET1080) += net1080.o obj-$(CONFIG_USB_NET_PLUSB) += plusb.o obj-$(CONFIG_USB_NET_RNDIS_HOST) += rndis_host.o -obj-$(CONFIG_USB_NET_CDC_SUBSET) += cdc_subset.o +obj-$(CONFIG_USB_NET_CDC_SUBSET_ENABLE) += cdc_subset.o obj-$(CONFIG_USB_NET_ZAURUS) += zaurus.o obj-$(CONFIG_USB_NET_MCS7830) += mcs7830.o obj-$(CONFIG_USB_USBNET) += usbnet.o