From patchwork Thu Feb 2 10:23:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 51835 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp163013wrn; Thu, 2 Feb 2023 02:44:50 -0800 (PST) X-Google-Smtp-Source: AK7set/mdp8wgchbumLkCwLn3WUdk+ga+gDZq/oH6Y1f9YnXalOn0Cy/yBUk4H5rJ9xFkVDPuSaY X-Received: by 2002:aa7:91c2:0:b0:593:b538:760a with SMTP id z2-20020aa791c2000000b00593b538760amr4948633pfa.5.1675334690258; Thu, 02 Feb 2023 02:44:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675334690; cv=none; d=google.com; s=arc-20160816; b=sbw9UXdX3DJcIS1TjczdOInSI4F8I2qNE6HxD7ZhwrD7NU8/XGR8GMpcZ4q5F8vXfp U2yqxed3bmvKyxhV1zGHA2i0aLPD9ohcjdQka84qW/XC+dyVZxJ9tf/3croZK7FGFUPJ HWawrCf6c3Kg2ixuE1YKD1gtEDCO6fHaALXjs1zGQXjH9Hah6NfF3NfEGm6d++7/IMbR Qvaxym53sJTSX97h/+sR47EXHiX9gUzm0HpqYBDbZN8q2ftxKfO3ON8/Nd1KdavRDOP8 3kMpkBdhOW5iXx5aMVYLaGHmgl3cMz0FEztEhKkZMGHm3cis1NtOQ21ocj52OjWSBHh+ KznA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Yyr8+CmnHgrZ8psR/CR5gaLAPFoqqalHuRS1aRghUN0=; b=m+1o1KaG8xYiyqMmY5WgEl/u+YhvOMXB6NwEDkLzj6OsY/iTJ9Ah/Fs3/RTnLkKYpz lJxChom0rY7wvMQu3vPZyXD1jxx1eBALAPfv8HgYaGwToAl/0zsARl/qzfR6/7QMun9F gMcjWfdK6ynpifxQHvW7dUojV9Mg/nDfDa8ZuODDyi9ZFbNZpaQ0IB00X7x/NvT36FU7 CahfsIK7zcjrX4R2r+tg40M3l4CCkTxXvqwU/KvG6HDujTO64c9MtA9/r+vAXHoHg8nF xoHqL4SSNn/REtvwZLOHL9SFjFJO2MDvE65rm9pVsu1595vqkgDnGo99WcXtEJGNx6Vg dttQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FO9KuJmG; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 195-20020a6219cc000000b00575757288e4si21840152pfz.90.2023.02.02.02.44.38; Thu, 02 Feb 2023 02:44:50 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=FO9KuJmG; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232241AbjBBKX4 (ORCPT + 99 others); Thu, 2 Feb 2023 05:23:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbjBBKXx (ORCPT ); Thu, 2 Feb 2023 05:23:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D50D3B76C for ; Thu, 2 Feb 2023 02:23:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 58A2A61A41 for ; Thu, 2 Feb 2023 10:23:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1679FC433EF; Thu, 2 Feb 2023 10:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675333431; bh=GQnjXYU/0vipHeT3iMCCPZhv1dMM4Kiss8fVyftaCCs=; h=From:To:Cc:Subject:Date:From; b=FO9KuJmGsOGokap/NEOXVwllrmT7/6YtYkfeRLa2ZwjrTHQ8zI26aUPp0/nfeN/t9 cCjFtnkV0KssN6qacocE4N7GjxfflefrDXQveEVBTwUnlElU2mExy2WxQfZKlBfS7K OzuhIA636DPK8xJWjTIqf8hskhTkaHv6Bd4lDXGK/RdjnQCYLvghkCO/ZmcDrxHxF2 6/HD5LaqWB3sh7Oo3FI2rtBPSwh6EWDxMQC8g+XWGDreVmqxGZaVN7yFioYRFEcssv dgo+j/smoUfTQO3+YoiJHuG2BIYZILCwOU7xMD3GfXCykI0vYvLbxrFwXsnAFcqgkK aX4YKVSLCPpqQ== From: Arnd Bergmann To: Emma Anholt , Maxime Ripard Cc: Arnd Bergmann , David Airlie , Daniel Vetter , Thomas Zimmermann , Sam Ravnborg , Javier Martinez Canillas , Zheng Bin , Danilo Krummrich , =?utf-8?q?Ma=C3=ADra_Canal?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/vc4: allow DRM_VC4_KUNIT_TEST to be a loadable module Date: Thu, 2 Feb 2023 11:23:32 +0100 Message-Id: <20230202102346.868771-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756715748122685135?= X-GMAIL-MSGID: =?utf-8?q?1756715748122685135?= From: Arnd Bergmann In configurations with CONFIG_KUNIT=m, builting the unit test into the kernel causes a link failure: arm-linux-gnueabi-ld: drivers/gpu/drm/vc4/tests/vc4_mock.o: in function `__build_mock': vc4_mock.c:(.text+0x6e): undefined reference to `kunit_do_failed_assertion' arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x9c): undefined reference to `kunit_do_failed_assertion' arm-linux-gnueabi-ld: vc4_mock.c:(.text+0x100): undefined reference to `kunit_ptr_not_err_assert_format' ... Allow this to be a loadable module as well to have Kconfig sort out the dependencies correctly. Fixes: f759f5b53f1c ("drm/vc4: tests: Introduce a mocking infrastructure") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/vc4/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/Kconfig b/drivers/gpu/drm/vc4/Kconfig index f423941c028d..91dcf8d174d6 100644 --- a/drivers/gpu/drm/vc4/Kconfig +++ b/drivers/gpu/drm/vc4/Kconfig @@ -36,7 +36,7 @@ config DRM_VC4_HDMI_CEC and want to use CEC. config DRM_VC4_KUNIT_TEST - bool "KUnit tests for VC4" if !KUNIT_ALL_TESTS + tristate "KUnit tests for VC4" if !KUNIT_ALL_TESTS depends on DRM_VC4 && KUNIT select DRM_KUNIT_TEST_HELPERS default KUNIT_ALL_TESTS