Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2425355pxy; Tue, 3 Aug 2021 06:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxczkC00m6hnLZBoHvLolWx1uavF16m9xMyHUpuW97MWamzZL/Hu8GjpGInkJe97TIH/cCL X-Received: by 2002:a05:6402:1011:: with SMTP id c17mr24612971edu.144.1627996665630; Tue, 03 Aug 2021 06:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627996665; cv=none; d=google.com; s=arc-20160816; b=VU5E7NkM7Wc/eUA87ge+6S9Z4DSMYoHs1j02YJv3ZkpYWsTqx7mm6gcxTnRShGK/KG Y0ws7eiLrpUrYMVuk8wYq8iAUq1+3rXMxVeM6Z5WCgL0JKeA8fK2HXCR2O5BibwaKMmq jGvKhQFUGOxprUs0ppISd0Iwz+Mq/1PtTwFRF22ou9rV785OosPMKcc71UCLiaWPqi8f YgfrXsKW1lFVXZawPzCA9L5ltRc5OG7cVr1OcgkhednOclZRPKOyDYssS5X+AIYHL4LR xgVIUGj+vKfTrrhbSayMgUnLkPXz+/c7JtzMhgh/Do/YuPH/jhIxJV0OCyk6606d8x00 nXew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=YrVcD8ygaFjwAnuxINro61t3A9aQfh8ZamB2CFd3jhk=; b=OscOaGwC3ZsE8XQu7UKYDFxni5q+AHznY3778ouOfrTOw+UdGRXYBpVF9rh6F5uVX0 RfPBTzY1Ix/MX7ZR5+1ZrNdGuJveTzB47mu8sjWCem30jrmXJZ262JYVdJMjTFrP2B2E DEpPczzbP9LQws+6G4RfOIxTz3XCeGTFXfvAKAqhY6X0TTVquTz+h02K3XsRZX2S9qkD MpPz230265mndtgScwlzjNzMNrRbJ6Mtz7WBOj8WfNQJxQu5U13IV+qrTwbl28XCcqxB 5OINeuoxSj8hyR+oQZZ2a3lqJqAqApN7txm8i3+5B5eXvZRhf4hprSL2Ke/mTCwmrC0k ns8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gcgMBAhw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si13604047eji.655.2021.08.03.06.17.21; Tue, 03 Aug 2021 06:17:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gcgMBAhw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236279AbhHCNNm (ORCPT + 99 others); Tue, 3 Aug 2021 09:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236292AbhHCNNT (ORCPT ); Tue, 3 Aug 2021 09:13:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F079C061764 for ; Tue, 3 Aug 2021 06:13:08 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1627996385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YrVcD8ygaFjwAnuxINro61t3A9aQfh8ZamB2CFd3jhk=; b=gcgMBAhwyVAMXqC4uuTXYVp1dcSdpln/lAUtuECym+NJZaQLzAApQUWRoE3WS63RBxfHFZ Yg/OiCEhKyGX3wcUMoHqYaTnwppyWaZX5UMXw6kcvGGA+Wa5ZZ3axrccKy84fo4QY63a0s 8bm1yho/8xZ8UjB53gkob+CDULq2rm83TH+VKB/XEmGIF1IGnHNARyBMABUQ5MdWqAuW57 N97geq/IGvUSjbviFLSeZykvde42ud6HNb9pP781UiRQVTSfgeWUuj8CYrFl1WYs5MiwSR LtceLqeYjRlitAJRLCzLCOfLAYypaLCyyNjwQygnFqX/prSJ/h4ohMiLzJLSrQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1627996385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YrVcD8ygaFjwAnuxINro61t3A9aQfh8ZamB2CFd3jhk=; b=4K6kVET+39M5t/VjLgk8/OajILonh7E9bxt6LVvKHCzyzSvPWDcL0Ew96AY7fnOqshHJts DfnConNRCWwYcmBQ== To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH printk v1 05/10] printk: call boot_delay_msec() in printk_delay() Date: Tue, 3 Aug 2021 15:18:56 +0206 Message-Id: <20210803131301.5588-6-john.ogness@linutronix.de> In-Reply-To: <20210803131301.5588-1-john.ogness@linutronix.de> References: <20210803131301.5588-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org boot_delay_msec() is always called immediately before printk_delay() so just call it from within printk_delay(). Signed-off-by: John Ogness --- kernel/printk/printk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 8bdfac4c9ee9..d07d98c1e846 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1877,8 +1877,10 @@ SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) int printk_delay_msec __read_mostly; -static inline void printk_delay(void) +static inline void printk_delay(int level) { + boot_delay_msec(level); + if (unlikely(printk_delay_msec)) { int m = printk_delay_msec; @@ -2350,8 +2352,7 @@ asmlinkage int vprintk_emit(int facility, int level, in_sched = true; } - boot_delay_msec(level); - printk_delay(); + printk_delay(level); printed_len = vprintk_store(facility, level, dev_info, fmt, args); -- 2.20.1