* [PATCH 2/2] target: Don't request modules that aren't even built
@ 2018-10-20 16:45 Roland Dreier
2018-10-22 8:57 ` Christoph Hellwig
2018-10-24 1:19 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Roland Dreier @ 2018-10-20 16:45 UTC (permalink / raw)
To: target-devel
From: Roland Dreier <roland@purestorage.com>
If, for example, I don't enable CONFIG_TCM_PSCSI, then every time I load
the target subsystem, I get an annoying
Unable to load target_core_pscsi
kernel log message. Instead let's only request_module() on things if that
code is enabled.
Signed-off-by: Roland Dreier <roland@purestorage.com>
---
drivers/target/target_core_transport.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 86c0156e6c88..eee222db0a14 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -205,19 +205,19 @@ void transport_subsystem_check_init(void)
if (sub_api_initialized)
return;
- ret = request_module("target_core_iblock");
+ ret = IS_ENABLED(CONFIG_TCM_IBLOCK) && request_module("target_core_iblock");
if (ret != 0)
pr_err("Unable to load target_core_iblock\n");
- ret = request_module("target_core_file");
+ ret = IS_ENABLED(CONFIG_TCM_FILEIO) && request_module("target_core_file");
if (ret != 0)
pr_err("Unable to load target_core_file\n");
- ret = request_module("target_core_pscsi");
+ ret = IS_ENABLED(CONFIG_TCM_PSCSI) && request_module("target_core_pscsi");
if (ret != 0)
pr_err("Unable to load target_core_pscsi\n");
- ret = request_module("target_core_user");
+ ret = IS_ENABLED(CONFIG_TCM_USER2) && request_module("target_core_user");
if (ret != 0)
pr_err("Unable to load target_core_user\n");
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] target: Don't request modules that aren't even built
2018-10-20 16:45 [PATCH 2/2] target: Don't request modules that aren't even built Roland Dreier
@ 2018-10-22 8:57 ` Christoph Hellwig
2018-10-24 1:19 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-10-22 8:57 UTC (permalink / raw)
To: target-devel
On Sat, Oct 20, 2018 at 09:45:16AM -0700, Roland Dreier wrote:
> From: Roland Dreier <roland@purestorage.com>
>
> If, for example, I don't enable CONFIG_TCM_PSCSI, then every time I load
> the target subsystem, I get an annoying
>
> Unable to load target_core_pscsi
>
> kernel log message. Instead let's only request_module() on things if that
> code is enabled.
>
> Signed-off-by: Roland Dreier <roland@purestorage.com>
I guess this ok. I aways thought these request_module calls were a
horrible idea to start with, but just removing them now migh break
existing setups..
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] target: Don't request modules that aren't even built
2018-10-20 16:45 [PATCH 2/2] target: Don't request modules that aren't even built Roland Dreier
2018-10-22 8:57 ` Christoph Hellwig
@ 2018-10-24 1:19 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-10-24 1:19 UTC (permalink / raw)
To: target-devel
Roland,
> If, for example, I don't enable CONFIG_TCM_PSCSI, then every time I
> load the target subsystem, I get an annoying
>
> Unable to load target_core_pscsi
>
> kernel log message. Instead let's only request_module() on things if
> that code is enabled.
Applied to 4.20/scsi-queue, thank you!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-24 1:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-20 16:45 [PATCH 2/2] target: Don't request modules that aren't even built Roland Dreier
2018-10-22 8:57 ` Christoph Hellwig
2018-10-24 1:19 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.