| /linux/samples/trace_events/ | 
| H A D | trace-events-sample.h | 1 /* SPDX-License-Identifier: GPL-2.0 */8  * In this case, it would look for sample-trace.h
 14  * This file is called trace-events-sample.h but we want the system
 15  * to be called "sample-trace". Therefore we must define the name of this
 18  * #define TRACE_INCLUDE_FILE trace-events-sample
 26 #define TRACE_SYSTEM sample-trace
 29  * TRACE_SYSTEM is expected to be a C valid variable (alpha-numeric
 36  * But the above is only needed if TRACE_SYSTEM is not alpha-numeric
 38  * TRACE_SYSTEM. As TRACE_SYSTEM_VAR must be alpha-numeric, if
 40  * only alpha-numeric and underscores.
 [all …]
 
 | 
| /linux/tools/testing/selftests/bpf/prog_tests/ | 
| H A D | cgroup_attach_override.c | 1 // SPDX-License-Identifier: GPL-2.07 #define FOO		"/foo"  macro
 8 #define BAR		"/foo/bar/"  macro
 9 #define PING_CMD	"ping -q -c1 -w1 127.0.0.1 > /dev/null"
 28 	int drop_prog = -1, allow_prog = -1, foo = -1, bar = -1;  in serial_test_cgroup_attach_override()  local
 33 		  "verifier output:\n%s\n-------\n", bpf_log_buf))  in serial_test_cgroup_attach_override()
 38 		  "verifier output:\n%s\n-------\n", bpf_log_buf))  in serial_test_cgroup_attach_override()
 41 	foo = test__join_cgroup(FOO);  in serial_test_cgroup_attach_override()
 42 	if (CHECK(foo < 0, "cgroup_join_foo", "cgroup setup failed\n"))  in serial_test_cgroup_attach_override()
 45 	if (CHECK(bpf_prog_attach(drop_prog, foo, BPF_CGROUP_INET_EGRESS,  in serial_test_cgroup_attach_override()
 [all …]
 
 | 
| H A D | linked_list.c | 1 // SPDX-License-Identifier: GPL-2.088 	  "operation on bpf_list_head expects arg#1 bpf_list_node at offset=48 in struct foo, "
 89 	  "but arg is at offset=0 in struct bar" },
 92 	{ "incorrect_node_off2", "arg#1 offset=0, but expected bpf_list_node at offset=48 in struct foo" },
 115 	prog = bpf_object__find_program_by_name(skel->obj, prog_name);  in test_linked_list_fail_prog()
 169 	ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.map_list_push_pop), &opts);  in test_linked_list_success()
 173 		clear_fields(skel->maps.array_map);  in test_linked_list_success()
 175 	ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.inner_map_list_push_pop), &opts);  in test_linked_list_success()
 179 		clear_fields(skel->maps.inner_map);  in test_linked_list_success()
 181 	ret = bpf_prog_test_run_opts(bpf_program__fd(skel->progs.global_list_push_pop), &opts);  in test_linked_list_success()
 [all …]
 
 | 
| H A D | struct_ops_autocreate.c | 1 // SPDX-License-Identifier: GPL-2.030 	ASSERT_EQ(err, -ENOTSUP, "errno should be ENOTSUP");  in cant_load_full_object()
 42 	link = bpf_map__attach_struct_ops(skel->maps.testmod_1);  in check_test_1_link()
 44 		return -1;  in check_test_1_link()
 47 	err = ASSERT_EQ(skel->bss->test_1_result, 42, "test_1_result");  in check_test_1_link()
 61 	err = bpf_map__set_autocreate(skel->maps.testmod_2, false);  in can_load_partial_object()
 65 	ASSERT_TRUE(bpf_program__autoload(skel->progs.test_1), "test_1 default autoload");  in can_load_partial_object()
 66 	ASSERT_TRUE(bpf_program__autoload(skel->progs.test_2), "test_2 default autoload");  in can_load_partial_object()
 72 	ASSERT_TRUE(bpf_program__autoload(skel->progs.test_1), "test_1 actual autoload");  in can_load_partial_object()
 73 	ASSERT_FALSE(bpf_program__autoload(skel->progs.test_2), "test_2 actual autoload");  in can_load_partial_object()
 [all …]
 
 | 
