Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp736827ybl; Wed, 21 Aug 2019 04:56:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAv6FgQAT1Y941cOKCKCjgVBwZ0WefEPpJ/hNhJ9kE2PeLK704e5oLQWxVoIGsz8Pbgwd7 X-Received: by 2002:a63:205f:: with SMTP id r31mr29042646pgm.159.1566388598164; Wed, 21 Aug 2019 04:56:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566388598; cv=none; d=google.com; s=arc-20160816; b=0cbIaUcGYpDJBP57Tm+wo8SGS493U0magReXmyLof2VeRm+eb3gjp/SzE0p7Ycar/l fkzuxup8aQR7syLKGLxiW+o492u7PjG4zywvF2CyUH2vre/Z9sKFsx9Fao03wC2IZxUo nnZXRcaQCdEJ34lBzHdvMdJaeb+pDNhJppdGX2mEd/4kRwl08eyUkeihIazaC/rIu4jF 8QweiZEfg1ElgwjuYNbAgPZ4x2FEuuPmA/DlDbT9nVrhnjI3DczGYKv56g9iNXPzpZ/7 uyajbItcX7DkKTDmh0eLE3J7uVq1XuKiQ3Uj86bhXCxOyJo+Xcpz86MQwL0HFhcmHsay sZjg== 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=ALxGfvRXdmbGtlmXxys2ao74GC6bY40UmqO1RMzwV3c=; b=kjDkDt8Lru3124jALtTW9VL1pChyfHkpi6WQDvsTK8/Hzw7eUTSuLAZn1KF/ro0o90 RiWEVt4oUBgiT+W6Sz+DTEm3kgUtpN+Pvh9JPS/N3ZjZ+U8LI624SMa7F2ExMTBwQU2z TvAIne9zC3VqVWYjxyA+Z6698eylJ2LW2QclX3V/6OAqIwZFCSHMC3dScZSMeT3Q38T6 qUwdi0SFqG2d+/FLNg76wSsEasLepIl93hymT31KRppS+0DAMMd6BUMx0WJfkxJ8xT1x ngRpe9Preh3BySceCR18CL9OtNeT0llzutGaTSoySYtKrtF3jHscbnwnC0UTmdJA8bOI 5cfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BB+B1cyn; 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 d25si14006790pge.301.2019.08.21.04.56.22; Wed, 21 Aug 2019 04:56:38 -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=BB+B1cyn; 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 S1728231AbfHULzF (ORCPT + 99 others); Wed, 21 Aug 2019 07:55:05 -0400 Received: from mail-vs1-f74.google.com ([209.85.217.74]:56175 "EHLO mail-vs1-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728199AbfHULzD (ORCPT ); Wed, 21 Aug 2019 07:55:03 -0400 Received: by mail-vs1-f74.google.com with SMTP id s72so615815vss.22 for ; Wed, 21 Aug 2019 04:55:02 -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=ALxGfvRXdmbGtlmXxys2ao74GC6bY40UmqO1RMzwV3c=; b=BB+B1cynrJTIjRUmdwFTrf471xENpbMGYMHqBQtaW3NPyeEHxaY8A4Iafcf1TF/mZn OXIQ4TWMabQFcspFJLwPwl15L31HK4OKG0stYx6y4zWPKZ/++HVLWQtxM9EBUu/RKrd6 dmT0RRyYs/kHMvcdbgS56d4g7mbh4CyLgDvHATC1cPmY/Q/nMT3tepGglRKyA/6kjNs8 ChilfULl/9ygU0aUvyRAkEnhEh8yqkuE1vJaOZloaUklpW2AfQEwLeBG5+pcbE51S/bH Y2WV2tp5rrGGJRzU1DlYSmHzWrn50n4eUxYbdkZP/FN19p2Lw+TdKX7b2N2q3UAMS9uw Aprw== 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=ALxGfvRXdmbGtlmXxys2ao74GC6bY40UmqO1RMzwV3c=; b=ivSSELjeFRvGZf2sRUeBn9KE2jysCvxebexsLPAt15O040Q5bFOkupJc08htths1oB a6+65qWKJbQ4bIuU4X2qUAoBy1xNOUFarLt6mi7FYmBrtCpuzkhyWDOGgABYo+iHHO3Q dsj5C3OMguNC1/r4sAmE4lRSoegEr81wdzojWmxRhKyWpDothN95/ZXxoU7mkTcGZKVY 1NnV0QJBO5zcrq+t3iERg2k3gukHKiS/Yk3ehvt8kmh6Ij3U4MMK6yhvKn0PhW/p0gbs +i2rgbn9bI/naFiW4gDncPHsEbENuaiDyi+U5xeb8n48vdNjbdGNNcefFTr1YXiBsPGf QU+A== X-Gm-Message-State: APjAAAUV7vSc8iDMgaU/g49qS+CnGnLvcNX9SyEIBOMC6wpfc10WTMmu LbDk9fhJqqDjOPX047+Tr3kxi+SS5GrO1PfFB80ZlvaP7hhchit1svu6Vh4V7IrQ2OjJcXODG5/ akx5y9N5m7E0sAlUKZBMlVYcwHwf6zJiIzJqZHq7Wx0QOEKw0oUVOe8Ogos8l/JI6D/J7CbHEFF c= X-Received: by 2002:a67:e906:: with SMTP id c6mr20280699vso.82.1566388501903; Wed, 21 Aug 2019 04:55:01 -0700 (PDT) Date: Wed, 21 Aug 2019 12:49:25 +0100 In-Reply-To: <20190821114955.12788-1-maennich@google.com> Message-Id: <20190821114955.12788-11-maennich@google.com> Mime-Version: 1.0 References: <20190813121733.52480-1-maennich@google.com> <20190821114955.12788-1-maennich@google.com> X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH v3 10/11] 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, geert@linux-m68k.org, gregkh@linuxfoundation.org, hpa@zytor.com, jeyu@kernel.org, joel@joelfernandes.org, kstewart@linuxfoundation.org, linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-modules@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, lucas.de.marchi@gmail.com, maco@android.com, maco@google.com, michal.lkml@markovi.net, mingo@redhat.com, oneukum@suse.com, pombredanne@nexb.com, sam@ravnborg.org, sspatil@google.com, stern@rowland.harvard.edu, tglx@linutronix.de, usb-storage@lists.one-eyed-alien.net, x86@kernel.org, yamada.masahiro@socionext.com 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. 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 cc794e25a0b6..edbe419053d6 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.rc1.153.gdeed80330f-goog