提交 64348153 编写于 作者: F Frederic Weisbecker 提交者: Arnaldo Carvalho de Melo

perf python: Cleanup useless double NULL termination in method arg names

The list of methods argument names only needs to be NULL terminated
once. Remove the second ones.

Cc: David Ahern <daahern@cisco.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Link: http://lkml.kernel.org/r/1301588863-20210-2-git-send-email-fweisbec@gmail.comSigned-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 e95cc028
...@@ -247,7 +247,7 @@ struct pyrf_cpu_map { ...@@ -247,7 +247,7 @@ struct pyrf_cpu_map {
static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus, static int pyrf_cpu_map__init(struct pyrf_cpu_map *pcpus,
PyObject *args, PyObject *kwargs) PyObject *args, PyObject *kwargs)
{ {
static char *kwlist[] = { "cpustr", NULL, NULL, }; static char *kwlist[] = { "cpustr", NULL };
char *cpustr = NULL; char *cpustr = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s",
...@@ -316,7 +316,7 @@ struct pyrf_thread_map { ...@@ -316,7 +316,7 @@ struct pyrf_thread_map {
static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads, static int pyrf_thread_map__init(struct pyrf_thread_map *pthreads,
PyObject *args, PyObject *kwargs) PyObject *args, PyObject *kwargs)
{ {
static char *kwlist[] = { "pid", "tid", NULL, NULL, }; static char *kwlist[] = { "pid", "tid", NULL };
int pid = -1, tid = -1; int pid = -1, tid = -1;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii", if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii",
...@@ -418,7 +418,9 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel, ...@@ -418,7 +418,9 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel,
"wakeup_events", "wakeup_events",
"bp_type", "bp_type",
"bp_addr", "bp_addr",
"bp_len", NULL, NULL, }; "bp_len",
NULL
};
u64 sample_period = 0; u64 sample_period = 0;
u32 disabled = 0, u32 disabled = 0,
inherit = 0, inherit = 0,
...@@ -499,7 +501,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel, ...@@ -499,7 +501,7 @@ static PyObject *pyrf_evsel__open(struct pyrf_evsel *pevsel,
struct thread_map *threads = NULL; struct thread_map *threads = NULL;
PyObject *pcpus = NULL, *pthreads = NULL; PyObject *pcpus = NULL, *pthreads = NULL;
int group = 0, inherit = 0; int group = 0, inherit = 0;
static char *kwlist[] = {"cpus", "threads", "group", "inherit", NULL, NULL}; static char *kwlist[] = { "cpus", "threads", "group", "inherit", NULL };
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist, if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOii", kwlist,
&pcpus, &pthreads, &group, &inherit)) &pcpus, &pthreads, &group, &inherit))
...@@ -582,8 +584,7 @@ static PyObject *pyrf_evlist__mmap(struct pyrf_evlist *pevlist, ...@@ -582,8 +584,7 @@ static PyObject *pyrf_evlist__mmap(struct pyrf_evlist *pevlist,
PyObject *args, PyObject *kwargs) PyObject *args, PyObject *kwargs)
{ {
struct perf_evlist *evlist = &pevlist->evlist; struct perf_evlist *evlist = &pevlist->evlist;
static char *kwlist[] = {"pages", "overwrite", static char *kwlist[] = { "pages", "overwrite", NULL };
NULL, NULL};
int pages = 128, overwrite = false; int pages = 128, overwrite = false;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii", kwlist, if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ii", kwlist,
...@@ -603,7 +604,7 @@ static PyObject *pyrf_evlist__poll(struct pyrf_evlist *pevlist, ...@@ -603,7 +604,7 @@ static PyObject *pyrf_evlist__poll(struct pyrf_evlist *pevlist,
PyObject *args, PyObject *kwargs) PyObject *args, PyObject *kwargs)
{ {
struct perf_evlist *evlist = &pevlist->evlist; struct perf_evlist *evlist = &pevlist->evlist;
static char *kwlist[] = {"timeout", NULL, NULL}; static char *kwlist[] = { "timeout", NULL };
int timeout = -1, n; int timeout = -1, n;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist, &timeout)) if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", kwlist, &timeout))
...@@ -674,7 +675,7 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist, ...@@ -674,7 +675,7 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist,
struct perf_evlist *evlist = &pevlist->evlist; struct perf_evlist *evlist = &pevlist->evlist;
union perf_event *event; union perf_event *event;
int sample_id_all = 1, cpu; int sample_id_all = 1, cpu;
static char *kwlist[] = {"cpu", "sample_id_all", NULL, NULL}; static char *kwlist[] = { "cpu", "sample_id_all", NULL };
int err; int err;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|i", kwlist, if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|i", kwlist,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册