Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ftrace: Fix most kernel-doc warnings

Reduce the number of kernel-doc warnings from 52 down to 10, i.e.,
fix 42 kernel-doc warnings by (a) using the Returns: format for
function return values or (b) using "@var:" instead of "@var -"
for function parameter descriptions.

Fix one return values list so that it is formatted correctly when
rendered for output.

Spell "non-zero" with a hyphen in several places.

Link: https://lore.kernel.org/linux-trace-kernel/20240223054833.15471-1-rdunlap@infradead.org

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/oe-kbuild-all/202312180518.X6fRyDSN-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Randy Dunlap and committed by
Steven Rostedt (Google)
d1530413 2048fdc2

+46 -44
+46 -44
kernel/trace/ftrace.c
··· 1160 1160 * Search a given @hash to see if a given instruction pointer (@ip) 1161 1161 * exists in it. 1162 1162 * 1163 - * Returns the entry that holds the @ip if found. NULL otherwise. 1163 + * Returns: the entry that holds the @ip if found. NULL otherwise. 1164 1164 */ 1165 1165 struct ftrace_func_entry * 1166 1166 ftrace_lookup_ip(struct ftrace_hash *hash, unsigned long ip) ··· 1282 1282 1283 1283 /** 1284 1284 * ftrace_free_filter - remove all filters for an ftrace_ops 1285 - * @ops - the ops to remove the filters from 1285 + * @ops: the ops to remove the filters from 1286 1286 */ 1287 1287 void ftrace_free_filter(struct ftrace_ops *ops) 1288 1288 { ··· 1587 1587 * @end: end of range to search (inclusive). @end points to the last byte 1588 1588 * to check. 1589 1589 * 1590 - * Returns rec->ip if the related ftrace location is a least partly within 1590 + * Returns: rec->ip if the related ftrace location is a least partly within 1591 1591 * the given address range. That is, the first address of the instruction 1592 1592 * that is either a NOP or call to the function tracer. It checks the ftrace 1593 1593 * internal tables to determine if the address belongs or not. ··· 1607 1607 * ftrace_location - return the ftrace location 1608 1608 * @ip: the instruction pointer to check 1609 1609 * 1610 - * If @ip matches the ftrace location, return @ip. 1611 - * If @ip matches sym+0, return sym's ftrace location. 1612 - * Otherwise, return 0. 1610 + * Returns: 1611 + * * If @ip matches the ftrace location, return @ip. 1612 + * * If @ip matches sym+0, return sym's ftrace location. 1613 + * * Otherwise, return 0. 1613 1614 */ 1614 1615 unsigned long ftrace_location(unsigned long ip) 1615 1616 { ··· 1640 1639 * @start: start of range to search 1641 1640 * @end: end of range to search (inclusive). @end points to the last byte to check. 1642 1641 * 1643 - * Returns 1 if @start and @end contains a ftrace location. 1642 + * Returns: 1 if @start and @end contains a ftrace location. 1644 1643 * That is, the instruction that is either a NOP or call to 1645 1644 * the function tracer. It checks the ftrace internal tables to 1646 1645 * determine if the address belongs or not. ··· 2575 2574 * wants to convert to a callback that saves all regs. If FTRACE_FL_REGS 2576 2575 * is not set, then it wants to convert to the normal callback. 2577 2576 * 2578 - * Returns the address of the trampoline to set to 2577 + * Returns: the address of the trampoline to set to 2579 2578 */ 2580 2579 unsigned long ftrace_get_addr_new(struct dyn_ftrace *rec) 2581 2580 { ··· 2616 2615 * a function that saves all the regs. Basically the '_EN' version 2617 2616 * represents the current state of the function. 2618 2617 * 2619 - * Returns the address of the trampoline that is currently being called 2618 + * Returns: the address of the trampoline that is currently being called 2620 2619 */ 2621 2620 unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec) 2622 2621 { ··· 2720 2719 /** 2721 2720 * ftrace_rec_iter_start - start up iterating over traced functions 2722 2721 * 2723 - * Returns an iterator handle that is used to iterate over all 2722 + * Returns: an iterator handle that is used to iterate over all 2724 2723 * the records that represent address locations where functions 2725 2724 * are traced. 2726 2725 * ··· 2752 2751 * ftrace_rec_iter_next - get the next record to process. 2753 2752 * @iter: The handle to the iterator. 2754 2753 * 2755 - * Returns the next iterator after the given iterator @iter. 2754 + * Returns: the next iterator after the given iterator @iter. 2756 2755 */ 2757 2756 struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter) 2758 2757 { ··· 2777 2776 * ftrace_rec_iter_record - get the record at the iterator location 2778 2777 * @iter: The current iterator location 2779 2778 * 2780 - * Returns the record that the current @iter is at. 2779 + * Returns: the record that the current @iter is at. 2781 2780 */ 2782 2781 struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter) 2783 2782 { ··· 4011 4010 * ftrace_notrace_write() if @flag has FTRACE_ITER_NOTRACE set. 4012 4011 * tracing_lseek() should be used as the lseek routine, and 4013 4012 * release must call ftrace_regex_release(). 4013 + * 4014 + * Returns: 0 on success or a negative errno value on failure 4014 4015 */ 4015 4016 int 4016 4017 ftrace_regex_open(struct ftrace_ops *ops, int flag, ··· 4629 4626 /** 4630 4627 * allocate_ftrace_func_mapper - allocate a new ftrace_func_mapper 4631 4628 * 4632 - * Returns a ftrace_func_mapper descriptor that can be used to map ips to data. 4629 + * Returns: a ftrace_func_mapper descriptor that can be used to map ips to data. 4633 4630 */ 4634 4631 struct ftrace_func_mapper *allocate_ftrace_func_mapper(void) 4635 4632 { ··· 4649 4646 * @mapper: The mapper that has the ip maps 4650 4647 * @ip: the instruction pointer to find the data for 4651 4648 * 4652 - * Returns the data mapped to @ip if found otherwise NULL. The return 4649 + * Returns: the data mapped to @ip if found otherwise NULL. The return 4653 4650 * is actually the address of the mapper data pointer. The address is 4654 4651 * returned for use cases where the data is no bigger than a long, and 4655 4652 * the user can use the data pointer as its data instead of having to ··· 4675 4672 * @ip: The instruction pointer address to map @data to 4676 4673 * @data: The data to map to @ip 4677 4674 * 4678 - * Returns 0 on success otherwise an error. 4675 + * Returns: 0 on success otherwise an error. 4679 4676 */ 4680 4677 int ftrace_func_mapper_add_ip(struct ftrace_func_mapper *mapper, 4681 4678 unsigned long ip, void *data) ··· 4704 4701 * @mapper: The mapper that has the ip maps 4705 4702 * @ip: The instruction pointer address to remove the data from 4706 4703 * 4707 - * Returns the data if it is found, otherwise NULL. 4704 + * Returns: the data if it is found, otherwise NULL. 4708 4705 * Note, if the data pointer is used as the data itself, (see 4709 4706 * ftrace_func_mapper_find_ip(), then the return value may be meaningless, 4710 4707 * if the data pointer was set to zero. ··· 5628 5625 5629 5626 /** 5630 5627 * ftrace_set_filter_ip - set a function to filter on in ftrace by address 5631 - * @ops - the ops to set the filter with 5632 - * @ip - the address to add to or remove from the filter. 5633 - * @remove - non zero to remove the ip from the filter 5634 - * @reset - non zero to reset all filters before applying this filter. 5628 + * @ops: the ops to set the filter with 5629 + * @ip: the address to add to or remove from the filter. 5630 + * @remove: non zero to remove the ip from the filter 5631 + * @reset: non zero to reset all filters before applying this filter. 5635 5632 * 5636 5633 * Filters denote which functions should be enabled when tracing is enabled 5637 5634 * If @ip is NULL, it fails to update filter. ··· 5650 5647 5651 5648 /** 5652 5649 * ftrace_set_filter_ips - set functions to filter on in ftrace by addresses 5653 - * @ops - the ops to set the filter with 5654 - * @ips - the array of addresses to add to or remove from the filter. 5655 - * @cnt - the number of addresses in @ips 5656 - * @remove - non zero to remove ips from the filter 5657 - * @reset - non zero to reset all filters before applying this filter. 5650 + * @ops: the ops to set the filter with 5651 + * @ips: the array of addresses to add to or remove from the filter. 5652 + * @cnt: the number of addresses in @ips 5653 + * @remove: non zero to remove ips from the filter 5654 + * @reset: non zero to reset all filters before applying this filter. 5658 5655 * 5659 5656 * Filters denote which functions should be enabled when tracing is enabled 5660 5657 * If @ips array or any ip specified within is NULL , it fails to update filter. ··· 5673 5670 5674 5671 /** 5675 5672 * ftrace_ops_set_global_filter - setup ops to use global filters 5676 - * @ops - the ops which will use the global filters 5673 + * @ops: the ops which will use the global filters 5677 5674 * 5678 5675 * ftrace users who need global function trace filtering should call this. 5679 5676 * It can set the global filter only if ops were not initialized before. ··· 5697 5694 5698 5695 /** 5699 5696 * ftrace_set_filter - set a function to filter on in ftrace 5700 - * @ops - the ops to set the filter with 5701 - * @buf - the string that holds the function filter text. 5702 - * @len - the length of the string. 5703 - * @reset - non zero to reset all filters before applying this filter. 5697 + * @ops: the ops to set the filter with 5698 + * @buf: the string that holds the function filter text. 5699 + * @len: the length of the string. 5700 + * @reset: non-zero to reset all filters before applying this filter. 5704 5701 * 5705 5702 * Filters denote which functions should be enabled when tracing is enabled. 5706 5703 * If @buf is NULL and reset is set, all functions will be enabled for tracing. ··· 5719 5716 5720 5717 /** 5721 5718 * ftrace_set_notrace - set a function to not trace in ftrace 5722 - * @ops - the ops to set the notrace filter with 5723 - * @buf - the string that holds the function notrace text. 5724 - * @len - the length of the string. 5725 - * @reset - non zero to reset all filters before applying this filter. 5719 + * @ops: the ops to set the notrace filter with 5720 + * @buf: the string that holds the function notrace text. 5721 + * @len: the length of the string. 5722 + * @reset: non-zero to reset all filters before applying this filter. 5726 5723 * 5727 5724 * Notrace Filters denote which functions should not be enabled when tracing 5728 5725 * is enabled. If @buf is NULL and reset is set, all functions will be enabled ··· 5741 5738 EXPORT_SYMBOL_GPL(ftrace_set_notrace); 5742 5739 /** 5743 5740 * ftrace_set_global_filter - set a function to filter on with global tracers 5744 - * @buf - the string that holds the function filter text. 5745 - * @len - the length of the string. 5746 - * @reset - non zero to reset all filters before applying this filter. 5741 + * @buf: the string that holds the function filter text. 5742 + * @len: the length of the string. 5743 + * @reset: non-zero to reset all filters before applying this filter. 5747 5744 * 5748 5745 * Filters denote which functions should be enabled when tracing is enabled. 5749 5746 * If @buf is NULL and reset is set, all functions will be enabled for tracing. ··· 5756 5753 5757 5754 /** 5758 5755 * ftrace_set_global_notrace - set a function to not trace with global tracers 5759 - * @buf - the string that holds the function notrace text. 5760 - * @len - the length of the string. 5761 - * @reset - non zero to reset all filters before applying this filter. 5756 + * @buf: the string that holds the function notrace text. 5757 + * @len: the length of the string. 5758 + * @reset: non-zero to reset all filters before applying this filter. 5762 5759 * 5763 5760 * Notrace Filters denote which functions should not be enabled when tracing 5764 5761 * is enabled. If @buf is NULL and reset is set, all functions will be enabled ··· 7446 7443 * have its own recursion protection, then it should call the 7447 7444 * ftrace_ops_assist_func() instead. 7448 7445 * 7449 - * Returns the function that the trampoline should call for @ops. 7446 + * Returns: the function that the trampoline should call for @ops. 7450 7447 */ 7451 7448 ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops) 7452 7449 { ··· 7900 7897 /** 7901 7898 * ftrace_is_dead - Test if ftrace is dead or not. 7902 7899 * 7903 - * Returns 1 if ftrace is "dead", zero otherwise. 7900 + * Returns: 1 if ftrace is "dead", zero otherwise. 7904 7901 */ 7905 7902 int ftrace_is_dead(void) 7906 7903 { ··· 8145 8142 * @addrs array, which needs to be big enough to store at least @cnt 8146 8143 * addresses. 8147 8144 * 8148 - * This function returns 0 if all provided symbols are found, 8149 - * -ESRCH otherwise. 8145 + * Returns: 0 if all provided symbols are found, -ESRCH otherwise. 8150 8146 */ 8151 8147 int ftrace_lookup_symbols(const char **sorted_syms, size_t cnt, unsigned long *addrs) 8152 8148 {