Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1200487pxb; Thu, 16 Sep 2021 01:58:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjWIljXa5Xdkakj61PQuhYndnalcKrbLwrz78/Jwv2twnc+m2GPqc582PspA8PkX4ie4vF X-Received: by 2002:a17:907:1113:: with SMTP id qu19mr5124945ejb.524.1631782733455; Thu, 16 Sep 2021 01:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631782733; cv=none; d=google.com; s=arc-20160816; b=HkHqIAG1+sfTffARAOJrw4LXz3LYrUNkC33OK6ueH0/8oAX2cQInhbW6rGjHM9wop4 kWD/ayL7lrVnpd91oK3NL1JbUyJLyq+xoNYo0I3QN7ZN12PP5VjL1591YQ1gZ3Ydc1yb qwQPONi5mHtJs7H1Ona1IxenBd6P6YjbSotQTelw+Jwbmjv+yvuMCbd3ooHHdojjXbT8 GjskFOZKvWbdBhsW5QjkZwpdYJjmko40U9fkxiENxJPBVD9wsBVlSrtHpwyUDaIW6iz5 8zf7lofV19f9PTwqk6g58Jecj0OhPbttWSmSpGPsisI9NBu9TKvGGWvNToilvfOmIQ71 c3yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=+EQOzi6GoX/Ngw6/fSChQOM/x46HyAvx0gYxin2/a30=; b=eAxHKf5j0LNYu9YN4nPWLbrbFhS8UmrW3a/sR7NrnAIGh3UnACVm6yZfSq8DWVLA77 VxstPhLoiMBz48mrPerIRIid3lMjDTrAPHgMPth9Fwlu5qHRwzMQTQreVvgWKQDvvPjV nU9daQo2YOS/ZPA41M/GQr0ZMZlKAPFx8ZTBVNGrvlZhetFc4OGgT6+v2ahGN7mbnNAE RYCCd4rr5afpr8fUveNB7dLDGy2NER3jBJ06+kfh+9KfdLNCHK4a+3MAupZvWKFwAPHU 4V+gR0swW1xzEytsfRrQT3LNAQJ7ledenFSkBicP8j+vXTXa9ltMJViZZQEWo1cA7f3V sRIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn4si3373723ejb.658.2021.09.16.01.58.29; Thu, 16 Sep 2021 01:58:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235298AbhIPI5Z (ORCPT + 99 others); Thu, 16 Sep 2021 04:57:25 -0400 Received: from mail-vs1-f41.google.com ([209.85.217.41]:33502 "EHLO mail-vs1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235160AbhIPI5W (ORCPT ); Thu, 16 Sep 2021 04:57:22 -0400 Received: by mail-vs1-f41.google.com with SMTP id p24so5490629vsg.0; Thu, 16 Sep 2021 01:56:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+EQOzi6GoX/Ngw6/fSChQOM/x46HyAvx0gYxin2/a30=; b=IWOQAGjOqs4NAyVK8KpBI8yo8azPUub8f4mRBsZZRHxfiS5AVSFRVsdVmJBTaG2/ac nlpIdz+uOrrlZtn+WczOwkeQaNnCQQI+ZQGZvxaTygJ7/jMlOuUB3nGfR59vrl+QafCM kbkplTzgJqkc84iCiV/HZN8KY886Kr2yQhMLkNKdjwhMpy9YuJsgKrImGCg0D99y/TRw XP4KUzHK0UoG/vK6l/DhXlEGBcs4fRVwlylljlMBQOoOB7gv+EGEuEGvamVmXHBZ4/Cx avtRysraAC758MEjPngNcPzYxc2bM5yKxMcPvmVlgYrMz9iLeDppoVTSqNYa0I3LvsPv zHXg== X-Gm-Message-State: AOAM530Oj0+9NfrqY15v6mQypf7yRrByrVGyWqFFj4YXe1OoBPNd64Fb XwRidD3Cdmfx2Bqs2Y8FRmxAtOJkx1kG6PWsOaw= X-Received: by 2002:a67:cb0a:: with SMTP id b10mr3281079vsl.9.1631782561209; Thu, 16 Sep 2021 01:56:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Geert Uytterhoeven Date: Thu, 16 Sep 2021 10:55:49 +0200 Message-ID: Subject: Re: [PATCH] serial: 8250: SERIAL_8250_FSL should not default to y when compile-testing To: Johan Hovold Cc: Greg Kroah-Hartman , Jiri Slaby , Shawn Guo , Li Yang , Scott Wood , "open list:SERIAL DRIVERS" , linuxppc-dev , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, On Thu, Sep 16, 2021 at 10:46 AM Johan Hovold wrote: > On Wed, Sep 15, 2021 at 02:56:52PM +0200, Geert Uytterhoeven wrote: > > Commit b1442c55ce8977aa ("serial: 8250: extend compile-test coverage") > > added compile-test support to the Freescale 16550 driver. However, as > > SERIAL_8250_FSL is an invisible symbol, merely enabling COMPILE_TEST now > > enables this driver. > > > > Fix this by making SERIAL_8250_FSL visible. Tighten the dependencies to > > prevent asking the user about this driver when configuring a kernel > > without appropriate Freescale SoC or ACPI support. > > This tightening is arguable a separate change which risk introducing > regressions if you get it wrong and should go in a separate patch at > least. Getting it wrong would indeed be a regression, but not tightening that at the same time would mean I have to send a separate patch with a Fixes tag referring to this fix, following this template: foo should depend on bar The foo hardware is only present on bar SoCs. Hence add a dependency on bar, to prevent asking the user about this driver when configuring a kernel without bar support. > > Fixes: b1442c55ce8977aa ("serial: 8250: extend compile-test coverage") > > Signed-off-by: Geert Uytterhoeven > > --- > > Yes, it's ugly, but I see no better solution. Do you? > > > > drivers/tty/serial/8250/Kconfig | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig > > index 808268edd2e82a45..a2978b31144e94f2 100644 > > --- a/drivers/tty/serial/8250/Kconfig > > +++ b/drivers/tty/serial/8250/Kconfig > > @@ -361,9 +361,13 @@ config SERIAL_8250_BCM2835AUX > > If unsure, say N. > > > > config SERIAL_8250_FSL > > - bool > > + bool "Freescale 16550-style UART support (8250 based driver)" > > depends on SERIAL_8250_CONSOLE > > - default PPC || ARM || ARM64 || COMPILE_TEST > > + depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || (ARM64 && ACPI) || COMPILE_TEST > > + default FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || (ARM64 && ACPI) > > I'd suggest just doing > > bool "Freescale 16550-style UART support (8250 based driver)" > depends on SERIAL_8250_CONSOLE > default PPC || ARM || ARM64 > > Since neither of the symbols you add to that "depends on" line is an > actual build or runtime dependency. They are. > Then you can refine the "default" line in a follow up (or argue why you > think there should be a "depends on FSL_SOC || ..."). > > > + help > > + Selecting this option will add support for the 16550-style serial > > + port hardware found on Freescale SoCs. > > > > config SERIAL_8250_DW > > tristate "Support for Synopsys DesignWare 8250 quirks" Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds