All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	Douglas Anderson <dianders@chromium.org>,
	Saravana Kannan <saravanak@google.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	linux-arm-msm@vger.kernel.org, John Stultz <jstultz@google.com>,
	Peter Robinson <pbrobinson@redhat.com>,
	Steev Klimaszewski <steev@kali.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Enric Balletbo i Serra <eballetbo@redhat.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Brian Masney <bmasney@redhat.com>, Rob Herring <robh@kernel.org>,
	Javier Martinez Canillas <javierm@redhat.com>
Subject: [PATCH v2 2/4] driver core: Set deferred probe timeout to 0 if modules are disabled
Date: Wed, 16 Nov 2022 13:00:43 +0100	[thread overview]
Message-ID: <20221116120043.519614-1-javierm@redhat.com> (raw)
In-Reply-To: <20221116115348.517599-1-javierm@redhat.com>

There is no point to schedule the work queue to timeout the deferred probe
if all the initcalls are done and modules are not enabled. The default for
this case is already 0 but can be overridden by the deferred_probe_timeout
parameter. Let's just disable to avoid queuing a work that is not needed.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

(no changes since v1)

 drivers/base/dd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 040b4060f903..1e8f1afeac98 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -350,8 +350,10 @@ static int deferred_probe_initcall(void)
 	flush_work(&deferred_probe_work);
 	initcalls_done = true;
 
-	if (!IS_ENABLED(CONFIG_MODULES))
+	if (!IS_ENABLED(CONFIG_MODULES)) {
+		driver_deferred_probe_timeout = 0;
 		fw_devlink_drivers_done();
+	}
 
 	/*
 	 * Trigger deferred probe again, this time we won't defer anything
-- 
2.38.1


  parent reply	other threads:[~2022-11-16 12:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 11:53 [PATCH v2 0/4] driver core: Decouple device links enforcing and probe deferral timeouts Javier Martinez Canillas
2022-11-16 11:53 ` [PATCH v2 1/4] driver core: Make driver_deferred_probe_timeout a static variable Javier Martinez Canillas
2022-11-16 12:57   ` Andrew Halaney
2022-11-17 19:14   ` John Stultz
2022-12-12  8:50     ` Javier Martinez Canillas
2022-12-12  8:59       ` Greg Kroah-Hartman
2022-12-12  9:06         ` Javier Martinez Canillas
2022-11-16 12:00 ` Javier Martinez Canillas [this message]
2022-11-16 16:39   ` [PATCH v2 2/4] driver core: Set deferred probe timeout to 0 if modules are disabled Andrew Halaney
2022-11-16 16:51     ` Javier Martinez Canillas
2022-11-16 12:01 ` [PATCH v2 3/4] driver core: Add fw_devlink.timeout param to stop waiting for devlinks Javier Martinez Canillas
2022-11-16 16:09   ` Randy Dunlap
2022-11-16 19:05   ` Andrew Halaney
2022-11-17 15:19   ` Andrew Halaney
2022-11-17 18:55     ` Javier Martinez Canillas
2022-11-17 19:07   ` John Stultz
2022-11-17 19:16     ` Javier Martinez Canillas
2022-11-16 12:02 ` [PATCH v2 4/4] driver core: Disable driver deferred probe timeout by default Javier Martinez Canillas
2022-11-16 19:15   ` Andrew Halaney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221116120043.519614-1-javierm@redhat.com \
    --to=javierm@redhat.com \
    --cc=andersson@kernel.org \
    --cc=bmasney@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=eballetbo@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jstultz@google.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbrobinson@redhat.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --cc=steev@kali.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.