From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: "Jiri Olsa" <jolsa@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Clark Williams" <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"Luis Cláudio Gonçalves" <lclaudio@redhat.com>
Subject: [PATCH 05/12] tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC()
Date: Mon, 29 Jul 2019 18:14:52 -0300 [thread overview]
Message-ID: <20190729211456.6380-6-acme@kernel.org> (raw)
In-Reply-To: <20190729211456.6380-1-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
In addition to _IOW() and _IOR(), to handle this case:
#define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len)
That will happen in the next sync of this header file.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-3br5e4t64e4lp0goo84che3s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/trace/beauty/usbdevfs_ioctl.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/perf/trace/beauty/usbdevfs_ioctl.sh b/tools/perf/trace/beauty/usbdevfs_ioctl.sh
index 930b80f422e8..aa597ae53747 100755
--- a/tools/perf/trace/beauty/usbdevfs_ioctl.sh
+++ b/tools/perf/trace/beauty/usbdevfs_ioctl.sh
@@ -3,10 +3,13 @@
[ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/
+# also as:
+# #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len)
+
printf "static const char *usbdevfs_ioctl_cmds[] = {\n"
-regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)[[:space:]]+_IO[WR]{0,2}\([[:space:]]*'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*"
-egrep $regex ${header_dir}/usbdevice_fs.h | egrep -v 'USBDEVFS_\w+32[[:space:]]' | \
- sed -r "s/$regex/\2 \1/g" | \
+regex="^#[[:space:]]*define[[:space:]]+USBDEVFS_(\w+)(\(\w+\))?[[:space:]]+_IO[CWR]{0,2}\([[:space:]]*(_IOC_\w+,[[:space:]]*)?'U'[[:space:]]*,[[:space:]]*([[:digit:]]+).*"
+egrep "$regex" ${header_dir}/usbdevice_fs.h | egrep -v 'USBDEVFS_\w+32[[:space:]]' | \
+ sed -r "s/$regex/\4 \1/g" | \
sort | xargs printf "\t[%s] = \"%s\",\n"
printf "};\n\n"
printf "#if 0\n"
--
2.21.0
next prev parent reply other threads:[~2019-07-29 21:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 21:14 [GIT PULL] perf/urgent fixes Arnaldo Carvalho de Melo
2019-07-29 21:14 ` [PATCH 01/12] tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open Arnaldo Carvalho de Melo
2019-08-01 19:54 ` Christian Brauner
2019-07-29 21:14 ` [PATCH 02/12] tools headers UAPI: Update tools's copy of kvm.h headers Arnaldo Carvalho de Melo
2019-07-29 21:14 ` [PATCH 03/12] tools headers UAPI: Update tools's copy of mman.h headers Arnaldo Carvalho de Melo
2019-07-29 21:14 ` [PATCH 04/12] tools headers UAPI: Update tools's copy of drm.h headers Arnaldo Carvalho de Melo
2019-07-29 21:14 ` Arnaldo Carvalho de Melo [this message]
2019-07-29 21:14 ` [PATCH 06/12] tools headers UAPI: Sync usbdevice_fs.h with the kernels to get new ioctl Arnaldo Carvalho de Melo
2019-07-29 21:14 ` [PATCH 07/12] tools headers UAPI: Sync sched.h with the kernel Arnaldo Carvalho de Melo
2019-08-01 19:55 ` Christian Brauner
2019-07-29 21:14 ` [PATCH 08/12] tools headers UAPI: Sync if_link.h " Arnaldo Carvalho de Melo
2019-07-29 21:14 ` [PATCH 09/12] perf header: Fix divide by zero error if f_header.attr_size==0 Arnaldo Carvalho de Melo
2019-07-29 21:24 ` [GIT PULL] perf/urgent fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190729211456.6380-6-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=jolsa@kernel.org \
--cc=lclaudio@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).