| /linux/drivers/gpu/drm/xe/tests/ | 
| H A D | xe_args_test.c | 1 // SPDX-License-Identifier: GPL-2.012 #define foo	X, Y, Z, Q  in call_args_example()  macro
 13 #define bar	COUNT_ARGS(foo)  in call_args_example()  macro
 14 #define buz	CALL_ARGS(COUNT_ARGS, foo)  in call_args_example()
 16 	KUNIT_EXPECT_EQ(test, bar, 1);  in call_args_example()
 19 #undef foo  in call_args_example()
 20 #undef bar  in call_args_example()
 26 #define foo	X, Y, Z, Q  in drop_first_arg_example()  macro
 27 #define bar	CALL_ARGS(COUNT_ARGS, DROP_FIRST_ARG(foo))  in drop_first_arg_example()  macro
 29 	KUNIT_EXPECT_EQ(test, bar, 3);  in drop_first_arg_example()
 [all …]
 
 | 
| /linux/Documentation/translations/zh_CN/admin-guide/ | 
| H A D | bootconfig.rst | 1 .. SPDX-License-Identifier: GPL-2.03 .. include:: ../disclaimer-zh_CN.rst
 5 :Original: Documentation/admin-guide/bootconfig.rst
 32 关键字只允许包含字母、数字、连字符( ``-`` )和下划线( ``_`` )。值可包含
 42 --------
 46  foo.bar.baz = value1
 47  foo.bar.qux.quux = value2
 51  foo.bar {
 58  foo.bar { baz = value1; qux.quux = value2 }
 64 --------------
 [all …]
 
 | 
| /linux/Documentation/translations/zh_TW/admin-guide/ | 
| H A D | bootconfig.rst | 1 .. SPDX-License-Identifier: GPL-2.03 .. include:: ../disclaimer-zh_TW.rst
 5 :Original: Documentation/admin-guide/bootconfig.rst
 32 關鍵字只允許包含字母、數字、連字符( ``-`` )和下劃線( ``_`` )。值可包含
 42 --------
 46  foo.bar.baz = value1
 47  foo.bar.qux.quux = value2
 51  foo.bar {
 58  foo.bar { baz = value1; qux.quux = value2 }
 64 --------------
 [all …]
 
 | 
| /linux/tools/perf/Documentation/ | 
| H A D | callchain-overhead-calculation.txt | 2 ----------[all...]
 | 
| /linux/drivers/gpu/drm/xe/ | 
| H A D | xe_args.h | 1 /* SPDX-License-Identifier: MIT */19  * CALL_ARGS - Invoke a macro, but allow parameters to be expanded beforehand.
 28  *	#define foo	X,Y,Z,Q
 29  *	#define bar	COUNT_ARGS(foo)
 30  *	#define buz	CALL_ARGS(COUNT_ARGS, foo)
 32  *	With above definitions bar expands to 1 while buz expands to 4.
 38  * DROP_FIRST_ARG - Returns all arguments except the first one.
 46  *	#define foo	X,Y,Z,Q
 47  *	#define bar	CALL_ARGS(COUNT_ARGS, DROP_FIRST_ARG(foo))
 49  *	With above definitions bar expands to 3.
 [all …]
 
 | 
| H A D | xe_rtp_helpers.h | 1 /* SPDX-License-Identifier: MIT */16  * Helper macros - not to be used outside this header.
 28  * XE_RTP_PASTE_FOREACH - Paste XE_RTP_<@prefix_> on each element of the tuple
 35  * 1) XE_RTP_PASTE_FOREACH(TEST_, COMMA, (FOO, BAR))
 40  * 2) XE_RTP_PASTE_FOREACH(TEST2_, COMMA, (FOO))
 45  * 3) XE_RTP_PASTE_FOREACH(TEST3, BITWISE_OR, (FOO, BAR))
 51  *    XE_RTP_PASTE_FOREACH(TEST_, MY_SEP, (FOO, BAR))
 71  * XE_RTP_DROP_CAST - Drop cast to convert a compound statement to a initializer
 75  *	#define foo(a_)	((struct foo){ .a = a_ })
 76  *	XE_RTP_DROP_CAST(foo(10))
 
 | 
