From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2D14C433EF for ; Tue, 1 Feb 2022 16:53:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 631876B0152; Tue, 1 Feb 2022 11:53:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E0DE6B0153; Tue, 1 Feb 2022 11:53:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D10C6B0154; Tue, 1 Feb 2022 11:53:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay035.a.hostedemail.com [64.99.140.35]) by kanga.kvack.org (Postfix) with ESMTP id 3E8086B0152 for ; Tue, 1 Feb 2022 11:53:13 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EA8F822F3F for ; Tue, 1 Feb 2022 16:53:12 +0000 (UTC) X-FDA: 79094806224.02.686CCE8 Received: from gofer.mess.org (gofer.mess.org [88.97.38.141]) by imf03.hostedemail.com (Postfix) with ESMTP id 8026620003 for ; Tue, 1 Feb 2022 16:53:12 +0000 (UTC) Received: by gofer.mess.org (Postfix, from userid 1000) id 9C4FA101BFE; Tue, 1 Feb 2022 16:53:11 +0000 (UTC) Date: Tue, 1 Feb 2022 16:53:11 +0000 From: Sean Young To: Shuah Khan Cc: Alexei Starovoitov , kernel test robot , Alexei Starovoitov , LKML , Linux Memory Management List , lkp@lists.01.org, kbuild test robot Subject: [PATCH] selftests/ir: fix build with ancient kernel headers Message-ID: References: <20220128075346.GG8421@xsang-OptiPlex-9020> <347bae9f-f775-4976-3d27-b0c725211d78@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <347bae9f-f775-4976-3d27-b0c725211d78@linuxfoundation.org> X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8026620003 X-Stat-Signature: ut39pbhymwyc14nqadroohgr56b8m6d9 X-Rspam-User: nil Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=mess.org; spf=pass (imf03.hostedemail.com: domain of sean@mess.org designates 88.97.38.141 as permitted sender) smtp.mailfrom=sean@mess.org X-HE-Tag: 1643734392-182660 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Since commit e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h"), the build of the selftests fails on rhel 8 since its version of /usr/include/linux/lirc.h has no definition of RC_PROTO_RCMM32 etc. Fixes: e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h") Reported-by: kernel test robot Signed-off-by: Sean Young --- tools/testing/selftests/ir/ir_loopback.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/selftests/ir/ir_loopback.c b/tools/testing/selftests/ir/ir_loopback.c index 06256c96df12..8dc104690adc 100644 --- a/tools/testing/selftests/ir/ir_loopback.c +++ b/tools/testing/selftests/ir/ir_loopback.c @@ -29,6 +29,13 @@ #define SYSFS_PATH_MAX 256 #define DNAME_PATH_MAX 256 +/* Support ancient lirc.h which does not have these values */ +#if RC_PROTO_MAX < 26 +#define RC_PROTO_RCMM12 24 +#define RC_PROTO_RCMM24 25 +#define RC_PROTO_RCMM32 26 +#endif + static const struct { enum rc_proto proto; const char *name; -- 2.34.1