diff options
| author | Benjamin Tissoires <bentiss@kernel.org> | 2024-07-16 13:19:28 +0300 |
|---|---|---|
| committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-07-16 13:19:28 +0300 |
| commit | 3c69140734a27f8b145f12fa0ae80c1fe36a02ca (patch) | |
| tree | ad36bf7e6a5400212fbf917eceb4c7ad4df5d557 /samples | |
| parent | 5ba28be6be8ac6cd4fa1ac67cd4da237d39917d2 (diff) | |
| parent | 8a25418ba65a5d2494b369f6178a284c449bc399 (diff) | |
| download | linux-3c69140734a27f8b145f12fa0ae80c1fe36a02ca.tar.xz | |
Merge branch 'for-6.11/trivial' into for-linus
Couple of trivial fixes:
- extra semicolon (Chen Ni)
- typo (Thorsten Blum)
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/acrn/vm-sample.c | 4 | ||||
| -rw-r--r-- | samples/trace_events/trace-events-sample.h | 19 |
2 files changed, 12 insertions, 11 deletions
diff --git a/samples/acrn/vm-sample.c b/samples/acrn/vm-sample.c index 704402c64ea3..c61e0f91456e 100644 --- a/samples/acrn/vm-sample.c +++ b/samples/acrn/vm-sample.c @@ -3,7 +3,7 @@ * A sample program to run a User VM on the ACRN hypervisor * * This sample runs in a Service VM, which is a privileged VM of ACRN. - * CONFIG_ACRN_HSM need to be enabled in the Service VM. + * CONFIG_ACRN_HSM needs to be enabled in the Service VM. * * Guest VM code in guest16.s will be executed after the VM launched. * @@ -55,7 +55,7 @@ int main(int argc, char **argv) ret = posix_memalign(&guest_memory, 4096, GUEST_MEMORY_SIZE); if (ret < 0) { - printf("No enough memory!\n"); + printf("Not enough memory!\n"); return -1; } hsm_fd = open("/dev/acrn_hsm", O_RDWR|O_CLOEXEC); diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h index 500981eca74d..55f9a3da92d5 100644 --- a/samples/trace_events/trace-events-sample.h +++ b/samples/trace_events/trace-events-sample.h @@ -136,10 +136,11 @@ * * To assign a string, use the helper macro __assign_str(). * - * __assign_str(foo, bar); + * __assign_str(foo); * - * In most cases, the __assign_str() macro will take the same - * parameters as the __string() macro had to declare the string. + * The __string() macro saves off the string that is passed into + * the second parameter, and the __assign_str() will store than + * saved string into the "foo" field. * * __vstring: This is similar to __string() but instead of taking a * dynamic length, it takes a variable list va_list 'va' variable. @@ -177,7 +178,7 @@ * The length is saved via the __string_len() and is retrieved in * __assign_str(). * - * __assign_str(foo, bar); + * __assign_str(foo); * * Then len + 1 is allocated to the ring buffer, and a nul terminating * byte is added. This is similar to: @@ -311,8 +312,8 @@ TRACE_EVENT(foo_bar, __entry->bar = bar; memcpy(__get_dynamic_array(list), lst, __length_of(lst) * sizeof(int)); - __assign_str(str, string); - __assign_str(lstr, foo); + __assign_str(str); + __assign_str(lstr); __assign_vstr(vstr, fmt, va); __assign_bitmask(cpus, cpumask_bits(mask), num_possible_cpus()); __assign_cpumask(cpum, cpumask_bits(mask)); @@ -418,7 +419,7 @@ TRACE_EVENT_CONDITION(foo_bar_with_cond, ), TP_fast_assign( - __assign_str(foo, foo); + __assign_str(foo); __entry->bar = bar; ), @@ -459,7 +460,7 @@ TRACE_EVENT_FN(foo_bar_with_fn, ), TP_fast_assign( - __assign_str(foo, foo); + __assign_str(foo); __entry->bar = bar; ), @@ -506,7 +507,7 @@ DECLARE_EVENT_CLASS(foo_template, ), TP_fast_assign( - __assign_str(foo, foo); + __assign_str(foo); __entry->bar = bar; ), |
