Received: by 10.223.185.116 with SMTP id b49csp1121671wrg; Fri, 23 Feb 2018 12:18:08 -0800 (PST) X-Google-Smtp-Source: AH8x224LGxWqukyGlZw6Q4fIhNdK7hqoR98ip2kfBHE/7WIMBCP3x7oFR9Jfbihz2Mg0Mp4rX8HY X-Received: by 10.99.160.80 with SMTP id u16mr2272066pgn.389.1519417088460; Fri, 23 Feb 2018 12:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417088; cv=none; d=google.com; s=arc-20160816; b=dmDi0AFavDlo6rr43/UWKLXteo33FO9t7QMN4Fwycua3x9GBh++R5x8fEMLuovPJ3q OdpwU5Fyz2zRDe+IfaWFqFgennCtHQ5RwzDDaI+Y9I5hED2CTcJEyXlli65XwgqgJcAu fD3U5senz2gaQYAi0KtdFN2Ro3sTOjukYgbLybaMT02xh/d+BenopIr2z48kwXeaJdlc PecSSphZmWFI/NBTlYcQRKbVhNGLTr4nIS+ksMWeCXoCKugyUAMlXPcfM5164jzhkGG4 1i1Kunjwz/VswciD0j8vzvN7jt0h5m0w0TmnwBwqkJch/1f222haK5RliiWxvWGlZqMy tfbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=m6b2rmSJ3uAUYZ62D1jWX5b6ljMP3ktMwRLjcjXr7ZA=; b=GAqlOGLHaKHkvJA0IFgqZ5uz6EuzCMC7nUhLpdfwb7DoD1djhLfckrh2omCCFZHBSR tZWmSI3wyTzgfAkEoNYqxJLTANrSH666VPeQtpXNsJDWxVr623JrbmeJSDDSwX76SU7k m/xHD74xtASsmVZLCxTRizSgJf0k5OYl0I/grFa+o1asLr8y77NEEssSr1Cagf8uBsC+ hHDhvVPRpndUkink7QSZtaZ/RpZXltAe7rxeCSTNZbYDgXQi65+mROaw/mJIkviW97gO OidHnwnuTkr9nJmw2G8d4+Vuee3lJ7qPeCSiHFE87Y4rLVn8X7Bxf4//vGvfl33KLvOg CEYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y190si1925684pgd.177.2018.02.23.12.17.54; Fri, 23 Feb 2018 12:18:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755232AbeBWURQ (ORCPT + 99 others); Fri, 23 Feb 2018 15:17:16 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39928 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbeBWSkO (ORCPT ); Fri, 23 Feb 2018 13:40:14 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3ECCA1182; Fri, 23 Feb 2018 18:40:13 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "David S. Miller" Subject: [PATCH 4.4 113/193] USB: cdc_subset: only build when one driver is enabled Date: Fri, 23 Feb 2018 19:25:46 +0100 Message-Id: <20180223170343.604027996@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit f3bb23764fac042d189129d485d3a9246cb777da upstream. 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: Greg Kroah-Hartman --- drivers/net/usb/Kconfig | 10 ++++++++++ drivers/net/usb/Makefile | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig @@ -395,6 +395,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 @@ -413,6 +417,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. @@ -420,6 +425,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 @@ -428,6 +434,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 @@ -437,6 +444,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 @@ -454,6 +462,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. @@ -461,6 +470,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. --- a/drivers/net/usb/Makefile +++ b/drivers/net/usb/Makefile @@ -23,7 +23,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