[ceph-client:tls_logger 3/13] net/ceph/ceph_san.c:100: warning: Function parameter or struct member 'pf' not described in 'cephsan_pagefrag_init'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

First bad commit (maybe != root cause):

tree:   https://github.com/ceph/ceph-client.git tls_logger
head:   cd1e899feeb6a7da55cbb74b9245c8bbb77f82ba
commit: a85b831a9a8fcd3420c8a0b8c0c56b608acad771 [3/13] cephsan: moving libceph
config: i386-buildonly-randconfig-001-20250213 (https://download.01.org/0day-ci/archive/20250213/202502131328.J5Q1ZaRE-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250213/202502131328.J5Q1ZaRE-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502131328.J5Q1ZaRE-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> net/ceph/ceph_san.c:100: warning: Function parameter or struct member 'pf' not described in 'cephsan_pagefrag_init'
>> net/ceph/ceph_san.c:121: warning: Function parameter or struct member 'pf' not described in 'cephsan_pagefrag_alloc'
>> net/ceph/ceph_san.c:162: warning: Function parameter or struct member 'pf' not described in 'cephsan_pagefrag_free'
>> net/ceph/ceph_san.c:172: warning: Function parameter or struct member 'pf' not described in 'cephsan_pagefrag_deinit'


vim +100 net/ceph/ceph_san.c

04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   90  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   91  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   92  /**
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   93   * cephsan_pagefrag_init - Initialize the pagefrag allocator.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   94   *
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   95   * Allocates a 16KB contiguous buffer and resets head and tail pointers.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   96   *
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   97   * Return: 0 on success, negative error code on failure.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11   98   */
a85b831a9a8fcd3 net/ceph/ceph_san.c Alex Markuze 2025-02-11   99  int cephsan_pagefrag_init(struct cephsan_pagefrag *pf)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11 @100  {
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  101  	pf->buffer = kmalloc(CEPHSAN_PAGEFRAG_SIZE, GFP_KERNEL);
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  102  	if (!pf->buffer)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  103  		return -ENOMEM;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  104  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  105  	pf->head = 0;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  106  	pf->tail = 0;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  107  	return 0;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  108  }
a85b831a9a8fcd3 net/ceph/ceph_san.c Alex Markuze 2025-02-11  109  EXPORT_SYMBOL(cephsan_pagefrag_init);
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  110  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  111  /**
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  112   * cephsan_pagefrag_alloc - Allocate bytes from the pagefrag buffer.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  113   * @n: number of bytes to allocate.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  114   *
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  115   * Allocates @n bytes if there is sufficient free space in the buffer.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  116   * Advances the head pointer by @n bytes (wrapping around if needed).
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  117   *
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  118   * Return: pointer to the allocated memory, or NULL if not enough space.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  119   */
a85b831a9a8fcd3 net/ceph/ceph_san.c Alex Markuze 2025-02-11  120  u64 cephsan_pagefrag_alloc(struct cephsan_pagefrag *pf, unsigned int n)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11 @121  {
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  122  	unsigned int used, free_space, remaining;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  123  	void *ptr;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  124  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  125  	/* Compute usage in the circular buffer */
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  126  	if (pf->head >= pf->tail)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  127  		used = pf->head - pf->tail;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  128  	else
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  129  		used = CEPHSAN_PAGEFRAG_SIZE - pf->tail + pf->head;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  130  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  131  	free_space = CEPHSAN_PAGEFRAG_SIZE - used;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  132  	if (n > free_space)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  133  		return 0;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  134  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  135  	/* Check if allocation would wrap around buffer end */
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  136  	if (pf->head + n > CEPHSAN_PAGEFRAG_SIZE) {
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  137  		/* Calculate bytes remaining until buffer end */
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  138  		remaining = CEPHSAN_PAGEFRAG_SIZE - pf->head;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  139  		/* Move tail to start if needed */
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  140  		if (pf->tail < n - remaining)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  141  			pf->tail = 0;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  142  
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  143  		/* Return pointer to new head at buffer start */
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  144  		ptr = pf->buffer;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  145  		pf->head = n - remaining;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  146  	} else {
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  147  		/* No wrap around needed */
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  148  		ptr = (char *)pf->buffer + pf->head;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  149  		pf->head += n;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  150  	}
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  151  	/* Return combined u64 with buffer index in lower 32 bits and size in upper 32 bits */
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  152  	return ((u64)(n) << 32) | (ptr - pf->buffer);
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  153  }
a85b831a9a8fcd3 net/ceph/ceph_san.c Alex Markuze 2025-02-11  154  EXPORT_SYMBOL(cephsan_pagefrag_alloc);
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  155  /**
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  156   * cephsan_pagefrag_free - Free bytes in the pagefrag allocator.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  157   * @n: number of bytes to free.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  158   *
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  159   * Advances the tail pointer by @n bytes (wrapping around if needed).
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  160   */
a85b831a9a8fcd3 net/ceph/ceph_san.c Alex Markuze 2025-02-11  161  void cephsan_pagefrag_free(struct cephsan_pagefrag *pf, unsigned int n)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11 @162  {
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  163  	pf->tail = (pf->tail + n) % CEPHSAN_PAGEFRAG_SIZE;
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  164  }
a85b831a9a8fcd3 net/ceph/ceph_san.c Alex Markuze 2025-02-11  165  EXPORT_SYMBOL(cephsan_pagefrag_free);
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  166  /**
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  167   * cephsan_pagefrag_deinit - Deinitialize the pagefrag allocator.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  168   *
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  169   * Frees the allocated buffer and resets the head and tail pointers.
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11  170   */
a85b831a9a8fcd3 net/ceph/ceph_san.c Alex Markuze 2025-02-11  171  void cephsan_pagefrag_deinit(struct cephsan_pagefrag *pf)
04fa82972277cd8 fs/ceph/ceph_san.c  Alex Markuze 2025-02-11 @172  {

:::::: The code at line 100 was first introduced by commit
:::::: 04fa82972277cd879d1bcb1efe97bbe1c53cd104 cephsan: a full string printout

:::::: TO: Alex Markuze <amarkuze@xxxxxxxxxx>
:::::: CC: Alex Markuze <amarkuze@xxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux