From patchwork Mon Nov 21 16:09:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 13051343 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 6963BC4321E for ; Mon, 21 Nov 2022 16:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231661AbiKUQJU (ORCPT ); Mon, 21 Nov 2022 11:09:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229831AbiKUQJR (ORCPT ); Mon, 21 Nov 2022 11:09:17 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 291DCC72F0; Mon, 21 Nov 2022 08:09:16 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CE8B91F899; Mon, 21 Nov 2022 16:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1669046954; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyfNmcPz42geDnL1EI62RbwuzIIJ0tLz64n6CtQSE5I=; b=AxHbtyPn8fCOhgK03LCj+hsL1iGrhbOLg2ykdln3BBS3q2x7elr/R6Wkj8m8fCJB79AUQP TOo27oxKLH65LRjtrQ+L6EdBKjjw3ZmyOpQm4+8uuLj7DX6fpb/ELJR+mmOP/hLjP7zDe3 sAjsRdxOJVrHnS/UvbnGwyl80SfCkSo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1669046954; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyfNmcPz42geDnL1EI62RbwuzIIJ0tLz64n6CtQSE5I=; b=ko02FeoOF0N1Xxryj1kDA6bduoJiMktnvqb0DEqehmw5HBSDGM7KzAbEwQVMazZJ/tynFq BVT6DLS1yOOHlECw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8EBD21377F; Mon, 21 Nov 2022 16:09:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id y0E0Iaqie2N7VwAAMHmgww (envelope-from ); Mon, 21 Nov 2022 16:09:14 +0000 Date: Mon, 21 Nov 2022 17:09:11 +0100 From: Jean Delvare To: Sean Young Cc: Mauro Carvalho Chehab , Thierry Reding , "Uwe =?utf-8?q?Kleine-K=C3=B6nig?= " , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH] media: rc: Drop obsolete dependencies on COMPILE_TEST Message-ID: <20221121170911.7cd72bfc@endymion.delvare> Organization: SUSE Linux X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. It is actually better to always build such drivers with OF enabled, so that the test builds are closer to how each driver will actually be built on its intended target. Building them without OF may not test much as the compiler will optimize out potentially large parts of the code. In the worst case, this could even pop false positive warnings. Dropping COMPILE_TEST here improves the quality of our testing and avoids wasting time on non-existent issues. As a minor optimization, this also lets us drop of_match_ptr(), as we now know what it will resolve to, we might as well save cpp some work. Signed-off-by: Jean Delvare Cc: Sean Young Cc: Mauro Carvalho Chehab Cc: Thierry Reding Cc: "Uwe Kleine-König" Acked-by: Uwe Kleine-König --- drivers/media/rc/Kconfig | 4 ++-- drivers/media/rc/pwm-ir-tx.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) --- linux-6.0.orig/drivers/media/rc/Kconfig +++ linux-6.0/drivers/media/rc/Kconfig @@ -314,7 +314,7 @@ config IR_PWM_TX tristate "PWM IR transmitter" depends on LIRC depends on PWM - depends on OF || COMPILE_TEST + depends on OF help Say Y if you want to use a PWM based IR transmitter. This is more power efficient than the bit banging gpio driver. @@ -361,7 +361,7 @@ config IR_SERIAL_TRANSMITTER config IR_SPI tristate "SPI connected IR LED" depends on SPI && LIRC - depends on OF || COMPILE_TEST + depends on OF help Say Y if you want to use an IR LED connected through SPI bus. --- linux-6.0.orig/drivers/media/rc/pwm-ir-tx.c +++ linux-6.0/drivers/media/rc/pwm-ir-tx.c @@ -120,7 +120,7 @@ static struct platform_driver pwm_ir_dri .probe = pwm_ir_probe, .driver = { .name = DRIVER_NAME, - .of_match_table = of_match_ptr(pwm_ir_of_match), + .of_match_table = pwm_ir_of_match, }, }; module_platform_driver(pwm_ir_driver);