Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1194712pxb; Thu, 16 Sep 2021 01:48:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0BnrHhU26EsqY2D28s2uDC2VTCQ7dMkL9WqSFd6/UzQOAPIsxoion6TldTMg+UDPsrb5R X-Received: by 2002:a02:19c9:: with SMTP id b192mr3470876jab.67.1631782086677; Thu, 16 Sep 2021 01:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631782086; cv=none; d=google.com; s=arc-20160816; b=ZduYcWjwELFf3pQsE/EIH+MIHJYrGqPL+8dnOOQjsJfjL2AmfYCxzKcwV2cPsy5BRR 6f/a8G/iAP7SrvUC03zm36iP3mUjZCahOI5Rn2c+a/A9gGvPfOjNmQCcgo42+VzDer8h k6sSbhkT0vEIApqskBhOQzAyZpk8RuxfwoVr8hfcX29yeD+8e7AawMwcZkIsV9yA15wS zXvUFgnPyxiHVS6FFAFRK5swIWB2XhTYl+ntyrgchyJqSIcgMsREPbhlOx9YGz3iGAB4 3vW6mUolqUIeTXJVymcXFa4jouThgoh0r6IxBX0vSdByZnTOdkIuoSDzCA5FdC7S/H9U 25Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y7vD6SFdHt2wORfA/D6hSuHBmQEueGZ/L2he0Kg8NA4=; b=z8Ibb/BgZS+htAfq21b+/K8baRMxnk5F0wZIfzrPiOe2oYl7fP0BHK7UxIvLAb+Q+e pvqyHgxRdcYGVz0lWVYvDBVVOf2mr4LD4y5s3B5Ie91V3jbsY6+s3ojocQk4vYJaLKdC iYPKquN6gpUq1HaWEPW9TuTctlZpvO3bPAh7fTxF/Hl6A5iwP/J9qoqozvLKulwtL4iP 38+gbLFIew5RJa3O0ULCkVStqcSgtBzWyXTvFeUKS6GlXS70QfuQUQEv11FQKFd/iGLD dAV1WaYYJ+5TkmsdA5vJoXPEClyT7PyadCNibMyz5/C4eMlAApMrr3z7wO2/Ua/Z/OTo 2C8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K3gvozuA; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m24si2171631jac.82.2021.09.16.01.47.54; Thu, 16 Sep 2021 01:48:06 -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=@kernel.org header.s=k20201202 header.b=K3gvozuA; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235154AbhIPIrX (ORCPT + 99 others); Thu, 16 Sep 2021 04:47:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:59088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232063AbhIPIrX (ORCPT ); Thu, 16 Sep 2021 04:47:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DBE8161186; Thu, 16 Sep 2021 08:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631781962; bh=k+xFcxsCHW/uNXmjHa0Nr0f88jRZmDO6nuT79AEQX+Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K3gvozuAluP/t6T5rAVT8FgUC1sFJ7ltdfLPSULlEMb34wv96zypajJZW9UHk7cwQ 6zXzP8BFCk+puZhWMidmE543N/5J8WQZ7VXRwvJsytk3Bq9pBZKKItvcZx352nVL8v GSwGTJyDfJBWYjDmYG4xw+ylJXvbhgFj/Jlb/jMNLpuZd4BZdHMMn/TL2FVVJranR5 Kvq/Rsftli90QUfP4TexcqAQ8be+KXVAW5cq++vJyy10mg5jYPeSODiwUCpT1vHDia O14ojf4ptaxnr2pJbSVGgLmsg7wM/+SP+hX//0WZAMKiQ0EQi+hnxayCIuzxXgZOW7 k0SFbnB97+04Q== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1mQn1v-00051u-EF; Thu, 16 Sep 2021 10:46:03 +0200 Date: Thu, 16 Sep 2021 10:46:03 +0200 From: Johan Hovold To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , Jiri Slaby , Shawn Guo , Li Yang , Scott Wood , linux-serial@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] serial: 8250: SERIAL_8250_FSL should not default to y when compile-testing Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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. 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" Johan