Message ID | 20230523085902.75837-3-herve.codina@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1998401vqo; Tue, 23 May 2023 02:10:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7TIzfmeJXZycu46uL2+DvAtRbq89TeHjG8sLODynhc79hyI5MQM6gu+Jn8L+XMigKN89D7 X-Received: by 2002:a05:6a00:1783:b0:644:d77:a2c5 with SMTP id s3-20020a056a00178300b006440d77a2c5mr20374871pfg.29.1684833012384; Tue, 23 May 2023 02:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684833012; cv=none; d=google.com; s=arc-20160816; b=QP4toDXM7PAolv/SzEWNPATm5T7H64g7Hy2uqioFiZPItSFLwrsN+OF6rh+OdIvxUn 66v5kc+T6EyCnKceBD9n3A5/TejoWIl1PbXfXKOMrjoSJOkVniSNlfB5xYuhW2Pt5tfG 60Np5pVuAz3l3gMKR5H0jZCqM9cl+vT//h1EY5NGwY4g0pIH99zjsKcv86/TUVFGRRqL KPf2M3gK4ReTVS5JFT9T6VqlV1//M5LE7BTpJf3WFg/aiOjSm3QZ8NInXCpzYYty9HhL Cfd22x4IVPAfmTzsqCO9KARsWERKuzuAg3LH1gxp4ydWNRixHzXKbdoOBjafFUPVqDvM 4Ljw== 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:from :dkim-signature; bh=hB0jH5VbqniXpY2XCqtCh3H0TPVZDlgFAeoWdY16lSQ=; b=MVGJqfhfNRxw97XLlHO/O0aMZoi3wDklqW/zew3r2ieYomnv1mP5n0B6SPSZHIcDcN 5oNqwjlOshhbxUe1klZBxnwj76t41k0TJrZQDAlPTzV2d0MuNEfppqmS1ov6Nzge7Dah lp2OmByabayEphTebi7WgoKmurlBniZai6pMVttJ3yfFM2SSne7hJXrxDWvgevn+UNxe ZXPpH3R702XR3w7FCIW89H0EHgeXhU01KqukLcWgsHryOXpQB+l1Fa3dRGWxP9CKbJto O53pueRgIs8wALMr6+K6WQVTsDwwJ/T9aIOdwehyPfVllVZpUoclUzNLy51Ru8jx5XMr iEtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Mw816vN8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a626401000000b0064729e5a04dsi6143053pfb.388.2023.05.23.02.09.59; Tue, 23 May 2023 02:10:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Mw816vN8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236280AbjEWI7d (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Tue, 23 May 2023 04:59:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236142AbjEWI7Y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 23 May 2023 04:59:24 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03A5A132; Tue, 23 May 2023 01:59:13 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 2D8A01C000E; Tue, 23 May 2023 08:59:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684832352; 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=hB0jH5VbqniXpY2XCqtCh3H0TPVZDlgFAeoWdY16lSQ=; b=Mw816vN8TcnBrfqTuNPEggUvaZItZxQ1MeLicdYfseZoMBoorR4ORd/ARlEOpS1cgZp1hw 0sG3pZC4coWfmm8liekXRLcMPfdvp2TMA/Px2we9hfRSHDr1bghzhC/tn9NjJgE60PAy11 XMAh/2o5xVgsfDw5ZcTC0FbCxKiDoUKktLDfwLDr4x9e6XXUasE4dwVbtWz2lPF/TF9zPE v9NcBijXdx7na0lNRCsioVYyRD7MOF2zbK8ZKe9m0dm8Vj3A7/jfMU0puanLfbCB8TcGDp LjDauu5pX317pW/k6pO8A4dFBfq7Yi5004JBbTjdlXsWSvQ5wihHsNrzJIvv+Q== From: Herve Codina <herve.codina@bootlin.com> To: Herve Codina <herve.codina@bootlin.com>, Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org> Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Mark Brown <broonie@kernel.org>, Christophe Leroy <christophe.leroy@csgroup.eu>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, kernel test robot <lkp@intel.com> Subject: [PATCH v2 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency Date: Tue, 23 May 2023 10:59:02 +0200 Message-Id: <20230523085902.75837-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230523085902.75837-1-herve.codina@bootlin.com> References: <20230523085902.75837-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766675460892757645?= X-GMAIL-MSGID: =?utf-8?q?1766675460892757645?= |
Series |
Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC
|
|
Commit Message
Herve Codina
May 23, 2023, 8:59 a.m. UTC
In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from
the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is
set.
Without this dependency, the linker fails with some missing symbols for
COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2.
This lead to:
depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST)
This dependency does not make sense anymore and can be simplified
removing all the COMPILE_TEST part.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202305160221.9XgweObz-lkp@intel.com/
Fixes: e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers")
---
drivers/tty/serial/Kconfig | 2 +-
drivers/tty/serial/cpm_uart/cpm_uart.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
Comments
On 23. 05. 23, 10:59, Herve Codina wrote: > In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from > the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is > set. > > Without this dependency, the linker fails with some missing symbols for > COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2. > > This lead to: > depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST) > > This dependency does not make sense anymore and can be simplified > removing all the COMPILE_TEST part. Then it's the same as my revert: https://lore.kernel.org/all/20230518055620.29957-1-jirislaby@kernel.org/ :D But nevermind. > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > Reported-by: kernel test robot <lkp@intel.com> > Link: https://lore.kernel.org/oe-kbuild-all/202305160221.9XgweObz-lkp@intel.com/ > Fixes: e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers") > --- > drivers/tty/serial/Kconfig | 2 +- > drivers/tty/serial/cpm_uart/cpm_uart.h | 2 -- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig > index 625358f44419..de092bc1289e 100644 > --- a/drivers/tty/serial/Kconfig > +++ b/drivers/tty/serial/Kconfig > @@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE > > config SERIAL_CPM > tristate "CPM SCC/SMC serial port support" > - depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST) > + depends on CPM2 || CPM1 > select SERIAL_CORE > help > This driver supports the SCC and SMC serial ports on Motorola > diff --git a/drivers/tty/serial/cpm_uart/cpm_uart.h b/drivers/tty/serial/cpm_uart/cpm_uart.h > index 0577618e78c0..46c03ed71c31 100644 > --- a/drivers/tty/serial/cpm_uart/cpm_uart.h > +++ b/drivers/tty/serial/cpm_uart/cpm_uart.h > @@ -19,8 +19,6 @@ struct gpio_desc; > #include "cpm_uart_cpm2.h" > #elif defined(CONFIG_CPM1) > #include "cpm_uart_cpm1.h" > -#elif defined(CONFIG_COMPILE_TEST) > -#include "cpm_uart_cpm2.h" > #endif > > #define SERIAL_CPM_MAJOR 204
On Tue, 23 May 2023 11:13:02 +0200 Jiri Slaby <jirislaby@kernel.org> wrote: > On 23. 05. 23, 10:59, Herve Codina wrote: > > In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from > > the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is > > set. > > > > Without this dependency, the linker fails with some missing symbols for > > COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2. > > > > This lead to: > > depends on CPM2 || CPM1 || (PPC32 && CPM2 && COMPILE_TEST) > > > > This dependency does not make sense anymore and can be simplified > > removing all the COMPILE_TEST part. > > Then it's the same as my revert: > https://lore.kernel.org/all/20230518055620.29957-1-jirislaby@kernel.org/ > > :D > > But nevermind. Sorry, I didn't look at your revert. Do you want a new iteration adding (same as your revert) ? Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Best regards, Hervé > > > Signed-off-by: Herve Codina <herve.codina@bootlin.com> > > Reported-by: kernel test robot <lkp@intel.com> > > Link: https://lore.kernel.org/oe-kbuild-all/202305160221.9XgweObz-lkp@intel.com/ > > Fixes: e3e7b13bffae ("serial: allow COMPILE_TEST for some drivers") > > --- > > drivers/tty/serial/Kconfig | 2 +- > > drivers/tty/serial/cpm_uart/cpm_uart.h | 2 -- > > 2 files changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig > > index 625358f44419..de092bc1289e 100644 > > --- a/drivers/tty/serial/Kconfig > > +++ b/drivers/tty/serial/Kconfig > > @@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE > > > > config SERIAL_CPM > > tristate "CPM SCC/SMC serial port support" > > - depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST) > > + depends on CPM2 || CPM1 > > select SERIAL_CORE > > help > > This driver supports the SCC and SMC serial ports on Motorola > > diff --git a/drivers/tty/serial/cpm_uart/cpm_uart.h b/drivers/tty/serial/cpm_uart/cpm_uart.h > > index 0577618e78c0..46c03ed71c31 100644 > > --- a/drivers/tty/serial/cpm_uart/cpm_uart.h > > +++ b/drivers/tty/serial/cpm_uart/cpm_uart.h > > @@ -19,8 +19,6 @@ struct gpio_desc; > > #include "cpm_uart_cpm2.h" > > #elif defined(CONFIG_CPM1) > > #include "cpm_uart_cpm1.h" > > -#elif defined(CONFIG_COMPILE_TEST) > > -#include "cpm_uart_cpm2.h" > > #endif > > > > #define SERIAL_CPM_MAJOR 204 >
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 625358f44419..de092bc1289e 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -769,7 +769,7 @@ config SERIAL_PMACZILOG_CONSOLE config SERIAL_CPM tristate "CPM SCC/SMC serial port support" - depends on CPM2 || CPM1 || (PPC32 && COMPILE_TEST) + depends on CPM2 || CPM1 select SERIAL_CORE help This driver supports the SCC and SMC serial ports on Motorola diff --git a/drivers/tty/serial/cpm_uart/cpm_uart.h b/drivers/tty/serial/cpm_uart/cpm_uart.h index 0577618e78c0..46c03ed71c31 100644 --- a/drivers/tty/serial/cpm_uart/cpm_uart.h +++ b/drivers/tty/serial/cpm_uart/cpm_uart.h @@ -19,8 +19,6 @@ struct gpio_desc; #include "cpm_uart_cpm2.h" #elif defined(CONFIG_CPM1) #include "cpm_uart_cpm1.h" -#elif defined(CONFIG_COMPILE_TEST) -#include "cpm_uart_cpm2.h" #endif #define SERIAL_CPM_MAJOR 204