| /linux/tools/testing/selftests/ftrace/test.d/dynevent/ | 
| H A D | eprobes_syntax_errors.tc | 2 # SPDX-License-Identifier: GPL-2.04 # requires: dynamic_events events/syscalls/sys_enter_openat "<attached-group>.<attached-event> [<ar…
 6 check_error() { # command-with-error-pos-by-^
 13 check_error 'e syscalls/sys_enter_openat ^foo'	# BAD_ATTACH_ARG
 14 check_error 'e:^/bar syscalls/sys_enter_openat'	# NO_GROUP_NAME
 15 check_error 'e:^12345678901234567890123456789012345678901234567890123456789012345/bar syscalls/sys_…
 17 check_error 'e:^foo.1/bar syscalls/sys_enter_openat'	# BAD_GROUP_NAME
 19 check_error 'e:foo/^12345678901234567890123456789012345678901234567890123456789012345 syscalls/sys_…
 20 check_error 'e:foo/^bar.1 syscalls/sys_enter_openat'	# BAD_EVENT_NAME
 22 check_error 'e:foo/bar syscalls/sys_enter_openat arg=^dfd'	# BAD_FETCH_ARG
 [all …]
 
 | 
| H A D | fprobe_syntax_errors.tc | 2 # SPDX-License-Identifier: GPL-2.04 # requires: dynamic_events "f[:[<group>/][<event>]] <func-name>[%return] [<args>]":README
 6 check_error() { # command-with-error-pos-by-^
 10 case `uname -
 [all...]
 | 
| /linux/samples/kobject/ | 
| H A D | kset-example.c | 1 // SPDX-License-Identifier: GPL-2.05  * Copyright (C) 2004-2007 Greg Kroah-Hartman <greg@kroah.com>
 18  * Then three kobjects are created and assigned to this kset, "foo", "baz",
 19  * and "bar".  In those kobjects, attributes of the same name are also
 31 	int foo;  member
 33 	int bar;  member
 40 	ssize_t (*show)(struct foo_obj *foo, struct foo_attribute *attr, char *buf);
 41 	ssize_t (*store)(struct foo_obj *foo, struct foo_attribute *attr, const char *buf, size_t count);
 57 	struct foo_obj *foo;  in foo_attr_show()  local
 60 	foo = to_foo_obj(kobj);  in foo_attr_show()
 [all …]
 
 | 
| H A D | kobject-example.c | 1 // SPDX-License-Identifier: GPL-2.05  * Copyright (C) 2004-2007 Greg Kroah-Hartman <greg@kroah.com>
 17  * "foo", "baz", and "bar".  If an integer is written to these files, it can be
 21 static int foo;  variable
 23 static int bar;  variable
 26  * The "foo" file where a static variable is read from and written to.
 31 	return sysfs_emit(buf, "%d\n", foo);  in foo_show()
 39 	ret = kstrtoint(buf, 10, &foo);  in foo_store()
 46 /* Sysfs attributes cannot be world-writable. */
 48 	__ATTR(foo, 0664, foo_show, foo_store);
 [all …]
 
 | 
| /linux/Documentation/translations/zh_CN/devicetree/ | 
| H A D | overlay-notes.rst | 1 .. SPDX-License-Identifier: GPL-2.02 .. include:: ../disclaimer-zh_CN.rst
 4 :Original: Documentation/devicetree/overlay-notes.rst
 17 Documentation/devicetree/dynamic-resolution-notes.rst[1]的配套文档。
 20 ------------
 28     ---- foo.dts ---------------------------------------------------------------
 30 	/dts-v1/;
 32 		compatible = "corp,foo";
 44     ---- foo.dts ---------------------------------------------------------------
 49     ---- bar.dtso - 按标签覆盖目标位置 ---------------------------
 [all …]
 
 | 
| /linux/tools/testing/selftests/net/ | 
| H A D | unicast_extensions.sh | 2 # SPDX-License-Identifier: GPL-2.07 # Self-tests for IPv4 address extensions: the kernel's ability to accept
 41 	if [ $1 -eq 0 ]; then
 42 		printf "TEST: %-60s  [ OK ]\n" "${2}"
 44 		printf "TEST: %-60s  [FAIL]\n" "${2}"
 53 	# foo --- bar
 57 	# containing linked veth devices foo and bar,
 60 	ip -n $foo_ns address add $1/$3 dev foo || return 1
 61 	ip -n $foo_ns link set foo up || return 1
 62 	ip -n $bar_ns address add $2/$3 dev bar || return 1
 [all …]
 
 | 
| /linux/Documentation/translations/it_IT/doc-guide/ | 
| H A D | kernel-doc.rst | 1 .. include:: ../disclaimer-ita.rst4 	  :ref:`Documentation/doc-guide/index.rst <doc_guide>`
 6 .. title:: Commenti in kernel-doc
 11 Scrivere i commenti in kernel-doc
 15 strutturanti secondo il formato kernel-doc. Essi possono descrivere funzioni,
 18 .. note:: Il formato kernel-doc può sembrare simile a gtk-doc o Doxygen ma
 20    contengono decine di migliaia di commenti kernel-doc. Siete pregati
 23 La struttura kernel-doc è estratta a partire dai commenti; da questi viene
 30 .. _`dominio Sphinx per il C`: http://www.sphinx-doc.org/en/stable/domains.html
 34 kernel-doc. Quando l'intenzione è di utilizzarle nei moduli, anche le funzioni
 [all …]
 
 | 
| /linux/Documentation/kbuild/ | 
| H A D | kconfig-language.rst | 6 ------------11 	+- Code maturity level options
 12 	|  +- Prompt for development and/or incomplete code/drivers
 13 	+- General setup
 14 	|  +- Networking support
 15 	|  +- System V IPC
 16 	|  +- BSD Process Accounting
 17 	|  +- Sysctl support
 18 	+- Loadable module support
 19 	|  +- Enable loadable module support
 [all …]
 
 | 
| /linux/tools/perf/tests/ | 
| H A D | expr.c | 1 // SPDX-License-Identifier: GPL-2.029 	/* Union {foo, bar} against {}. */  in test_ids_union()
 33 	TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids1, strdup("foo")), 0);  in test_ids_union()
 34 	TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids1, strdup("bar")), 0);  in test_ids_union()
 39 	/* Union {foo, bar} against {foo}. */  in test_ids_union()
 42 	TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids2, strdup("foo")), 0);  in test_ids_union()
 47 	/* Union {foo, bar} against {bar,baz}. */  in test_ids_union()
 50 	TEST_ASSERT_EQUAL("ids__insert", ids__insert(ids2, strdup("bar")), 0);  in test_ids_union()
 79 	struct perf_cpu cpu = {-1};  in test__expr()
 89 	expr__add_id_val(ctx, strdup("FOO"), 1);  in test__expr()
 [all …]
 
 | 
| /linux/tools/testing/ktest/examples/bootconfigs/ | 
| H A D | verify-boottrace.sh | 18 	content=`cat $file | sed -ne "/^$val/p"`19 	if [ -z "$content" ]; then
 30 	if ! grep -q "$val" $file ; then
 41 	content=`cat $file | sed -ne "/^[0 ]*$val/p"`
 42 	if [ -z "$content" ]; then
 61 …all_finish/trigger" 'hist:keys=func:vals=hitcount:lat=common_timestamp.usecs-\$ts0:sort=hitcount:s…
 64 compare_file "instances/foo/current_tracer" "function"
 65 file_contains "instances/foo/set_ftrace_filter" "^user"
 66 compare_file "instances/foo/buffer_size_kb" "512"
 67 compare_mask "instances/foo/tracing_cpumask" "1"
 [all …]
 
 | 
| /linux/include/kunit/ | 
| H A D | assert.h | 1 /* SPDX-License-Identifier: GPL-2.0 */19  * enum kunit_assert_type - Type of expectation/assertion.
 32  * struct kunit_loc - Identifies the source location of a line of code.
 44  * struct kunit_assert - Data for printing a failed assertion or expectation.
 60  * struct kunit_fail_assert - Represents a plain fail expectation/assertion.
 74  * struct kunit_unary_assert - Represents a KUNIT_{EXPECT|ASSERT}_{TRUE|FALSE}
 94  * struct kunit_ptr_not_err_assert - An expectation/assertion that a pointer is
 95  *	not NULL and not a -errno.
 101  * not contain a -errno. (See IS_ERR_OR_NULL().)
 114  * struct kunit_binary_assert_text - holds strings for &struct
 [all …]
 
 | 
| /linux/Documentation/translations/zh_CN/doc-guide/ | 
| H A D | kernel-doc.rst | 1 .. include:: ../disclaimer-zh_CN.rst3 :Original: Documentation/doc-guide/kernel-doc.rst
 7 编写kernel-doc注释
 10 Linux内核源文件可以包含kernel-doc格式的结构化文档注释,用以描述代码的函数、
 13 .. note:: 内核文档格式与javadoc、gtk-doc或Doxygen看似很相似,但由于历史原因,
 14           实际有着明显的不同。内核源包含成千上万个kernel-doc注释。请坚持遵循
 17 .. note:: kernel-doc无法包含Rust代码:请参考 Documentation/rust/general-information.rst 。
 19 从注释中提取kernel-doc结构,并从中生成适当的 `Sphinx C 域`_ 函数和带有锚点的
 20 类型描述。这些注释将被过滤以生成特殊kernel-doc高亮和交叉引用。详见下文。
 22 .. _Sphinx C 域: http://www.sphinx-doc.org/en/stable/domains.html
 [all …]
 
 | 
| /linux/tools/testing/selftests/bpf/progs/ | 
| H A D | test_global_func9.c | 1 // SPDX-License-Identifier: GPL-2.0-only30 __noinline int foo(const struct S *s)  in foo()  function
 33 		return bpf_get_prandom_u32() < s->x;  in foo()
 38 __noinline int bar(int *x)  in bar()  function
 84 		const struct S s = {.x = skb->len };  in global_func9()
 86 		result |= foo(&s);  in global_func9()
 93 		result |= foo(s);  in global_func9()
 97 		const struct C c = {.x = skb->len, .y = skb->family };  in global_func9()
 99 		result |= foo((const struct S *)&c);  in global_func9()
 103 		result |= foo(NULL);  in global_func9()
 [all …]
 
 | 
| H A D | verifier_const.c | 1 // SPDX-License-Identifier: GPL-2.09 const volatile long foo = 42;  variable
 10 long bar;  variable
 19 	bpf_strtol(buff, sizeof(buff), 0, (long *)&foo);  in tcx1()
 29 	bpf_strtol(buff, sizeof(buff), 0, &bar);  in tcx2()
 48 	bpf_check_mtu(skb, skb->ifindex, (__u32 *)&foo, 0, 0);  in tcx4()
 57 	bpf_check_mtu(skb, skb->ifindex, (__u32 *)&bar, 0, 0);  in tcx5()
 66 	bpf_check_mtu(skb, skb->ifindex, (__u32 *)&bart, 0, 0);  in tcx6()
 85 	write_fixed((void *)&foo, skb->mark);  in tcx7()
 94 	write_dyn((void *)&foo, &bart, bpf_get_prandom_u32() & 3);  in BPF_PROG()
 
 | 
| /linux/Documentation/dev-tools/ | 
| H A D | checkpatch.rst | 1 .. SPDX-License-Identifier: GPL-2.0-only27  - -q,  --quiet
 31  - -v,  --verbose
 35  - --no-tree
 39  - --no-signoff
 41    Disable the 'Signed-off-by' line check.  The sign-off is a simple line at
 43    or otherwise have the right to pass it on as an open-source patch.
 47 	 Signed-off-by: Random J Developer <random@developer.example.org>
 49    Setting this flag effectively stops a message for a missing signed-off-by
 52  - --patch
 [all …]
 
 |