From patchwork Fri Mar 4 15:19:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 12769328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03FE7C433F5 for ; Fri, 4 Mar 2022 15:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240232AbiCDPXT (ORCPT ); Fri, 4 Mar 2022 10:23:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240223AbiCDPXR (ORCPT ); Fri, 4 Mar 2022 10:23:17 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33DF10A6; Fri, 4 Mar 2022 07:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=h4FCNEPQwTG4sN1msaWa8+oYY6eRjb1lItZHTcbmJsA=; b=HvjqSCmDT7NxHR1WfgWeLckGZK s73J8y0wubGQnoJWwN6ER55IZfO7cqLKAftOn3ALwvg0oIGaOryZQG26pNdtpwyZx4VY8FMmY3vW5 KPXPlgxRNhb/qmKCryj91ARhfy5LOz5I0HUv+WDfUh6860r5CcxNCiHYR+qGrJxgkzNPaZB0Xw0Gi sKyMVMfxowaDNGZQVRCKeflnSpNeQeJCfyo0icU5nCDBh0pIH9ZusbfP/0qqPXOp+zenbIShSiVW3 LcxFzOpce8iFuWXXHVrWhadr0XOzFhZR1xTsIRw9AH/76SaaKxGVVXojt4JxrATBJ0exwvfc6Cp+7 YmJL5LUQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nQ9l4-00FEIl-SV; Fri, 04 Mar 2022 15:22:18 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 86444300454; Fri, 4 Mar 2022 16:22:17 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 6E1D72C546F73; Fri, 4 Mar 2022 16:22:17 +0100 (CET) Message-ID: <20220304152135.975568860@infradead.org> User-Agent: quilt/0.66 Date: Fri, 04 Mar 2022 16:19:55 +0100 From: Peter Zijlstra To: x86@kernel.org, mathias.nyman@linux.intel.com, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, rdunlap@infradead.org, linux-usb@vger.kernel.org Subject: [PATCH 2/3] usb: early: xhci-dbc: Remove duplicate keep parsing References: <20220304151953.830111479@infradead.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The generic earlyprintk= parsing already parses the optional ",keep", no need to duplicate that in the xdbc driver. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kernel/early_printk.c | 2 +- drivers/usb/early/xhci-dbc.c | 5 ++--- include/linux/usb/xhci-dbgp.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) --- a/arch/x86/kernel/early_printk.c +++ b/arch/x86/kernel/early_printk.c @@ -387,7 +387,7 @@ static int __init setup_early_printk(cha #endif #ifdef CONFIG_EARLY_PRINTK_USB_XDBC if (!strncmp(buf, "xdbc", 4)) - early_xdbc_parse_parameter(buf + 4); + early_xdbc_parse_parameter(buf + 4, keep); #endif buf++; --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -599,7 +599,7 @@ static int __init xdbc_early_setup(void) return 0; } -int __init early_xdbc_parse_parameter(char *s) +int __init early_xdbc_parse_parameter(char *s, int keep_early) { unsigned long dbgp_num = 0; u32 bus, dev, func, offset; @@ -608,8 +608,7 @@ int __init early_xdbc_parse_parameter(ch if (!early_pci_allowed()) return -EPERM; - if (strstr(s, "keep")) - early_console_keep = true; + early_console_keep = keep_early; if (xdbc.xdbc_reg) return 0; --- a/include/linux/usb/xhci-dbgp.h +++ b/include/linux/usb/xhci-dbgp.h @@ -15,7 +15,7 @@ #define __LINUX_XHCI_DBGP_H #ifdef CONFIG_EARLY_PRINTK_USB_XDBC -int __init early_xdbc_parse_parameter(char *s); +int __init early_xdbc_parse_parameter(char *s, int keep_early); int __init early_xdbc_setup_hardware(void); void __init early_xdbc_register_console(void); #else