Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2113782ybe; Tue, 3 Sep 2019 08:11:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqymqoa40vrGZvkROQZNBTSh6EaX4jMWWlqK42MmkFIqUE5DsABXGcu9WrP9ZNkgQQU+Zs12 X-Received: by 2002:a62:86cf:: with SMTP id x198mr18041040pfd.234.1567523461297; Tue, 03 Sep 2019 08:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567523461; cv=none; d=google.com; s=arc-20160816; b=0Fv7X/SknBK+aaFyeMOdnipC73WSeDqB9FwcHNWCTsVM7Sc3lnAoLzrD9ZZnHmxNnf YzUw1l+JhrlIHIoVhMC2rOpX0cTbMY3N4f6clBdE35LPa5ElgZ06W7QZ4pYwHIrh35lg h1gZ36vk7cbxbB5mihwd+WTdwxd+CZx4dWdUD5FLAh49qRLZOWsRve+Aig3CJ5r2qPvc 11X0iw7a4Wnczp9cepSbg6kzS1+ds0QLpmrbry+f+0nO+nerCm5b/qbD0cg9Z4FmKPWG yKG56Hvjw5oGeOUkGche9ta3NCyiqgGAGQ7AFgbJlRywGNF0Sn8hbXZfpvPb3LATymAH yW9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:from :subject:references:mime-version:message-id:in-reply-to:date :dkim-signature; bh=u5uO9nHL9grY4Qf1Kv34RIYuP69k6hUWKvOump+fF1c=; b=USSW37o1WfIwuNA7j4UqaNhrl97v9CmQ9s513IOWxEMiompghZQ1J2Rfj77LGV3FiN WeFQ94QuZHzK3TzQuFvEbzwzmXTW5WFYbcAQXUVU9mT7OQXEkA6ibkXnpbxWzF8QHPc5 IdYGpvRe3ivh7BqhGF0v6Y7DELFgKcGL0ymbEzUFIDGSX6OpIDOhUaW87mIy/L0svBSn rdTiBXjFlnWmnn+6IcooB+uuGqyQmd1p+rss6PeOQ/BCvivcnPzW8m6elEY0HJW+Vfav LiV19/xlMDbVDpPzNvll3bwk8x0oj6b8IdwGwiVgsIKff9DzCZ3KfAbfaXSGDVSbn/aR jo2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=H2wObk8o; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si11380293pgg.496.2019.09.03.08.10.45; Tue, 03 Sep 2019 08:11:01 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=H2wObk8o; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729965AbfICPIG (ORCPT + 99 others); Tue, 3 Sep 2019 11:08:06 -0400 Received: from mail-yb1-f202.google.com ([209.85.219.202]:38952 "EHLO mail-yb1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729931AbfICPH4 (ORCPT ); Tue, 3 Sep 2019 11:07:56 -0400 Received: by mail-yb1-f202.google.com with SMTP id f71so14146087ybg.6 for ; Tue, 03 Sep 2019 08:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=u5uO9nHL9grY4Qf1Kv34RIYuP69k6hUWKvOump+fF1c=; b=H2wObk8oBmJaRvXI7+P7eSG1NaG2LXqvmczSJPOAEv8LMU+IasDj2jHJwpZjxZyEVv D7AhVPj1qNPL/7u4OE1FNAqo3oVC3msvs4wK2zC7vPwoqC6A52vi7DfMCmNWMycyG93g 9PyLi2vhOIZVFChWzS2inK364xh8MGTaYJ2F5yiiIUw09JuK7s/MxlNdCwg/FlzYXPj/ GivmeYvfGeLAFX/Pqh8GMiLAgOWZ1BFn88Stp3ojobvlyFC/9dQYxpi3BRe6UbfpxXUj XGkgaWavEXuqQV2+WlECC0L5XQtPiZg7A6+k3n8MhjCqEH7Effel3sblCD5YayDzAo1X dCOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=u5uO9nHL9grY4Qf1Kv34RIYuP69k6hUWKvOump+fF1c=; b=pbCLj76jUBmF8xwjLooKJ+2XoSa0E5D0qMfWuinyvb8uz8su7q01jjkzvt1fQ0olrh 2ok1LwnDPCG3Dcu9TY45n2mzFUXQP7SOl9B7CzC1pLL11NmafNohjjuXxacAJGMfPYD0 huNq5bHFBIHQ+cJBPwCdmQcznu+ADmb7O0ZFcv3lipiVG+b9tJmw28Tpy75uagLOtnen 8cF3Q2nhCJ1wPhWbduC3k54sWoCKUhkbf0cmkb3VoERqpbGZr0/7qXpqwFAHx7MEHxna 3IjsRZWT/DrotmA1H+FOJsgTXHdKMGP5AA5sit4A5rSDeOHGd6caoTAqrbtnTSxgqsS7 kV2A== X-Gm-Message-State: APjAAAWaZwc1N1uRT1se+uEUmjat7vjlJgR53PYSNBgjpG+AuTGQi8E3 KhRGni7pxY66NU9dXdeVbyoqJRLqmkLg7SguYNbIEVioWtgXxPRZLi61BcEoej9c/QIItxYzPkU WQqQxteUwVt5SCrgPlKKna+LnwIsc5P79t6vpV5ZNWlqks5SbNL+/FVu5PR2hEDBfaw+FNaxaeR 8= X-Received: by 2002:a81:310e:: with SMTP id x14mr15409228ywx.430.1567523275811; Tue, 03 Sep 2019 08:07:55 -0700 (PDT) Date: Tue, 3 Sep 2019 16:06:37 +0100 In-Reply-To: <20190903150638.242049-1-maennich@google.com> Message-Id: <20190903150638.242049-12-maennich@google.com> Mime-Version: 1.0 References: <20180716122125.175792-1-maco@android.com> <20190903150638.242049-1-maennich@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog Subject: [PATCH v4 11/12] RFC: usb-storage: export symbols in USB_STORAGE namespace From: Matthias Maennich To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, maennich@google.com, arnd@arndb.de, gregkh@linuxfoundation.org, jeyu@kernel.org, joel@joelfernandes.org, lucas.de.marchi@gmail.com, maco@android.com, sspatil@google.com, will@kernel.org, yamada.masahiro@socionext.com, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, linux-watchdog@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modules using these symbols are required to explicitly import the namespace. This patch was generated with the following steps and serves as a reference to use the symbol namespace feature: 1) Define DEFAULT_SYMBOL_NAMESPACE in the corresponding Makefile 2) make (see warnings during modpost about missing imports) 3) make nsdeps Instead of a DEFAULT_SYMBOL_NAMESPACE definition, the EXPORT_SYMBOL_NS variants can be used to explicitly specify the namespace. The advantage of the method used here is that newly added symbols are automatically exported and existing ones are exported without touching their respective EXPORT_SYMBOL macro expansion. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Matthias Maennich --- drivers/usb/storage/Makefile | 2 ++ drivers/usb/storage/alauda.c | 1 + drivers/usb/storage/cypress_atacb.c | 1 + drivers/usb/storage/datafab.c | 1 + drivers/usb/storage/ene_ub6250.c | 1 + drivers/usb/storage/freecom.c | 1 + drivers/usb/storage/isd200.c | 1 + drivers/usb/storage/jumpshot.c | 1 + drivers/usb/storage/karma.c | 1 + drivers/usb/storage/onetouch.c | 1 + drivers/usb/storage/realtek_cr.c | 1 + drivers/usb/storage/sddr09.c | 1 + drivers/usb/storage/sddr55.c | 1 + drivers/usb/storage/shuttle_usbat.c | 1 + drivers/usb/storage/uas.c | 1 + 15 files changed, 16 insertions(+) diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile index a67ddcbb4e24..46635fa4a340 100644 --- a/drivers/usb/storage/Makefile +++ b/drivers/usb/storage/Makefile @@ -8,6 +8,8 @@ =20 ccflags-y :=3D -I $(srctree)/drivers/scsi =20 +ccflags-y +=3D -DDEFAULT_SYMBOL_NAMESPACE=3DUSB_STORAGE + obj-$(CONFIG_USB_UAS) +=3D uas.o obj-$(CONFIG_USB_STORAGE) +=3D usb-storage.o =20 diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c index 6b8edf6178df..ddab2cd3d2e7 100644 --- a/drivers/usb/storage/alauda.c +++ b/drivers/usb/storage/alauda.c @@ -36,6 +36,7 @@ MODULE_DESCRIPTION("Driver for Alauda-based card readers"); MODULE_AUTHOR("Daniel Drake "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 /* * Status bytes diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypr= ess_atacb.c index 4825902377eb..a6f3267bbef6 100644 --- a/drivers/usb/storage/cypress_atacb.c +++ b/drivers/usb/storage/cypress_atacb.c @@ -22,6 +22,7 @@ MODULE_DESCRIPTION("SAT support for Cypress USB/ATA bridges with ATACB"); MODULE_AUTHOR("Matthieu Castet "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 /* * The table of devices diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c index 09353be199be..588818483f4b 100644 --- a/drivers/usb/storage/datafab.c +++ b/drivers/usb/storage/datafab.c @@ -54,6 +54,7 @@ MODULE_DESCRIPTION("Driver for Datafab USB Compact Flash reader"); MODULE_AUTHOR("Jimmie Mayfield "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 struct datafab_info { unsigned long sectors; /* total sector count */ diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6= 250.c index c26129d5b943..8b1b73065421 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c @@ -26,6 +26,7 @@ =20 MODULE_DESCRIPTION("Driver for ENE UB6250 reader"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); MODULE_FIRMWARE(SD_INIT1_FIRMWARE); MODULE_FIRMWARE(SD_INIT2_FIRMWARE); MODULE_FIRMWARE(SD_RW_FIRMWARE); diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c index 4f542df37a44..34e7eaff1174 100644 --- a/drivers/usb/storage/freecom.c +++ b/drivers/usb/storage/freecom.c @@ -29,6 +29,7 @@ MODULE_DESCRIPTION("Driver for Freecom USB/IDE adaptor"); MODULE_AUTHOR("David Brown "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 #ifdef CONFIG_USB_STORAGE_DEBUG static void pdump(struct us_data *us, void *ibuffer, int length); diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 2b474d60b4db..c4da3fd6eff9 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c @@ -53,6 +53,7 @@ MODULE_DESCRIPTION("Driver for In-System Design, Inc. ISD200 ASIC"); MODULE_AUTHOR("Bj=C3=B6rn Stenberg "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 static int isd200_Initialization(struct us_data *us); =20 diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.= c index 917f170c4124..229bf0c1afc9 100644 --- a/drivers/usb/storage/jumpshot.c +++ b/drivers/usb/storage/jumpshot.c @@ -51,6 +51,7 @@ MODULE_DESCRIPTION("Driver for Lexar \"Jumpshot\" Compact Flash reader"); MODULE_AUTHOR("Jimmie Mayfield "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 /* * The table of devices diff --git a/drivers/usb/storage/karma.c b/drivers/usb/storage/karma.c index 395cf8fb5870..05cec81dcd3f 100644 --- a/drivers/usb/storage/karma.c +++ b/drivers/usb/storage/karma.c @@ -23,6 +23,7 @@ MODULE_DESCRIPTION("Driver for Rio Karma"); MODULE_AUTHOR("Bob Copeland , Keith Bennett "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 #define RIO_PREFIX "RIOP\x00" #define RIO_PREFIX_LEN 5 diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.= c index 39a5009a41a6..a989fe930e21 100644 --- a/drivers/usb/storage/onetouch.c +++ b/drivers/usb/storage/onetouch.c @@ -25,6 +25,7 @@ MODULE_DESCRIPTION("Maxtor USB OneTouch hard drive button driver"); MODULE_AUTHOR("Nick Sillik "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 #define ONETOUCH_PKT_LEN 0x02 #define ONETOUCH_BUTTON KEY_PROG1 diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek= _cr.c index 1d9ce9cbc831..3789698d9d3c 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c @@ -35,6 +35,7 @@ MODULE_DESCRIPTION("Driver for Realtek USB Card Reader"); MODULE_AUTHOR("wwang "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 static int auto_delink_en =3D 1; module_param(auto_delink_en, int, S_IRUGO | S_IWUSR); diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c index bc9da736bdfc..51bcd4a43690 100644 --- a/drivers/usb/storage/sddr09.c +++ b/drivers/usb/storage/sddr09.c @@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Driver for SanDisk SDDR-09 SmartMedia reader"); MODULE_AUTHOR("Andries Brouwer , Robert Baruch "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 static int usb_stor_sddr09_dpcm_init(struct us_data *us); static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us); diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c index b8527c55335b..ba955d65eb0e 100644 --- a/drivers/usb/storage/sddr55.c +++ b/drivers/usb/storage/sddr55.c @@ -29,6 +29,7 @@ MODULE_DESCRIPTION("Driver for SanDisk SDDR-55 SmartMedia reader"); MODULE_AUTHOR("Simon Munton"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 /* * The table of devices diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shut= tle_usbat.c index 854498e1012c..54aa1392c9ca 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c @@ -48,6 +48,7 @@ MODULE_DESCRIPTION("Driver for SCM Microsystems (a.k.a. Shuttle) USB-ATAPI= cable"); MODULE_AUTHOR("Daniel Drake , Robert Baruch "); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); =20 /* Supported device types */ #define USBAT_DEV_HP8200 0x01 diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 047c5922618f..bf80d6f81f58 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -1219,5 +1219,6 @@ static struct usb_driver uas_driver =3D { module_usb_driver(uas_driver); =20 MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(USB_STORAGE); MODULE_AUTHOR( "Hans de Goede , Matthew Wilcox and Sarah Sharp"); --=20 2.23.0.187.g17f5b7556c-goog