Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp129202imm; Mon, 14 May 2018 22:27:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpqKcBUQG62hxqb3N/ce4s48FaXy+drXc07U1vCfDq+2twphMKysruH70x4BR8so3Zml+7x X-Received: by 2002:a63:6842:: with SMTP id d63-v6mr10981583pgc.304.1526362063632; Mon, 14 May 2018 22:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526362063; cv=none; d=google.com; s=arc-20160816; b=xi3gRL3uIVsNGTCOFcPG0G5uP7bA+a2kMpHR5qsAUaEaP05fTFQ0PL708cDCWotEGR SdOg20sE0r8fIsjRe9byv3re2DsWguKjEvkLLchoj247HGy+pKZUsGlSWfkN+SbeRz1Q /4M6vE2fhOblhft0Atn+r0ZyYoFAisWLtW3XLhOOHlyvSDkHHhhiN43dvKrPX7YMfrXt A+6v7IEm7wwnDmaCWVrV+b5L8PNFluI+A+dq+xTrrkv3R8wGY0KcH76yZ97zUi0wH7Hf XRbcfwbcazbfBvFx9RPJ2sOC/ll4jR6KJi8hQTbrqG7pHSvLhytB2uAeUzX+Pb7orZqc fGGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=l4eSAHRaNKINm5zBEhvpcd9OblAl/pYngV3FwSmdOfI=; b=hLfLUEObOG/pM3HD+FFqcv8Tav91W+YWzMDEcGJGIX2vHsjrbKVRCGARBr5HOAncmw /Y5+FVczrhnTRFoUtG97X2bJDZrceSYiH6q8ID9hZcdIsVDV8xMOhDA0eaZBM9kyw8aI I9cAA0rrRR5cCGQDhlPCAPlZ6aD+6ZlpzDk5KDE2rQ5wsJWFtGhyqkdHRwPg/SrXAfym iJXFd4I6MQ0OJd15B3PtNPyJDreWc7Nhofh7kCyP5XSz2ez+H4EnjJh1pOQPZlyfKTgK pbLthFxWxKfJ7RsRskI3qNiLolRUsZhIsyYc1lbpo5mpAHDAcM/QU9n0rszSJUcvMTDB +Jfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kg8X8CLE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si10671500pfm.183.2018.05.14.22.27.28; Mon, 14 May 2018 22:27:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kg8X8CLE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbeEOF1T (ORCPT + 99 others); Tue, 15 May 2018 01:27:19 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:43876 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbeEOF1R (ORCPT ); Tue, 15 May 2018 01:27:17 -0400 Received: by mail-ua0-f196.google.com with SMTP id d4-v6so9979122ual.10; Mon, 14 May 2018 22:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l4eSAHRaNKINm5zBEhvpcd9OblAl/pYngV3FwSmdOfI=; b=kg8X8CLEWMnonC/zY724nVUzhNcRqK4u7fOX9bQ8meH/i8L2LzH5UTYlOXncVvDe8Z EdSVjeOO2cl8yQEm3s3zFzONlNq/ytrHVljA1aEPTM/DyZm3cZhdKBYE/nIwMDmYVoQG OlwTS/qWhebIaSLL6E6HO6mQRN4Jkgtj5fEAnnhrzrHDhG9lr/qOUiO5sWgbKkZc5zve ES4Gry0pw5/Be6WYzFn58Tv/1SS/dzchdXSRrfJ9pPcGtPCIk9v1hkiS+HwLswbeuqqo 5eiZarf4Ek9WvEySnTei9DRbqN4yAF+nNY28nlGi6aaMcM/AD1hPcjyA3obMqWEda/bz KfMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l4eSAHRaNKINm5zBEhvpcd9OblAl/pYngV3FwSmdOfI=; b=IOLdPIj3EWuwhqtKmMeRdZ4HXsmb0SZkJvol+tGnpUPMSES5SLCXUd6JLURZKS5YMl vdatO9v/n2sawmmEjk/bLHDImwW7f4KcpxT9etnOZ4OG5OyqmqhuWfCdfcdoDOy+FW9E z0yPc40L1zKUDxIGmopRXTvWAabeji8XsSzwuKAs4wz7ys9Yz5/TmC+OHy78ck2K/Ots rEFIOKgmzkE8kVrlAWyp/N5wsKq0AdfSHFEm926gmINJE1WtpNlt6mX3sYFu+I+shDio 0a3w7rAEcdfZTy6rzAXudjOjTI+ly4FZ5A6ty8Tw24TwOFhzPUzaXX9XRRFCuEq4LH6z q+1A== X-Gm-Message-State: ALKqPwdfJq6FrG/lzKTwG6lTNbpkso5dKvYAp+/77EU8BuGrCQmXh+L0 nEHTPKP/biMWV5ZaWUAW5ORiIrx18ZnMgM7tgxU= X-Received: by 2002:a9f:3b5c:: with SMTP id j28-v6mr14669835uah.142.1526362035980; Mon, 14 May 2018 22:27:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.64.90 with HTTP; Mon, 14 May 2018 22:26:35 -0700 (PDT) In-Reply-To: <6ecdbd01b8c42c8784f2235c1e5109dac3dd86a5.1526331777.git.sean@mess.org> References: <6ecdbd01b8c42c8784f2235c1e5109dac3dd86a5.1526331777.git.sean@mess.org> From: Y Song Date: Mon, 14 May 2018 22:26:35 -0700 Message-ID: Subject: Re: [PATCH v1 3/4] media: rc bpf: move ir_raw_event to uapi To: Sean Young Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Alexei Starovoitov , Mauro Carvalho Chehab , Daniel Borkmann , netdev , Matthias Reichl , Devin Heitmueller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 2:11 PM, Sean Young wrote: > The context provided to a BPF_PROG_RAWIR_DECODER is a struct ir_raw_event; > ensure user space has a a definition. > > Signed-off-by: Sean Young > --- > include/media/rc-core.h | 19 +------------------ > include/uapi/linux/bpf_rcdev.h | 24 ++++++++++++++++++++++++ Patch #2 already referenced this file. So if Patches #1 and #2 applied, there will be a compilation error. Could you re-arrange your patchset so that after sequentially applying each patch, there is no compilation error? > 2 files changed, 25 insertions(+), 18 deletions(-) > create mode 100644 include/uapi/linux/bpf_rcdev.h > > diff --git a/include/media/rc-core.h b/include/media/rc-core.h > index 6742fd86ff65..5d31e31d8ade 100644 > --- a/include/media/rc-core.h > +++ b/include/media/rc-core.h > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > #include > > /** > @@ -299,24 +300,6 @@ void rc_keydown_notimeout(struct rc_dev *dev, enum rc_proto protocol, > void rc_keyup(struct rc_dev *dev); > u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode); > > -/* > - * From rc-raw.c > - * The Raw interface is specific to InfraRed. It may be a good idea to > - * split it later into a separate header. > - */ > -struct ir_raw_event { > - union { > - u32 duration; > - u32 carrier; > - }; > - u8 duty_cycle; > - > - unsigned pulse:1; > - unsigned reset:1; > - unsigned timeout:1; > - unsigned carrier_report:1; > -}; > - > #define DEFINE_IR_RAW_EVENT(event) struct ir_raw_event event = {} > > static inline void init_ir_raw_event(struct ir_raw_event *ev) > diff --git a/include/uapi/linux/bpf_rcdev.h b/include/uapi/linux/bpf_rcdev.h > new file mode 100644 > index 000000000000..d8629ff2b960 > --- /dev/null > +++ b/include/uapi/linux/bpf_rcdev.h > @@ -0,0 +1,24 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > +/* Copyright (c) 2018 Sean Young > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of version 2 of the GNU General Public > + * License as published by the Free Software Foundation. > + */ > +#ifndef _UAPI__LINUX_BPF_RCDEV_H__ > +#define _UAPI__LINUX_BPF_RCDEV_H__ > + > +struct ir_raw_event { > + union { > + __u32 duration; > + __u32 carrier; > + }; > + __u8 duty_cycle; > + > + unsigned pulse:1; > + unsigned reset:1; > + unsigned timeout:1; > + unsigned carrier_report:1; > +}; > + > +#endif /* _UAPI__LINUX_BPF_RCDEV_H__ */ > -- > 2.17.0 >