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 92464C433EF for ; Tue, 1 Feb 2022 18:38:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EBDEC8D007C; Tue, 1 Feb 2022 13:38:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E6CA18D006D; Tue, 1 Feb 2022 13:38:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DA9F98D007C; Tue, 1 Feb 2022 13:38:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0022.hostedemail.com [216.40.44.22]) by kanga.kvack.org (Postfix) with ESMTP id CC64B8D006D for ; Tue, 1 Feb 2022 13:38:38 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 886439A29E for ; Tue, 1 Feb 2022 18:38:38 +0000 (UTC) X-FDA: 79095071916.22.74D9DC6 Received: from gofer.mess.org (gofer.mess.org [88.97.38.141]) by imf11.hostedemail.com (Postfix) with ESMTP id 1CE9F40006 for ; Tue, 1 Feb 2022 18:38:37 +0000 (UTC) Received: by gofer.mess.org (Postfix, from userid 1000) id 54DAD101BFE; Tue, 1 Feb 2022 18:38:36 +0000 (UTC) Date: Tue, 1 Feb 2022 18:38:36 +0000 From: Sean Young To: Shuah Khan Cc: Matthew Wilcox , Alexei Starovoitov , kernel test robot , Alexei Starovoitov , LKML , Linux Memory Management List , lkp@lists.01.org, kbuild test robot Subject: [PATCH v2] selftests/ir: fix build with ancient kernel headers Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Authentication-Results: imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of sean@mess.org designates 88.97.38.141 as permitted sender) smtp.mailfrom=sean@mess.org; dmarc=pass (policy=none) header.from=mess.org X-Rspam-User: nil X-Rspamd-Queue-Id: 1CE9F40006 X-Stat-Signature: f6qy5ipfmnq1psyjpdwziuyseitexy6o X-Rspamd-Server: rspam12 X-HE-Tag: 1643740717-320867 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 [1]. [1] https://lkml.org/lkml/2022/1/28/275 Fixes: e2bcbd7769ee ("tools headers UAPI: remove stale lirc.h") Reviewed-by: Shuah Khan Reported-by: kernel test robot Signed-off-by: Sean Young --- tools/testing/selftests/ir/ir_loopback.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/testing/selftests/ir/ir_loopback.c b/tools/testing/selftests/ir/ir_loopback.c index 06256c96df12..f4a15cbdd5ea 100644 --- a/tools/testing/selftests/ir/ir_loopback.c +++ b/tools/testing/selftests/ir/ir_loopback.c @@ -29,6 +29,16 @@ #define SYSFS_PATH_MAX 256 #define DNAME_PATH_MAX 256 +/* + * Support ancient lirc.h which does not have these values. Can be removed + * once RHEL 8 is no longer a relevant testing platform. + */ +#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